From d7e8dccb738452e28f344a8658e9d529e317d4cb Mon Sep 17 00:00:00 2001 From: Mykola Grymalyuk <48863253+khronokernel@users.noreply.github.com> Date: Tue, 5 May 2020 22:51:54 -0600 Subject: [PATCH] Add new pre-built EC SSDTs --- Universal/ec-fix.md | 13 +++++- extra-files/SSDT-EC-LAPTOP.aml | Bin 0 -> 190 bytes extra-files/SSDT-EC-LAPTOP.dsl | 36 ++++++++++++++++ extra-files/SSDT-EC-USBX-LAPTOP.aml | Bin 0 -> 335 bytes extra-files/SSDT-EC-USBX-LAPTOP.dsl | 62 ++++++++++++++++++++++++++++ 5 files changed, 110 insertions(+), 1 deletion(-) create mode 100644 extra-files/SSDT-EC-LAPTOP.aml create mode 100644 extra-files/SSDT-EC-LAPTOP.dsl create mode 100644 extra-files/SSDT-EC-USBX-LAPTOP.aml create mode 100644 extra-files/SSDT-EC-USBX-LAPTOP.dsl diff --git a/Universal/ec-fix.md b/Universal/ec-fix.md index fff1953..63a999f 100644 --- a/Universal/ec-fix.md +++ b/Universal/ec-fix.md @@ -3,13 +3,24 @@ What we'll be doing is creating a fake Embedded Controller (EC) to satisfy macOS Catalina's EC addiction, and disabling the EC on desktops to prevent panics and crashes. -You'll want to begin by grabbing either one of these uncompiled SSDT files: +For desktops, you'll want to begin by grabbing either one of these uncompiled SSDT files: * [SSDT-EC-USBX](https://github.com/acidanthera/OpenCorePkg/blob/master/Docs/AcpiSamples/SSDT-EC-USBX.dsl) * For Skylake and newer and all AMD systems * [SSDT-EC](https://github.com/acidanthera/OpenCorePkg/blob/master/Docs/AcpiSamples/SSDT-EC.dsl) * For Broadwell and older +For laptops, you'll can actually use the pre-builts: + +* [SSDT-EC-USBX-LAPTOP.aml](https://github.com/dortania/Getting-Started-With-ACPI/blob/master/extra-files/SSDT-EC-USBX-LAPTOP.aml) + * For Skylake and newer +* [SSDT-EC-LAPTOP.aml](https://github.com/dortania/Getting-Started-With-ACPI/blob/master/extra-files/SSDT-EC-LAPTOP.aml) + * For Broadwell and older + +With laptops it's a simple as that, all this does is check for an existing `EC__` and if one doesn't appear then create a fake EC to make macOS happy. + +Desktops however will need to follow below on creating a proper SSDT. + ### Fixing the Path For Intel systems, the path is *likely* correct, though it's worth double checking. You will want to find your current EC by opening your decompiled DSDT and searching for `PNP0C09`. You should get a result similar to this: diff --git a/extra-files/SSDT-EC-LAPTOP.aml b/extra-files/SSDT-EC-LAPTOP.aml new file mode 100644 index 0000000000000000000000000000000000000000..bbc0dd33e90c3e488d46f66e4c2a44ae83c61785 GIT binary patch literal 190 zcmWFzb_vh1 z;1l2+@9G>M&xS7Q1QA`}#WrD5v=FKeup9%1FxVgl0gD)r;n7V7AQL#^Jv?1_9i2U0 m3=9km8APPxgF_q{76`=q2Yd3mBo>ut<}obc;$O(TgaH7hi!lKJ literal 0 HcmV?d00001 diff --git a/extra-files/SSDT-EC-LAPTOP.dsl b/extra-files/SSDT-EC-LAPTOP.dsl new file mode 100644 index 0000000..a66d859 --- /dev/null +++ b/extra-files/SSDT-EC-LAPTOP.dsl @@ -0,0 +1,36 @@ +/* Purpose of this SSDT is to: + * + * - Find references of devices named EC__ + * - If none are found, only then create a new EC + * + * Reason for this is to avoid having multiple EC__ in devices + * like Lenovo who already use the name EC__ + */ +DefinitionBlock ("", "SSDT", 2, "DRTNIA", "SsdtEC", 0x00001000) +{ + External (_SB_.PCI0.LPC_.EC__, DeviceObj) + External (_SB_.PCI0.LPCB.EC__, DeviceObj) + + If ((!CondRefOf (\_SB.PCI0.LPCB.EC) && !CondRefOf (\_SB.PCI0.LPC.EC))) + { + Scope (\_SB) + { + Device (EC) + { + Name (_HID, "ACID0001") // _HID: Hardware ID + Method (_STA, 0, NotSerialized) // _STA: Status + { + If (_OSI ("Darwin")) + { + Return (0x0F) + } + Else + { + Return (Zero) + } + } + } + } + } +} + diff --git a/extra-files/SSDT-EC-USBX-LAPTOP.aml b/extra-files/SSDT-EC-USBX-LAPTOP.aml new file mode 100644 index 0000000000000000000000000000000000000000..4d17b7ca1e70c17577137ea8c60c2ebb21893df3 GIT binary patch literal 335 zcmWFzb_wxkWME)QatR9Y^K=X@PAPG9W?*0tU|{g{3-RG(l~h=u#~>P`&k`T(6d&O1 zY2Xv!9PjEJAJ2v^>I4y8;Kep!QnV1N4zL^phA`M51_6s0km1oy1|SnS;ypZFcpaTR zT?`Bi3>ieETr()9u5y#X70G#b#0RR91 literal 0 HcmV?d00001 diff --git a/extra-files/SSDT-EC-USBX-LAPTOP.dsl b/extra-files/SSDT-EC-USBX-LAPTOP.dsl new file mode 100644 index 0000000..50d5a04 --- /dev/null +++ b/extra-files/SSDT-EC-USBX-LAPTOP.dsl @@ -0,0 +1,62 @@ +/* Purpose of this SSDT is to: + * + * - Find references of devices named EC__ + * - If none are found, only then create a new EC + * + * Reason for this is to avoid having multiple EC__ in devices + * like Lenovo who already use the name EC__ + */ +DefinitionBlock ("", "SSDT", 2, "DRTNIA", "SsdtEC", 0x00001000) +{ + External (_SB_.PCI0.LPC_.EC__, DeviceObj) + External (_SB_.PCI0.LPCB.EC__, DeviceObj) + + If ((!CondRefOf (\_SB.PCI0.LPCB.EC) && !CondRefOf (\_SB.PCI0.LPC.EC))) + { + Scope (\_SB) + { + Device (EC) + { + Name (_HID, "ACID0001") // _HID: Hardware ID + Method (_STA, 0, NotSerialized) // _STA: Status + { + If (_OSI ("Darwin")) + { + Return (0x0F) + } + Else + { + Return (Zero) + } + } + } + } + } + + Device (USBX) + { + Name (_ADR, Zero) // _ADR: Address + Method (_DSM, 4, NotSerialized) // _DSM: Device-Specific Method + { + If ((Arg2 == Zero)) + { + Return (Buffer (One) + { + 0x03 // . + }) + } + + Return (Package (0x08) + { + "kUSBSleepPowerSupply", + 0x13EC, + "kUSBSleepPortCurrentLimit", + 0x0834, + "kUSBWakePowerSupply", + 0x13EC, + "kUSBWakePortCurrentLimit", + 0x0834 + }) + } + } +} \ No newline at end of file