Add universal SSDT-EC

This commit is contained in:
Mykola Grymalyuk
2020-05-08 11:40:51 -06:00
parent d7e8dccb73
commit af7a267c85
5 changed files with 1142 additions and 8 deletions

View File

@@ -63,5 +63,4 @@ DefinitionBlock ("", "SSDT", 2, "DRTNIA", "AWAC", 0x00000000)
You can find a prebuilt of this here: [SSDT-AWAC.aml](https://github.com/dortania/Getting-Started-With-ACPI/blob/master/extra-files/SSDT-AWAC.aml)
## [Now you're ready to compile the SSDT!](/Manual/compile.md)

View File

@@ -3,23 +3,34 @@
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.
For desktops, you'll want to begin by grabbing either one of these uncompiled SSDT files:
## Quick Fix
* [SSDT-EC-USBX](https://github.com/acidanthera/OpenCorePkg/blob/master/Docs/AcpiSamples/SSDT-EC-USBX.dsl)
What quick fix refers to is a fancy little SSDT that actually determines what EC needs to be turned off and creates a fake EC. The problem with this SSDT is it has a lot of bloat and can result in extra time in booting, so for this guide we **highly** recommends creating your own SSDT.
For desktops, you can grab either one of these pre-compiled SSDT files:
* [SSDT-EC-USBX-DESKTOP](https://github.com/dortania/Getting-Started-With-ACPI/blob/master/extra-files/SSDT-EC-USBX-DESKTOP.aml)
* For Skylake and newer and all AMD systems
* [SSDT-EC](https://github.com/acidanthera/OpenCorePkg/blob/master/Docs/AcpiSamples/SSDT-EC.dsl)
* [SSDT-EC-DESKTOP](https://github.com/dortania/Getting-Started-With-ACPI/blob/master/extra-files/SSDT-EC-DESKTOP.aml)
* For Broadwell and older
For laptops, you'll can actually use the pre-builts:
For laptops, you'll can use one of these 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.
## Proper Fix
Desktops however will need to follow below on creating a proper SSDT.
To properly patch your EC, we're gonna need some 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
And with these 2, you can continue below
### Fixing the Path
@@ -64,7 +75,7 @@ If you are having issues finding the Scope, you can use the below Hardware IDs o
**Make sure that you do not rename `Device (EC)`. This is what macOS Catalina looks for to boot!**
**Desktop users, continue down below to disabling your actual EC**
**Desktop users, continue down below to disabling your actual EC. Laptops should not diable their EC**. Laptop users should follow [What happens if no `PNP0C09` show up](#what-happens-if-no-pnp0c09-show-up)
### Disabling real EC (Desktops only)

View File

@@ -0,0 +1,549 @@
/*
* What this mess of an SSDT tries to accomplish is this:
* - Find valid ECs and disable them, they will have the following properties:
* - _HID
* - _CRS
* - _GPE
* - Create a new fake EC to let macOS play with
* - Create a USBX device for Skylake and newer
*/
DefinitionBlock ("", "SSDT", 2, "DRTNIA", "SsdtEC", 0x00001000)
{
// AMD Trash and glorious Core2 hardware
External (_SB_.PCI0.SBRG, DeviceObj)
External (_SB_.PCI0.SBRG.EC, DeviceObj)
External (_SB_.PCI0.SBRG.EC0, DeviceObj)
External (_SB_.PCI0.SBRG.H_EC, DeviceObj)
External (_SB_.PCI0.SBRG.ECDV, DeviceObj)
External (_SB_.PCI0.SBRG.PGEC, DeviceObj)
// Consumer Desktop
External (_SB_.PCI0.LPCB, DeviceObj)
External (_SB_.PCI0.LPCB.EC, DeviceObj)
External (_SB_.PCI0.LPCB.EC0, DeviceObj)
External (_SB_.PCI0.LPCB.H_EC, DeviceObj)
External (_SB_.PCI0.LPCB.ECDV, DeviceObj)
External (_SB_.PCI0.LPCB.PGEC, DeviceObj)
// Other laptop variations(I'm sure Lenovo uses it in some weird desktop)
External (_SB_.PCI0.LPC, DeviceObj)
External (_SB_.PCI0.LPC.EC, DeviceObj)
External (_SB_.PCI0.LPC.EC0, DeviceObj)
External (_SB_.PCI0.LPC.H_EC, DeviceObj)
External (_SB_.PCI0.LPC.ECDV, DeviceObj)
External (_SB_.PCI0.LPC.PGEC, DeviceObj)
// Cursed X79 and X99
External (_SB_.PCI0.LPC0, DeviceObj)
External (_SB_.PCI0.LPC0.EC, DeviceObj)
External (_SB_.PCI0.LPC0.EC0, DeviceObj)
External (_SB_.PCI0.LPC0.H_EC, DeviceObj)
External (_SB_.PCI0.LPC0.ECDV, DeviceObj)
External (_SB_.PCI0.LPC0.PGEC, DeviceObj)
// Even more cursed X299
External (_SB_.PC00.LPC0, DeviceObj)
External (_SB_.PC00.LPC0.EC, DeviceObj)
External (_SB_.PC00.LPC0.EC0, DeviceObj)
External (_SB_.PC00.LPC0.H_EC, DeviceObj)
External (_SB_.PC00.LPC0.ECDV, DeviceObj)
External (_SB_.PC00.LPC0.PGEC, DeviceObj)
// 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))
{
Scope (\_SB.PCI0.SBRG.EC)
{
Method (_STA, 0, NotSerialized) // _STA: Status
{
If (_OSI ("Darwin"))
{
Return (0)
}
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))
{
Scope (\_SB.PCI0.SBRG.EC0)
{
Method (_STA, 0, NotSerialized) // _STA: Status
{
If (_OSI ("Darwin"))
{
Return (0)
}
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))
{
Scope (\_SB.PCI0.SBRG.H_EC)
{
Method (_STA, 0, NotSerialized) // _STA: Status
{
If (_OSI ("Darwin"))
{
Return (0)
}
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))
{
Scope (\_SB.PCI0.SBRG.ECDV)
{
Method (_STA, 0, NotSerialized) // _STA: Status
{
If (_OSI ("Darwin"))
{
Return (0)
}
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))
{
Scope (\_SB.PCI0.SBRG.PGEC)
{
Method (_STA, 0, NotSerialized) // _STA: Status
{
If (_OSI ("Darwin"))
{
Return (0)
}
Else
{
Return (0x0F)
}
}
}
}
// 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))
{
Scope (\_SB.PCI0.LPCB.EC)
{
Method (_STA, 0, NotSerialized) // _STA: Status
{
If (_OSI ("Darwin"))
{
Return (0)
}
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))
{
Scope (\_SB.PCI0.LPCB.EC0)
{
Method (_STA, 0, NotSerialized) // _STA: Status
{
If (_OSI ("Darwin"))
{
Return (0)
}
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))
{
Scope (\_SB.PCI0.LPCB.H_EC)
{
Method (_STA, 0, NotSerialized) // _STA: Status
{
If (_OSI ("Darwin"))
{
Return (0)
}
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))
{
Scope (\_SB.PCI0.LPCB.ECDV)
{
Method (_STA, 0, NotSerialized) // _STA: Status
{
If (_OSI ("Darwin"))
{
Return (0)
}
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))
{
Scope (\_SB.PCI0.LPCB.PGEC)
{
Method (_STA, 0, NotSerialized) // _STA: Status
{
If (_OSI ("Darwin"))
{
Return (0)
}
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))
{
Scope (\_SB.PCI0.LPC.EC)
{
Method (_STA, 0, NotSerialized) // _STA: Status
{
If (_OSI ("Darwin"))
{
Return (0)
}
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))
{
Scope (\_SB.PCI0.LPC.EC0)
{
Method (_STA, 0, NotSerialized) // _STA: Status
{
If (_OSI ("Darwin"))
{
Return (0)
}
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))
{
Scope (\_SB.PCI0.LPC.H_EC)
{
Method (_STA, 0, NotSerialized) // _STA: Status
{
If (_OSI ("Darwin"))
{
Return (0)
}
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))
{
Scope (\_SB.PCI0.LPC.ECDV)
{
Method (_STA, 0, NotSerialized) // _STA: Status
{
If (_OSI ("Darwin"))
{
Return (0)
}
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))
{
Scope (\_SB.PCI0.LPC.PGEC)
{
Method (_STA, 0, NotSerialized) // _STA: Status
{
If (_OSI ("Darwin"))
{
Return (0)
}
Else
{
Return (0x0F)
}
}
}
}
// 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))
{
Scope (\_SB.PCI0.LPC0.EC)
{
Method (_STA, 0, NotSerialized) // _STA: Status
{
If (_OSI ("Darwin"))
{
Return (0)
}
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))
{
Scope (\_SB.PCI0.LPC0.EC0)
{
Method (_STA, 0, NotSerialized) // _STA: Status
{
If (_OSI ("Darwin"))
{
Return (0)
}
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))
{
Scope (\_SB.PCI0.LPC0.H_EC)
{
Method (_STA, 0, NotSerialized) // _STA: Status
{
If (_OSI ("Darwin"))
{
Return (0)
}
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))
{
Scope (\_SB.PCI0.LPC0.ECDV)
{
Method (_STA, 0, NotSerialized) // _STA: Status
{
If (_OSI ("Darwin"))
{
Return (0)
}
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))
{
Scope (\_SB.PCI0.LPC0.PGEC)
{
Method (_STA, 0, NotSerialized) // _STA: Status
{
If (_OSI ("Darwin"))
{
Return (0)
}
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))
{
Scope (\_SB.PC00.LPC0.EC)
{
Method (_STA, 0, NotSerialized) // _STA: Status
{
If (_OSI ("Darwin"))
{
Return (0)
}
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))
{
Scope (\_SB.PC00.LPC0.EC0)
{
Method (_STA, 0, NotSerialized) // _STA: Status
{
If (_OSI ("Darwin"))
{
Return (0)
}
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))
{
Scope (\_SB.PC00.LPC0.H_EC)
{
Method (_STA, 0, NotSerialized) // _STA: Status
{
If (_OSI ("Darwin"))
{
Return (0)
}
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))
{
Scope (\_SB.PC00.LPC0.ECDV)
{
Method (_STA, 0, NotSerialized) // _STA: Status
{
If (_OSI ("Darwin"))
{
Return (0)
}
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))
{
Scope (\_SB.PC00.LPC0.PGEC)
{
Method (_STA, 0, NotSerialized) // _STA: Status
{
If (_OSI ("Darwin"))
{
Return (0)
}
Else
{
Return (0x0F)
}
}
}
}
// And finally, create our fake EC and USBX
Scope (\_SB)
{
Device (EC) // The EC is supposed to be located after the LPC device but doesn't actually matter since this is just a dummy device
{
Name (_HID, "ACID0001") // _HID: Hardware ID
Method (_STA, 0, NotSerialized) // _STA: Status
{
If (_OSI ("Darwin"))
{
Return (0x0F)
}
Else
{
Return (Zero)
}
}
}
}
}

Binary file not shown.

View File

@@ -0,0 +1,575 @@
/*
* What this mess of an SSDT tries to accomplish is this:
* - Find valid ECs and disable them, they will have the following properties:
* - _HID
* - _CRS
* - _GPE
* - Create a new fake EC to let macOS play with
* - Create a USBX device for Skylake and newer
*/
DefinitionBlock ("", "SSDT", 2, "DRTNIA", "SsdtEC", 0x00001000)
{
// AMD Trash and glorious Core2 hardware
External (_SB_.PCI0.SBRG, DeviceObj)
External (_SB_.PCI0.SBRG.EC, DeviceObj)
External (_SB_.PCI0.SBRG.EC0, DeviceObj)
External (_SB_.PCI0.SBRG.H_EC, DeviceObj)
External (_SB_.PCI0.SBRG.ECDV, DeviceObj)
External (_SB_.PCI0.SBRG.PGEC, DeviceObj)
// Consumer Desktop
External (_SB_.PCI0.LPCB, DeviceObj)
External (_SB_.PCI0.LPCB.EC, DeviceObj)
External (_SB_.PCI0.LPCB.EC0, DeviceObj)
External (_SB_.PCI0.LPCB.H_EC, DeviceObj)
External (_SB_.PCI0.LPCB.ECDV, DeviceObj)
External (_SB_.PCI0.LPCB.PGEC, DeviceObj)
// Other laptop variations(I'm sure Lenovo uses it in some weird desktop)
External (_SB_.PCI0.LPC, DeviceObj)
External (_SB_.PCI0.LPC.EC, DeviceObj)
External (_SB_.PCI0.LPC.EC0, DeviceObj)
External (_SB_.PCI0.LPC.H_EC, DeviceObj)
External (_SB_.PCI0.LPC.ECDV, DeviceObj)
External (_SB_.PCI0.LPC.PGEC, DeviceObj)
// Cursed X79 and X99
External (_SB_.PCI0.LPC0, DeviceObj)
External (_SB_.PCI0.LPC0.EC, DeviceObj)
External (_SB_.PCI0.LPC0.EC0, DeviceObj)
External (_SB_.PCI0.LPC0.H_EC, DeviceObj)
External (_SB_.PCI0.LPC0.ECDV, DeviceObj)
External (_SB_.PCI0.LPC0.PGEC, DeviceObj)
// Even more cursed X299
External (_SB_.PC00.LPC0, DeviceObj)
External (_SB_.PC00.LPC0.EC, DeviceObj)
External (_SB_.PC00.LPC0.EC0, DeviceObj)
External (_SB_.PC00.LPC0.H_EC, DeviceObj)
External (_SB_.PC00.LPC0.ECDV, DeviceObj)
External (_SB_.PC00.LPC0.PGEC, DeviceObj)
// 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))
{
Scope (\_SB.PCI0.SBRG.EC)
{
Method (_STA, 0, NotSerialized) // _STA: Status
{
If (_OSI ("Darwin"))
{
Return (0)
}
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))
{
Scope (\_SB.PCI0.SBRG.EC0)
{
Method (_STA, 0, NotSerialized) // _STA: Status
{
If (_OSI ("Darwin"))
{
Return (0)
}
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))
{
Scope (\_SB.PCI0.SBRG.H_EC)
{
Method (_STA, 0, NotSerialized) // _STA: Status
{
If (_OSI ("Darwin"))
{
Return (0)
}
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))
{
Scope (\_SB.PCI0.SBRG.ECDV)
{
Method (_STA, 0, NotSerialized) // _STA: Status
{
If (_OSI ("Darwin"))
{
Return (0)
}
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))
{
Scope (\_SB.PCI0.SBRG.PGEC)
{
Method (_STA, 0, NotSerialized) // _STA: Status
{
If (_OSI ("Darwin"))
{
Return (0)
}
Else
{
Return (0x0F)
}
}
}
}
// 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))
{
Scope (\_SB.PCI0.LPCB.EC)
{
Method (_STA, 0, NotSerialized) // _STA: Status
{
If (_OSI ("Darwin"))
{
Return (0)
}
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))
{
Scope (\_SB.PCI0.LPCB.EC0)
{
Method (_STA, 0, NotSerialized) // _STA: Status
{
If (_OSI ("Darwin"))
{
Return (0)
}
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))
{
Scope (\_SB.PCI0.LPCB.H_EC)
{
Method (_STA, 0, NotSerialized) // _STA: Status
{
If (_OSI ("Darwin"))
{
Return (0)
}
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))
{
Scope (\_SB.PCI0.LPCB.ECDV)
{
Method (_STA, 0, NotSerialized) // _STA: Status
{
If (_OSI ("Darwin"))
{
Return (0)
}
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))
{
Scope (\_SB.PCI0.LPCB.PGEC)
{
Method (_STA, 0, NotSerialized) // _STA: Status
{
If (_OSI ("Darwin"))
{
Return (0)
}
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))
{
Scope (\_SB.PCI0.LPC.EC)
{
Method (_STA, 0, NotSerialized) // _STA: Status
{
If (_OSI ("Darwin"))
{
Return (0)
}
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))
{
Scope (\_SB.PCI0.LPC.EC0)
{
Method (_STA, 0, NotSerialized) // _STA: Status
{
If (_OSI ("Darwin"))
{
Return (0)
}
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))
{
Scope (\_SB.PCI0.LPC.H_EC)
{
Method (_STA, 0, NotSerialized) // _STA: Status
{
If (_OSI ("Darwin"))
{
Return (0)
}
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))
{
Scope (\_SB.PCI0.LPC.ECDV)
{
Method (_STA, 0, NotSerialized) // _STA: Status
{
If (_OSI ("Darwin"))
{
Return (0)
}
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))
{
Scope (\_SB.PCI0.LPC.PGEC)
{
Method (_STA, 0, NotSerialized) // _STA: Status
{
If (_OSI ("Darwin"))
{
Return (0)
}
Else
{
Return (0x0F)
}
}
}
}
// 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))
{
Scope (\_SB.PCI0.LPC0.EC)
{
Method (_STA, 0, NotSerialized) // _STA: Status
{
If (_OSI ("Darwin"))
{
Return (0)
}
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))
{
Scope (\_SB.PCI0.LPC0.EC0)
{
Method (_STA, 0, NotSerialized) // _STA: Status
{
If (_OSI ("Darwin"))
{
Return (0)
}
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))
{
Scope (\_SB.PCI0.LPC0.H_EC)
{
Method (_STA, 0, NotSerialized) // _STA: Status
{
If (_OSI ("Darwin"))
{
Return (0)
}
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))
{
Scope (\_SB.PCI0.LPC0.ECDV)
{
Method (_STA, 0, NotSerialized) // _STA: Status
{
If (_OSI ("Darwin"))
{
Return (0)
}
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))
{
Scope (\_SB.PCI0.LPC0.PGEC)
{
Method (_STA, 0, NotSerialized) // _STA: Status
{
If (_OSI ("Darwin"))
{
Return (0)
}
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))
{
Scope (\_SB.PC00.LPC0.EC)
{
Method (_STA, 0, NotSerialized) // _STA: Status
{
If (_OSI ("Darwin"))
{
Return (0)
}
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))
{
Scope (\_SB.PC00.LPC0.EC0)
{
Method (_STA, 0, NotSerialized) // _STA: Status
{
If (_OSI ("Darwin"))
{
Return (0)
}
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))
{
Scope (\_SB.PC00.LPC0.H_EC)
{
Method (_STA, 0, NotSerialized) // _STA: Status
{
If (_OSI ("Darwin"))
{
Return (0)
}
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))
{
Scope (\_SB.PC00.LPC0.ECDV)
{
Method (_STA, 0, NotSerialized) // _STA: Status
{
If (_OSI ("Darwin"))
{
Return (0)
}
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))
{
Scope (\_SB.PC00.LPC0.PGEC)
{
Method (_STA, 0, NotSerialized) // _STA: Status
{
If (_OSI ("Darwin"))
{
Return (0)
}
Else
{
Return (0x0F)
}
}
}
}
// And finally, create our fake EC and USBX
Scope (\_SB)
{
Device (EC) // The EC is supposed to be located after the LPC device but doesn't actually matter since this is just a dummy device
{
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
})
}
}
}
}