blob: d522392c94b1582330ef3a2ac1e94ebfe058047c [file] [edit]
DefinitionBlock ("", "SSDT", 1, "Google", "GOOGSSDT", 0x00000001)
{
External (_SB_.PCI0, DeviceObj)
External (_SB_.PCI0.ISA_, DeviceObj)
External (_SB_.PCI0.PCEJ, MethodObj) // 1 Arguments
Scope (\)
{
// S3 (suspend-to-ram), S4 (suspend-to-disk) and S5 (power-off) type
// codes. Must match PIIX4 emulation.
Name (_S3, Package (0x04) // _S3_: S3 System State
{
One,
One,
Zero,
Zero
})
Name (_S4, Package (0x04) // _S4_: S4 System State
{
0x00,
0x00,
Zero,
Zero
})
Name (_S5, Package (0x04) // _S5_: S5 System State
{
Zero,
Zero,
Zero,
Zero
})
}
Scope (\_SB.PCI0.ISA)
{
Device (PEVT)
{
Name (_HID, "QEMU0001") // _HID: Hardware ID
Name (PEST, {{ pvpanic_port }})
OperationRegion (PEOR, SystemIO, PEST, One)
Field (PEOR, ByteAcc, NoLock, Preserve)
{
PEPT, 8
}
Method (_STA, 0, NotSerialized) // _STA: Status
{
Local0 = PEST /* \_SB_.PCI0.ISA_.PEVT.PEST */
If ((Local0 == Zero))
{
Return (Zero)
}
Else
{
Return (0x0F)
}
}
Method (RDPT, 0, NotSerialized)
{
Local0 = PEPT /* \_SB_.PCI0.ISA_.PEVT.PEPT */
Return (Local0)
}
Method (WRPT, 1, NotSerialized)
{
PEPT = Arg0
}
Name (_CRS, ResourceTemplate () // _CRS: Current Resource Settings
{
IO (Decode16,
0x0000, // Range Minimum
0x0000, // Range Maximum
0x01, // Alignment
0x01, // Length
_Y06)
})
CreateWordField (_CRS, \_SB.PCI0.ISA.PEVT._Y06._MIN, IOMN) // _MIN: Minimum Base Address
CreateWordField (_CRS, \_SB.PCI0.ISA.PEVT._Y06._MAX, IOMX) // _MAX: Maximum Base Address
Method (_INI, 0, NotSerialized) // _INI: Initialize
{
IOMN = PEST /* \_SB_.PCI0.ISA_.PEVT.PEST */
IOMX = PEST /* \_SB_.PCI0.ISA_.PEVT.PEST */
}
}
}
Scope (_SB)
{
## for memory in memory_devices
Device (M{{ memory.id }})
{
Name (_HID, EisaId ("PNP0C80") /* Memory Device */) // _HID: Hardware ID
Name (_UID, 0x{{ memory.id }}) // _UID: Unique ID
Method (_STA, 0, NotSerialized) // _STA: Status
{
Return (MSTA (_UID))
}
Method (_CRS, 0, NotSerialized) // _CRS: Current Resource Settings
{
Return (MCRS (_UID))
}
Method (_PXM, 0, NotSerialized) // _PXM: Device Proximity
{
Return (MPXM (_UID))
}
Method (_OST, 3, NotSerialized) // _OST: OSPM Status Indication
{
Return (MOST (_UID, Arg0, Arg1, Arg2))
}
Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device, x=0-9
{
Return (MEJ0 (_UID, Arg0))
}
}
## endfor
// Memory device notifier called by DSDT
Method (MNOT, 2, NotSerialized)
{
## for memory in memory_devices
If ((Arg0 == 0x{{ memory.id }}))
{
Notify (M{{ memory.id }}, Arg1)
}
## endfor
}
// Boolean value representing whether to define PCI hotplug Devices.
Name (PCHP, {{ pchp }})
If (PCHP)
{
Scope (PCI0)
{
## for device in devices
Device (S{{ device.id }})
{
Name (_SUN, 0x{{ device.id }}) // _SUN: Slot User Number
Name (_ADR, 0x00{{ device.id }}0000) // _ADR: Address
Method (NOEJ, 1, NotSerialized)
{
// Device should only eject if Arg0 is 1.
// See ACPI spec v6.5: 6.3.3. _EJx (Eject)
If (Arg0 == 1)
{
PCEJ (_SUN)
}
}
}
## endfor
Method (PCNT, 2, NotSerialized)
{
## for device in devices
If ((Arg0 == 0x{{ device.id }}))
{
Notify (S{{ device.id }}, Arg1)
}
## endfor
}
}
}
}
}