OpenCorePkg/Docs/AcpiSamples/SSDT-RTC0.dsl
vit9696 a825da4e56 Docs: Add PMC ACPI sample for 300-series chipsets
This works around bugs in APTIO V NVRAM implementation on Z390 and above.
Based off multiple third-party contributions with additional debugging
from https://www.hackintosh-forum.de/forum/thread/46154. Also thanks
to @vandroiy2013.

closes acidanthera/bugtracker#397
2020-01-20 12:18:26 +03:00

40 lines
1.2 KiB
Plaintext

/*
* For 300-series only and occasions where SSDT-AWAC is not applicable,
* which requires variable STAS to be present.
*
* On some boards RTC device is disabled by returning 0 from _STA status method and
* to enable it 0xF will be returned as expected by macOS.
*/
DefinitionBlock ("", "SSDT", 2, "ACDT", "RTC0", 0x00000000)
{
External (_SB_.PCI0.LPCB, DeviceObj) // (from opcode)
Scope (_SB.PCI0.LPCB)
{
Device (RTC0)
{
Name (_HID, EisaId ("PNP0B00")) // _HID: Hardware ID
Name (_CRS, ResourceTemplate () // _CRS: Current Resource Settings
{
IO (Decode16,
0x0070, // Range Minimum
0x0070, // Range Maximum
0x01, // Alignment
0x08, // Length
)
IRQNoFlags ()
{8}
})
Method (_STA, 0, NotSerialized) // _STA: Status
{
If (_OSI ("Darwin")) {
Return (0x0F)
} Else {
Return (0);
}
}
}
}
}