From 72b40e395cae8c6d25d386985174e08f8effad3a Mon Sep 17 00:00:00 2001 From: Mykola Grymalyuk <48863253+khronokernel@users.noreply.github.com> Date: Sat, 9 May 2020 11:15:22 -0600 Subject: [PATCH] Improve SSDT-EC Checks if the EC is an actual object before checking methods, should greatly speed up the SSDT and prevent conflict if a drunk OEM uses EC naming for a method --- extra-files/SSDT-EC-DESKTOP.aml | Bin 0 -> 5387 bytes extra-files/SSDT-EC-DESKTOP.dsl | 610 +++++++++++++++------------ extra-files/SSDT-EC-USBX-DESKTOP.aml | Bin 5458 -> 5533 bytes extra-files/SSDT-EC-USBX-DESKTOP.dsl | 610 +++++++++++++++------------ 4 files changed, 700 insertions(+), 520 deletions(-) create mode 100644 extra-files/SSDT-EC-DESKTOP.aml diff --git a/extra-files/SSDT-EC-DESKTOP.aml b/extra-files/SSDT-EC-DESKTOP.aml new file mode 100644 index 0000000000000000000000000000000000000000..e8b863b70fc3ba9f170da651aed578ac24e74233 GIT binary patch literal 5387 zcmb7|KW`I35XD!-iHM`f79s_rp`^>w(b{*Gb5fL8K8q%nR!B576o5p}2S65l0Y~x& zWoL%_#xbfNk{(QIFJ-panpQgt#+*GB*O0lkqvRp0P zZ`@RGW^U>M#mm=0wEZO9*VSeD@#~MzU);exjt=7qCime9avvCZR0w%g7iMzyQNjI=QyEFQ@-aUp|YVy3X-crJddfyjv2K8Jc1<6%`qDmEdU+ zC6in(Y?@FNVM0wohB}!xkd_|7Hxy4#T4v0O{g~I zd(IOYO(F?3g?P^1q1Hq^&-==amxTV#q@L4+Y8&=kd$8v;p}O7wd*1wRh40W#OcUBu z63=@|O5T$a&pRcb9455caG21ZLdZcvdrgEqC!w~Rqz0UpPQ;#T*dVzo*mIQ7Zcx7G zFrke}!-Vz}NDkkjy(Z#$PC{)rNe%TJCA4cx6WUX-=P03F(^H;L-*4srKo39T{S?A; aIR}@sqAI=j?_AS3J^Dw@c=C91aDM@HL$^!- literal 0 HcmV?d00001 diff --git a/extra-files/SSDT-EC-DESKTOP.dsl b/extra-files/SSDT-EC-DESKTOP.dsl index b860fa8..ddab2fa 100644 --- a/extra-files/SSDT-EC-DESKTOP.dsl +++ b/extra-files/SSDT-EC-DESKTOP.dsl @@ -1,9 +1,11 @@ /* * What this mess of an SSDT tries to accomplish is this: - * - Find valid ECs and disable them, they will have the following properties: + * - Find ECs(Device = 0x06) + * - Disable valid ECs, they will have the following properties: * - _HID * - _CRS * - _GPE + * - Check for _STA to avoid conflicts * - Create a new fake EC to let macOS play with * - Create a USBX device for Skylake and newer */ @@ -58,89 +60,111 @@ DefinitionBlock ("", "SSDT", 2, "DRTNIA", "SsdtEC", 0x00001000) // Let the AMD Trash being(and glorious Core2) - - If ((CondRefOf (\_SB.PCI0.SBRG.EC)) && CondRefOf (\_SB.PCI0.SBRG.EC._HID) && CondRefOf (\_SB.PCI0.SBRG.EC._CRS) && CondRefOf (\_SB.PCI0.SBRG.EC._GPE) && !CondRefOf (\_SB.PCI0.SBRG.EC._STA)) + If ((ObjectType (\_SB.PCI0.SBRG.EC) == 0x06)) { - Scope (\_SB.PCI0.SBRG.EC) + If ((((CondRefOf (\_SB.PCI0.SBRG.EC._HID) && CondRefOf (\_SB.PCI0.SBRG.EC._CRS)) && CondRefOf (\_SB.PCI0.SBRG.EC._GPE + )) && !CondRefOf (\_SB.PCI0.SBRG.EC._STA))) { - Method (_STA, 0, NotSerialized) // _STA: Status + Scope (\_SB.PCI0.SBRG.EC) { - If (_OSI ("Darwin")) + Method (_STA, 0, NotSerialized) // _STA: Status { - Return (0) - } - Else - { - Return (0x0F) + If (_OSI ("Darwin")) + { + Return (Zero) + } + Else + { + Return (0x0F) + } } } } } - If ((CondRefOf (\_SB.PCI0.SBRG.EC0)) && CondRefOf (\_SB.PCI0.SBRG.EC0._HID) && CondRefOf (\_SB.PCI0.SBRG.EC0._CRS) && CondRefOf (\_SB.PCI0.SBRG.EC0._GPE) && !CondRefOf (\_SB.PCI0.SBRG.EC0._STA)) + + If ((ObjectType (\_SB.PCI0.SBRG.EC0) == 0x06)) { - Scope (\_SB.PCI0.SBRG.EC0) + If ((((CondRefOf (\_SB.PCI0.SBRG.EC0._HID) && CondRefOf (\_SB.PCI0.SBRG.EC0._CRS)) && CondRefOf (\_SB.PCI0.SBRG.EC0._GPE + )) && !CondRefOf (\_SB.PCI0.SBRG.EC0._STA))) { - Method (_STA, 0, NotSerialized) // _STA: Status + Scope (\_SB.PCI0.SBRG.EC0) { - If (_OSI ("Darwin")) + Method (_STA, 0, NotSerialized) // _STA: Status { - Return (0) - } - Else - { - Return (0x0F) + If (_OSI ("Darwin")) + { + Return (Zero) + } + Else + { + Return (0x0F) + } } } } } - - If ((CondRefOf (\_SB.PCI0.SBRG.H_EC)) && CondRefOf (\_SB.PCI0.SBRG.H_EC._HID) && CondRefOf (\_SB.PCI0.SBRG.H_EC._CRS) && CondRefOf (\_SB.PCI0.SBRG.H_EC._GPE) && !CondRefOf (\_SB.PCI0.SBRG.H_EC._STA)) + + If ((ObjectType (\_SB.PCI0.SBRG.H_EC) == 0x06)) { - Scope (\_SB.PCI0.SBRG.H_EC) + If ((((CondRefOf (\_SB.PCI0.SBRG.H_EC._HID) && CondRefOf (\_SB.PCI0.SBRG.H_EC._CRS)) && CondRefOf (\_SB.PCI0.SBRG.H_EC._GPE + )) && !CondRefOf (\_SB.PCI0.SBRG.H_EC._STA))) { - Method (_STA, 0, NotSerialized) // _STA: Status + Scope (\_SB.PCI0.SBRG.H_EC) { - If (_OSI ("Darwin")) + Method (_STA, 0, NotSerialized) // _STA: Status { - Return (0) - } - Else - { - Return (0x0F) + If (_OSI ("Darwin")) + { + Return (Zero) + } + Else + { + Return (0x0F) + } } } } } - If ((CondRefOf (\_SB.PCI0.SBRG.ECDV)) && CondRefOf (\_SB.PCI0.SBRG.ECDV._HID) && CondRefOf (\_SB.PCI0.SBRG.ECDV._CRS) && CondRefOf (\_SB.PCI0.SBRG.ECDV._GPE) && !CondRefOf (\_SB.PCI0.SBRG.ECDV._STA)) + + If ((ObjectType (\_SB.PCI0.SBRG.ECDV) == 0x06)) { - Scope (\_SB.PCI0.SBRG.ECDV) + If ((((CondRefOf (\_SB.PCI0.SBRG.ECDV._HID) && CondRefOf (\_SB.PCI0.SBRG.ECDV._CRS)) && CondRefOf (\_SB.PCI0.SBRG.ECDV._GPE + )) && !CondRefOf (\_SB.PCI0.SBRG.ECDV._STA))) { - Method (_STA, 0, NotSerialized) // _STA: Status + Scope (\_SB.PCI0.SBRG.ECDV) { - If (_OSI ("Darwin")) + Method (_STA, 0, NotSerialized) // _STA: Status { - Return (0) - } - Else - { - Return (0x0F) + If (_OSI ("Darwin")) + { + Return (Zero) + } + Else + { + Return (0x0F) + } } } } } - If ((CondRefOf (\_SB.PCI0.SBRG.PGEC)) && CondRefOf (\_SB.PCI0.SBRG.PGEC._HID) && CondRefOf (\_SB.PCI0.SBRG.PGEC._CRS) && CondRefOf (\_SB.PCI0.SBRG.PGEC._GPE) && !CondRefOf (\_SB.PCI0.SBRG.PGEC._STA)) + + If ((ObjectType (\_SB.PCI0.SBRG.PGEC) == 0x06)) { - Scope (\_SB.PCI0.SBRG.PGEC) + If (((((CondRefOf (\_SB.PCI0.SBRG.PGEC._HID)) && CondRefOf ( + \_SB.PCI0.SBRG.PGEC._CRS)) && CondRefOf (\_SB.PCI0.SBRG.PGEC._GPE)) && !CondRefOf (\_SB.PCI0.SBRG.PGEC._STA))) { - Method (_STA, 0, NotSerialized) // _STA: Status + Scope (\_SB.PCI0.SBRG.PGEC) { - If (_OSI ("Darwin")) + Method (_STA, 0, NotSerialized) // _STA: Status { - Return (0) - } - Else - { - Return (0x0F) + If (_OSI ("Darwin")) + { + Return (Zero) + } + Else + { + Return (0x0F) + } } } } @@ -148,204 +172,222 @@ DefinitionBlock ("", "SSDT", 2, "DRTNIA", "SsdtEC", 0x00001000) // Now we go to consumer - If ((CondRefOf (\_SB.PCI0.LPCB.EC)) && CondRefOf (\_SB.PCI0.LPCB.EC._HID) && CondRefOf (\_SB.PCI0.LPCB.EC._CRS) && CondRefOf (\_SB.PCI0.LPCB.EC._GPE) && !CondRefOf (\_SB.PCI0.LPCB.EC._STA)) + If ((ObjectType (\_SB.PCI0.LPCB.EC) == 0x06)) { - Scope (\_SB.PCI0.LPCB.EC) + If ((((CondRefOf (\_SB.PCI0.LPCB.EC._HID) && CondRefOf (\_SB.PCI0.LPCB.EC._CRS)) && CondRefOf (\_SB.PCI0.LPCB.EC._GPE + )) && !CondRefOf (\_SB.PCI0.LPCB.EC._STA))) { - Method (_STA, 0, NotSerialized) // _STA: Status + Scope (\_SB.PCI0.LPCB.EC) { - If (_OSI ("Darwin")) + Method (_STA, 0, NotSerialized) // _STA: Status { - Return (0) - } - Else - { - Return (0x0F) + If (_OSI ("Darwin")) + { + Return (Zero) + } + Else + { + Return (0x0F) + } } } } } - If ((CondRefOf (\_SB.PCI0.LPCB.EC0)) && CondRefOf (\_SB.PCI0.LPCB.EC0._HID) && CondRefOf (\_SB.PCI0.LPCB.EC0._CRS) && CondRefOf (\_SB.PCI0.LPCB.EC0._GPE) && !CondRefOf (\_SB.PCI0.LPCB.EC0._STA)) + + If ((ObjectType (\_SB.PCI0.LPCB.EC0) == 0x06)) { - Scope (\_SB.PCI0.LPCB.EC0) + If ((((CondRefOf (\_SB.PCI0.LPCB.EC0._HID) && CondRefOf (\_SB.PCI0.LPCB.EC0._CRS)) && CondRefOf (\_SB.PCI0.LPCB.EC0._GPE + )) && !CondRefOf (\_SB.PCI0.LPCB.EC0._STA))) { - Method (_STA, 0, NotSerialized) // _STA: Status + Scope (\_SB.PCI0.LPCB.EC0) { - If (_OSI ("Darwin")) + Method (_STA, 0, NotSerialized) // _STA: Status { - Return (0) - } - Else - { - Return (0x0F) + If (_OSI ("Darwin")) + { + Return (Zero) + } + Else + { + Return (0x0F) + } } } } } - If ((CondRefOf (\_SB.PCI0.LPCB.H_EC)) && CondRefOf (\_SB.PCI0.LPCB.H_EC._HID) && CondRefOf (\_SB.PCI0.LPCB.H_EC._CRS) && CondRefOf (\_SB.PCI0.LPCB.H_EC._GPE) && !CondRefOf (\_SB.PCI0.LPCB.H_EC._STA)) + + If ((ObjectType (\_SB.PCI0.LPCB.H_EC) == 0x06)) { - Scope (\_SB.PCI0.LPCB.H_EC) + If ((((CondRefOf (\_SB.PCI0.LPCB.H_EC._HID) && CondRefOf (\_SB.PCI0.LPCB.H_EC._CRS)) && CondRefOf (\_SB.PCI0.LPCB.H_EC._GPE + )) && !CondRefOf (\_SB.PCI0.LPCB.H_EC._STA))) { - Method (_STA, 0, NotSerialized) // _STA: Status + Scope (\_SB.PCI0.LPCB.H_EC) { - If (_OSI ("Darwin")) + Method (_STA, 0, NotSerialized) // _STA: Status { - Return (0) - } - Else - { - Return (0x0F) + If (_OSI ("Darwin")) + { + Return (Zero) + } + Else + { + Return (0x0F) + } } } } } - If ((CondRefOf (\_SB.PCI0.LPCB.ECDV)) && CondRefOf (\_SB.PCI0.LPCB.ECDV._HID) && CondRefOf (\_SB.PCI0.LPCB.ECDV._CRS) && CondRefOf (\_SB.PCI0.LPCB.ECDV._GPE) && !CondRefOf (\_SB.PCI0.LPCB.ECDV._STA)) + + If ((ObjectType (\_SB.PCI0.LPCB.ECDV) == 0x06)) { - Scope (\_SB.PCI0.LPCB.ECDV) + If ((((CondRefOf (\_SB.PCI0.LPCB.ECDV._HID) && CondRefOf (\_SB.PCI0.LPCB.ECDV._CRS)) && CondRefOf (\_SB.PCI0.LPCB.ECDV._GPE + )) && !CondRefOf (\_SB.PCI0.LPCB.ECDV._STA))) { - Method (_STA, 0, NotSerialized) // _STA: Status + Scope (\_SB.PCI0.LPCB.ECDV) { - If (_OSI ("Darwin")) + Method (_STA, 0, NotSerialized) // _STA: Status { - Return (0) - } - Else - { - Return (0x0F) + If (_OSI ("Darwin")) + { + Return (Zero) + } + Else + { + Return (0x0F) + } } } } } - If ((CondRefOf (\_SB.PCI0.LPCB.PGEC)) && CondRefOf (\_SB.PCI0.LPCB.PGEC._HID) && CondRefOf (\_SB.PCI0.LPCB.PGEC._CRS) && CondRefOf (\_SB.PCI0.LPCB.PGEC._GPE) && !CondRefOf (\_SB.PCI0.LPCB.PGEC._STA)) + + If ((ObjectType (\_SB.PCI0.LPCB.PGEC) == 0x06)) { - Scope (\_SB.PCI0.LPCB.PGEC) + If (((((CondRefOf (\_SB.PCI0.LPCB.PGEC._HID)) && CondRefOf ( + \_SB.PCI0.LPCB.PGEC._CRS)) && CondRefOf (\_SB.PCI0.LPCB.PGEC._GPE)) && !CondRefOf (\_SB.PCI0.LPCB.PGEC._STA))) { - Method (_STA, 0, NotSerialized) // _STA: Status + Scope (\_SB.PCI0.LPCB.PGEC) { - If (_OSI ("Darwin")) + Method (_STA, 0, NotSerialized) // _STA: Status { - Return (0) - } - Else - { - Return (0x0F) + If (_OSI ("Darwin")) + { + Return (Zero) + } + Else + { + Return (0x0F) + } } } } - } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + } // Laptop trash - If ((CondRefOf (\_SB.PCI0.LPC.EC)) && CondRefOf (\_SB.PCI0.LPC.EC._HID) && CondRefOf (\_SB.PCI0.LPC.EC._CRS) && CondRefOf (\_SB.PCI0.LPC.EC._GPE) && !CondRefOf (\_SB.PCI0.LPC.EC._STA)) + If ((ObjectType (\_SB.PCI0.LPC.EC) == 0x06)) { - Scope (\_SB.PCI0.LPC.EC) + If ((((CondRefOf (\_SB.PCI0.LPC.EC._HID) && CondRefOf (\_SB.PCI0.LPC.EC._CRS)) && CondRefOf (\_SB.PCI0.LPC.EC._GPE + )) && !CondRefOf (\_SB.PCI0.LPC.EC._STA))) { - Method (_STA, 0, NotSerialized) // _STA: Status + Scope (\_SB.PCI0.LPC.EC) { - If (_OSI ("Darwin")) + Method (_STA, 0, NotSerialized) // _STA: Status { - Return (0) - } - Else - { - Return (0x0F) + If (_OSI ("Darwin")) + { + Return (Zero) + } + Else + { + Return (0x0F) + } } } } } - If ((CondRefOf (\_SB.PCI0.LPC.EC0)) && CondRefOf (\_SB.PCI0.LPC.EC0._HID) && CondRefOf (\_SB.PCI0.LPC.EC0._CRS) && CondRefOf (\_SB.PCI0.LPC.EC0._GPE) && !CondRefOf (\_SB.PCI0.LPC.EC0._STA)) + + If ((ObjectType (\_SB.PCI0.LPC.EC0) == 0x06)) { - Scope (\_SB.PCI0.LPC.EC0) + If ((((CondRefOf (\_SB.PCI0.LPC.EC0._HID) && CondRefOf (\_SB.PCI0.LPC.EC0._CRS)) && CondRefOf (\_SB.PCI0.LPC.EC0._GPE + )) && !CondRefOf (\_SB.PCI0.LPC.EC0._STA))) { - Method (_STA, 0, NotSerialized) // _STA: Status + Scope (\_SB.PCI0.LPC.EC0) { - If (_OSI ("Darwin")) + Method (_STA, 0, NotSerialized) // _STA: Status { - Return (0) - } - Else - { - Return (0x0F) + If (_OSI ("Darwin")) + { + Return (Zero) + } + Else + { + Return (0x0F) + } } } } } - If ((CondRefOf (\_SB.PCI0.LPC.H_EC)) && CondRefOf (\_SB.PCI0.LPC.H_EC._HID) && CondRefOf (\_SB.PCI0.LPC.H_EC._CRS) && CondRefOf (\_SB.PCI0.LPC.H_EC._GPE) && !CondRefOf (\_SB.PCI0.LPC.H_EC._STA)) + + If ((ObjectType (\_SB.PCI0.LPC.H_EC) == 0x06)) { - Scope (\_SB.PCI0.LPC.H_EC) + If ((((CondRefOf (\_SB.PCI0.LPC.H_EC._HID) && CondRefOf (\_SB.PCI0.LPC.H_EC._CRS)) && CondRefOf (\_SB.PCI0.LPC.H_EC._GPE + )) && !CondRefOf (\_SB.PCI0.LPC.H_EC._STA))) { - Method (_STA, 0, NotSerialized) // _STA: Status + Scope (\_SB.PCI0.LPC.H_EC) { - If (_OSI ("Darwin")) + Method (_STA, 0, NotSerialized) // _STA: Status { - Return (0) - } - Else - { - Return (0x0F) + If (_OSI ("Darwin")) + { + Return (Zero) + } + Else + { + Return (0x0F) + } } } } } - If ((CondRefOf (\_SB.PCI0.LPC.ECDV)) && CondRefOf (\_SB.PCI0.LPC.ECDV._HID) && CondRefOf (\_SB.PCI0.LPC.ECDV._CRS) && CondRefOf (\_SB.PCI0.LPC.ECDV._GPE) && !CondRefOf (\_SB.PCI0.LPC.ECDV._STA)) + + If ((ObjectType (\_SB.PCI0.LPC.ECDV) == 0x06)) { - Scope (\_SB.PCI0.LPC.ECDV) + If ((((CondRefOf (\_SB.PCI0.LPC.ECDV._HID) && CondRefOf (\_SB.PCI0.LPC.ECDV._CRS)) && CondRefOf (\_SB.PCI0.LPC.ECDV._GPE + )) && !CondRefOf (\_SB.PCI0.LPC.ECDV._STA))) { - Method (_STA, 0, NotSerialized) // _STA: Status + Scope (\_SB.PCI0.LPC.ECDV) { - If (_OSI ("Darwin")) + Method (_STA, 0, NotSerialized) // _STA: Status { - Return (0) - } - Else - { - Return (0x0F) + If (_OSI ("Darwin")) + { + Return (Zero) + } + Else + { + Return (0x0F) + } } } } } - If ((CondRefOf (\_SB.PCI0.LPC.PGEC)) && CondRefOf (\_SB.PCI0.LPC.PGEC._HID) && CondRefOf (\_SB.PCI0.LPC.PGEC._CRS) && CondRefOf (\_SB.PCI0.LPC.PGEC._GPE) && !CondRefOf (\_SB.PCI0.LPC.PGEC._STA)) + + If ((ObjectType (\_SB.PCI0.LPC.PGEC) == 0x06)) { - Scope (\_SB.PCI0.LPC.PGEC) + If (((((CondRefOf (\_SB.PCI0.LPC.PGEC._HID)) && CondRefOf ( + \_SB.PCI0.LPC.PGEC._CRS)) && CondRefOf (\_SB.PCI0.LPC.PGEC._GPE)) && !CondRefOf (\_SB.PCI0.LPC.PGEC._STA))) { - Method (_STA, 0, NotSerialized) // _STA: Status + Scope (\_SB.PCI0.LPC.PGEC) { - If (_OSI ("Darwin")) + Method (_STA, 0, NotSerialized) // _STA: Status { - Return (0) - } - Else - { - Return (0x0F) + If (_OSI ("Darwin")) + { + Return (Zero) + } + Else + { + Return (0x0F) + } } } } @@ -353,175 +395,223 @@ DefinitionBlock ("", "SSDT", 2, "DRTNIA", "SsdtEC", 0x00001000) // X79 and X99 trash - If ((CondRefOf (\_SB.PCI0.LPC0.EC)) && CondRefOf (\_SB.PCI0.LPC0.EC._HID) && CondRefOf (\_SB.PCI0.LPC0.EC._CRS) && CondRefOf (\_SB.PCI0.LPC0.EC._GPE) && !CondRefOf (\_SB.PCI0.LPC0.EC._STA)) + If ((ObjectType (\_SB.PCI0.LPC0.EC) == 0x06)) { - Scope (\_SB.PCI0.LPC0.EC) + If ((((CondRefOf (\_SB.PCI0.LPC0.EC._HID) && CondRefOf (\_SB.PCI0.LPC0.EC._CRS)) && CondRefOf (\_SB.PCI0.LPC0.EC._GPE + )) && !CondRefOf (\_SB.PCI0.LPC0.EC._STA))) { - Method (_STA, 0, NotSerialized) // _STA: Status + Scope (\_SB.PCI0.LPC0.EC) { - If (_OSI ("Darwin")) + Method (_STA, 0, NotSerialized) // _STA: Status { - Return (0) - } - Else - { - Return (0x0F) + If (_OSI ("Darwin")) + { + Return (Zero) + } + Else + { + Return (0x0F) + } } } } } - If ((CondRefOf (\_SB.PCI0.LPC0.EC0)) && CondRefOf (\_SB.PCI0.LPC0.EC0._HID) && CondRefOf (\_SB.PCI0.LPC0.EC0._CRS) && CondRefOf (\_SB.PCI0.LPC0.EC0._GPE) && !CondRefOf (\_SB.PCI0.LPC0.EC0._STA)) + + If ((ObjectType (\_SB.PCI0.LPC0.EC0) == 0x06)) { - Scope (\_SB.PCI0.LPC0.EC0) + If ((((CondRefOf (\_SB.PCI0.LPC0.EC0._HID) && CondRefOf (\_SB.PCI0.LPC0.EC0._CRS)) && CondRefOf (\_SB.PCI0.LPC0.EC0._GPE + )) && !CondRefOf (\_SB.PCI0.LPC0.EC0._STA))) { - Method (_STA, 0, NotSerialized) // _STA: Status + Scope (\_SB.PCI0.LPC0.EC0) { - If (_OSI ("Darwin")) + Method (_STA, 0, NotSerialized) // _STA: Status { - Return (0) - } - Else - { - Return (0x0F) + If (_OSI ("Darwin")) + { + Return (Zero) + } + Else + { + Return (0x0F) + } } } } } - If ((CondRefOf (\_SB.PCI0.LPC0.H_EC)) && CondRefOf (\_SB.PCI0.LPC0.H_EC._HID) && CondRefOf (\_SB.PCI0.LPC0.H_EC._CRS) && CondRefOf (\_SB.PCI0.LPC0.H_EC._GPE) && !CondRefOf (\_SB.PCI0.LPC0.H_EC._STA)) + + If ((ObjectType (\_SB.PCI0.LPC0.H_EC) == 0x06)) { - Scope (\_SB.PCI0.LPC0.H_EC) + If ((((CondRefOf (\_SB.PCI0.LPC0.H_EC._HID) && CondRefOf (\_SB.PCI0.LPC0.H_EC._CRS)) && CondRefOf (\_SB.PCI0.LPC0.H_EC._GPE + )) && !CondRefOf (\_SB.PCI0.LPC0.H_EC._STA))) { - Method (_STA, 0, NotSerialized) // _STA: Status + Scope (\_SB.PCI0.LPC0.H_EC) { - If (_OSI ("Darwin")) + Method (_STA, 0, NotSerialized) // _STA: Status { - Return (0) - } - Else - { - Return (0x0F) + If (_OSI ("Darwin")) + { + Return (Zero) + } + Else + { + Return (0x0F) + } } } } } - If ((CondRefOf (\_SB.PCI0.LPC0.ECDV)) && CondRefOf (\_SB.PCI0.LPC0.ECDV._HID) && CondRefOf (\_SB.PCI0.LPC0.ECDV._CRS) && CondRefOf (\_SB.PCI0.LPC0.ECDV._GPE) && !CondRefOf (\_SB.PCI0.LPC0.ECDV._STA)) + + If ((ObjectType (\_SB.PCI0.LPC0.ECDV) == 0x06)) { - Scope (\_SB.PCI0.LPC0.ECDV) + If ((((CondRefOf (\_SB.PCI0.LPC0.ECDV._HID) && CondRefOf (\_SB.PCI0.LPC0.ECDV._CRS)) && CondRefOf (\_SB.PCI0.LPC0.ECDV._GPE + )) && !CondRefOf (\_SB.PCI0.LPC0.ECDV._STA))) { - Method (_STA, 0, NotSerialized) // _STA: Status + Scope (\_SB.PCI0.LPC0.ECDV) { - If (_OSI ("Darwin")) + Method (_STA, 0, NotSerialized) // _STA: Status { - Return (0) - } - Else - { - Return (0x0F) + If (_OSI ("Darwin")) + { + Return (Zero) + } + Else + { + Return (0x0F) + } } } } } - If ((CondRefOf (\_SB.PCI0.LPC0.PGEC)) && CondRefOf (\_SB.PCI0.LPC0.PGEC._HID) && CondRefOf (\_SB.PCI0.LPC0.PGEC._CRS) && CondRefOf (\_SB.PCI0.LPC0.PGEC._GPE) && !CondRefOf (\_SB.PCI0.LPC0.PGEC._STA)) + + If ((ObjectType (\_SB.PCI0.LPC0.PGEC) == 0x06)) { - Scope (\_SB.PCI0.LPC0.PGEC) + If (((((CondRefOf (\_SB.PCI0.LPC0.PGEC._HID)) && CondRefOf ( + \_SB.PCI0.LPC0.PGEC._CRS)) && CondRefOf (\_SB.PCI0.LPC0.PGEC._GPE)) && !CondRefOf (\_SB.PCI0.LPC0.PGEC._STA))) { - Method (_STA, 0, NotSerialized) // _STA: Status + Scope (\_SB.PCI0.LPC0.PGEC) { - If (_OSI ("Darwin")) + Method (_STA, 0, NotSerialized) // _STA: Status { - Return (0) - } - Else - { - Return (0x0F) + If (_OSI ("Darwin")) + { + Return (Zero) + } + Else + { + Return (0x0F) + } } } } } - + // Cursed X299 - If ((CondRefOf (\_SB.PC00.LPC0.EC)) && CondRefOf (\_SB.PC00.LPC0.EC._HID) && CondRefOf (\_SB.PC00.LPC0.EC._CRS) && CondRefOf (\_SB.PC00.LPC0.EC._GPE) && !CondRefOf (\_SB.PC00.LPC0.EC._STA)) + If ((ObjectType (\_SB.PC00.LPC0.EC) == 0x06)) { - Scope (\_SB.PC00.LPC0.EC) + If ((((CondRefOf (\_SB.PC00.LPC0.EC._HID) && CondRefOf (\_SB.PC00.LPC0.EC._CRS)) && CondRefOf (\_SB.PC00.LPC0.EC._GPE + )) && !CondRefOf (\_SB.PC00.LPC0.EC._STA))) { - Method (_STA, 0, NotSerialized) // _STA: Status + Scope (\_SB.PC00.LPC0.EC) { - If (_OSI ("Darwin")) + Method (_STA, 0, NotSerialized) // _STA: Status { - Return (0) - } - Else - { - Return (0x0F) + If (_OSI ("Darwin")) + { + Return (Zero) + } + Else + { + Return (0x0F) + } } } } } - If ((CondRefOf (\_SB.PC00.LPC0.EC0)) && CondRefOf (\_SB.PC00.LPC0.EC0._HID) && CondRefOf (\_SB.PC00.LPC0.EC0._CRS) && CondRefOf (\_SB.PC00.LPC0.EC0._GPE) && !CondRefOf (\_SB.PC00.LPC0.EC0._STA)) + + If ((ObjectType (\_SB.PC00.LPC0.EC0) == 0x06)) { - Scope (\_SB.PC00.LPC0.EC0) + If ((((CondRefOf (\_SB.PC00.LPC0.EC0._HID) && CondRefOf (\_SB.PC00.LPC0.EC0._CRS)) && CondRefOf (\_SB.PC00.LPC0.EC0._GPE + )) && !CondRefOf (\_SB.PC00.LPC0.EC0._STA))) { - Method (_STA, 0, NotSerialized) // _STA: Status + Scope (\_SB.PC00.LPC0.EC0) { - If (_OSI ("Darwin")) + Method (_STA, 0, NotSerialized) // _STA: Status { - Return (0) - } - Else - { - Return (0x0F) + If (_OSI ("Darwin")) + { + Return (Zero) + } + Else + { + Return (0x0F) + } } } } } - If ((CondRefOf (\_SB.PC00.LPC0.H_EC)) && CondRefOf (\_SB.PC00.LPC0.H_EC._HID) && CondRefOf (\_SB.PC00.LPC0.H_EC._CRS) && CondRefOf (\_SB.PC00.LPC0.H_EC._GPE) && !CondRefOf (\_SB.PC00.LPC0.H_EC._STA)) + + If ((ObjectType (\_SB.PC00.LPC0.H_EC) == 0x06)) { - Scope (\_SB.PC00.LPC0.H_EC) + If ((((CondRefOf (\_SB.PC00.LPC0.H_EC._HID) && CondRefOf (\_SB.PC00.LPC0.H_EC._CRS)) && CondRefOf (\_SB.PC00.LPC0.H_EC._GPE + )) && !CondRefOf (\_SB.PC00.LPC0.H_EC._STA))) { - Method (_STA, 0, NotSerialized) // _STA: Status + Scope (\_SB.PC00.LPC0.H_EC) { - If (_OSI ("Darwin")) + Method (_STA, 0, NotSerialized) // _STA: Status { - Return (0) - } - Else - { - Return (0x0F) + If (_OSI ("Darwin")) + { + Return (Zero) + } + Else + { + Return (0x0F) + } } } } } - If ((CondRefOf (\_SB.PC00.LPC0.ECDV)) && CondRefOf (\_SB.PC00.LPC0.ECDV._HID) && CondRefOf (\_SB.PC00.LPC0.ECDV._CRS) && CondRefOf (\_SB.PC00.LPC0.ECDV._GPE) && !CondRefOf (\_SB.PC00.LPC0.ECDV._STA)) + + If ((ObjectType (\_SB.PC00.LPC0.ECDV) == 0x06)) { - Scope (\_SB.PC00.LPC0.ECDV) + If ((((CondRefOf (\_SB.PC00.LPC0.ECDV._HID) && CondRefOf (\_SB.PC00.LPC0.ECDV._CRS)) && CondRefOf (\_SB.PC00.LPC0.ECDV._GPE + )) && !CondRefOf (\_SB.PC00.LPC0.ECDV._STA))) { - Method (_STA, 0, NotSerialized) // _STA: Status + Scope (\_SB.PC00.LPC0.ECDV) { - If (_OSI ("Darwin")) + Method (_STA, 0, NotSerialized) // _STA: Status { - Return (0) - } - Else - { - Return (0x0F) + If (_OSI ("Darwin")) + { + Return (Zero) + } + Else + { + Return (0x0F) + } } } } } - If ((CondRefOf (\_SB.PC00.LPC0.PGEC)) && CondRefOf (\_SB.PC00.LPC0.PGEC._HID) && CondRefOf (\_SB.PC00.LPC0.PGEC._CRS) && CondRefOf (\_SB.PC00.LPC0.PGEC._GPE) && !CondRefOf (\_SB.PC00.LPC0.PGEC._STA)) + + If ((ObjectType (\_SB.PC00.LPC0.PGEC) == 0x06)) { - Scope (\_SB.PC00.LPC0.PGEC) + If (((((CondRefOf (\_SB.PC00.LPC0.PGEC._HID)) && CondRefOf ( + \_SB.PC00.LPC0.PGEC._CRS)) && CondRefOf (\_SB.PC00.LPC0.PGEC._GPE)) && !CondRefOf (\_SB.PC00.LPC0.PGEC._STA))) { - Method (_STA, 0, NotSerialized) // _STA: Status + Scope (\_SB.PC00.LPC0.PGEC) { - If (_OSI ("Darwin")) + Method (_STA, 0, NotSerialized) // _STA: Status { - Return (0) - } - Else - { - Return (0x0F) + If (_OSI ("Darwin")) + { + Return (Zero) + } + Else + { + Return (0x0F) + } } } } diff --git a/extra-files/SSDT-EC-USBX-DESKTOP.aml b/extra-files/SSDT-EC-USBX-DESKTOP.aml index 2b6643ba9844c7bd30585ee4caf9b7cf9ca94845..c458efa1dde849e850af22bfee88d6352236f214 100644 GIT binary patch literal 5533 zcmb7|-%b-j6vjsjq=1BqkZ8Q|(mTe)7if1IScA0b);|d(6B2uYAd*@_yyXE5k!zEZ z^znQM=bYniw>#f4&h7c;%=zude6w5fJRSbpG3MdZbTB;3+WEInlWt;+X&I9p4i8qB zpS_qSFU`*JZo}mr*H1E=cLsYaR9UK4x`}hBYC(11brZBUeIHi)dw z!ue9I&!=iQU)I*=Qx(pyJ(FMOpQ!%)QU&uJobPu4^BtUTgXgz!zORD$7S8u;!F*ev zZ>@i>h51sc&o8Qr^QBs!U#wl6FIAa8&DQUJfD^a2GVQJ2-rgQ<9q%sJkE7eqQiGLb zkSoewziWQtrhM2oEej~NpF7f~o358<8|lgT`t-ug%>B}AZ4;AQ_YZRGG;*&fC8yJ^l9PzZS%KuNU~-lqIVrK^lmL~SL`=>K zBxePavjoXWi6N)ElkNmaUWg%isRZPu5|WovKwc>E7NcCqA?4b^jw6iO(6e8XE&6ilur zl$#>S`MX{tXAzzjQIO}NKys1LIcFuFTu-RqP)VpL3b~e0X;R3e6Ux7jRL?n5=(KPf zJT0PN&((x-Q@rPTLcK{!LPb$L*WRJhq<9|pmFq7F{++3Mt|pY*u;<)^Jy#RT+x@@i z#qU=54xNkjgjSTA=M|++UXf~^&y{#`n9yRwFrgJiAqNSqG%4gU36^bu^qTMT&c~)}rvtOyX}UCj zyEI+B`)p>98xI<@t=>v=x*)D-FSjrW~FAC4r^D!eh zNb>e)-;8Z1Md74s9DdJdgQ`*}DodK8c0L5-uW_N3Kfw1;Vm{WOo(3TP`@ z7SBfDQq(HpzKv~UPNnjzf;)u~F