From 7c84fa90ea930526ba91c448533ffeb1cc8d6037 Mon Sep 17 00:00:00 2001 From: Tyler Nguyen Date: Fri, 13 Nov 2020 17:12:58 -0600 Subject: [PATCH] Patch AppleACPIACAdapter in its own SSDT --- EFI-OpenCore/EFI/OC/ACPI/SSDT-AC.aml | Bin 0 -> 142 bytes EFI-OpenCore/EFI/OC/config.plist | 8 ++++++ patches/SSDT-AC.dsl | 37 +++++++++++++++++++++++++++ 3 files changed, 45 insertions(+) create mode 100644 EFI-OpenCore/EFI/OC/ACPI/SSDT-AC.aml create mode 100644 patches/SSDT-AC.dsl diff --git a/EFI-OpenCore/EFI/OC/ACPI/SSDT-AC.aml b/EFI-OpenCore/EFI/OC/ACPI/SSDT-AC.aml new file mode 100644 index 0000000000000000000000000000000000000000..8563a324b4e1dfe0a6a0aa6af7236193efa01f57 GIT binary patch literal 142 zcmWFzb_wZYU|?XnP*RzbTEr0V=nUimfdB)8r(cMV2CIU?0v!g?82@0Ga1J1?&l(@> z6d&O1Y2Xv!?Bwbk57ZGK&-Pz5#wXl4fc3wC4GtwD%JBg~;S38zCW6fZD_6Gg I#R8?70mtAY0RR91 literal 0 HcmV?d00001 diff --git a/EFI-OpenCore/EFI/OC/config.plist b/EFI-OpenCore/EFI/OC/config.plist index 3ce998a..347b098 100755 --- a/EFI-OpenCore/EFI/OC/config.plist +++ b/EFI-OpenCore/EFI/OC/config.plist @@ -22,6 +22,14 @@ Path SSDT-INIT.aml + + Comment + Patch AC: Load AppleACPIACAdapter + Enabled + + Path + SSDT-AC.aml + Comment Patch Battery diff --git a/patches/SSDT-AC.dsl b/patches/SSDT-AC.dsl new file mode 100644 index 0000000..1922988 --- /dev/null +++ b/patches/SSDT-AC.dsl @@ -0,0 +1,37 @@ +// +// AC-Adapter +// + +DefinitionBlock ("", "SSDT", 2, "tyler", "_AC", 0x00001000) +{ + // Common utils from SSDT-Darwin.dsl + External (OSDW, MethodObj) // 0 Arguments + + External (_SB.PCI0.LPCB.EC.AC, DeviceObj) + External (LWCP, FieldUnitObj) // LID control power + + // Patching AC-Device so that AppleACPIACAdapter-driver loads. + // Device named ADP1 on Mac + // See https://github.com/khronokernel/DarwinDumped/blob/b6d91cf4a5bdf1d4860add87cf6464839b92d5bb/MacBookPro/MacBookPro14%2C1/ACPI%20Tables/DSL/DSDT.dsl#L7965 + Scope (\_SB.PCI0.LPCB.EC.AC) + { + Method (_PRW, 0, NotSerialized) // _PRW: Power Resources for Wake + { + If (\OSDW () || \LWCP) + { + Return (Package (0x02) + { + 0x17, + 0x04 + }) + } + + Return (Package (0x02) + { + 0x17, + 0x03 + }) + } + } +} +// EOF