Skip to content

Commit

Permalink
fixed some problems and updated oc version, details see readme
Browse files Browse the repository at this point in the history
  • Loading branch information
t-shao committed May 18, 2021
1 parent b9b303f commit dad6cd0
Show file tree
Hide file tree
Showing 645 changed files with 11,404 additions and 869 deletions.
Binary file modified .DS_Store
Binary file not shown.
Binary file modified EFI/.DS_Store
Binary file not shown.
Binary file modified EFI/BOOT/BOOTx64.efi
Binary file not shown.
Binary file modified EFI/OC/.DS_Store
Binary file not shown.
Binary file added EFI/OC/ACPI/SSDT-EC-USBX.aml
Binary file not shown.
Binary file modified EFI/OC/ACPI/SSDT-PNLF.aml
Binary file not shown.
Binary file removed EFI/OC/Bootstrap/Bootstrap.efi
Binary file not shown.
Binary file added EFI/OC/Docs/.DS_Store
Binary file not shown.
Binary file added EFI/OC/Docs/AcpiSamples/.DS_Store
Binary file not shown.
Binary file added EFI/OC/Docs/AcpiSamples/Binaries/SSDT-ALS0.aml
Binary file not shown.
Binary file added EFI/OC/Docs/AcpiSamples/Binaries/SSDT-AWAC.aml
Binary file not shown.
Binary file added EFI/OC/Docs/AcpiSamples/Binaries/SSDT-BRG0.aml
Binary file not shown.
Binary file added EFI/OC/Docs/AcpiSamples/Binaries/SSDT-EC-USBX.aml
Binary file not shown.
Binary file added EFI/OC/Docs/AcpiSamples/Binaries/SSDT-EC.aml
Binary file not shown.
Binary file added EFI/OC/Docs/AcpiSamples/Binaries/SSDT-EHCx_OFF.aml
Binary file not shown.
Binary file added EFI/OC/Docs/AcpiSamples/Binaries/SSDT-IMEI.aml
Binary file not shown.
Binary file added EFI/OC/Docs/AcpiSamples/Binaries/SSDT-PLUG.aml
Binary file not shown.
Binary file added EFI/OC/Docs/AcpiSamples/Binaries/SSDT-PMC.aml
Binary file not shown.
Binary file added EFI/OC/Docs/AcpiSamples/Binaries/SSDT-PNLF.aml
Binary file not shown.
Binary file added EFI/OC/Docs/AcpiSamples/Binaries/SSDT-PNLFCFL.aml
Binary file not shown.
Binary file added EFI/OC/Docs/AcpiSamples/Binaries/SSDT-RTC0-RANGE.aml
Binary file not shown.
Binary file added EFI/OC/Docs/AcpiSamples/Binaries/SSDT-RTC0.aml
Binary file not shown.
Binary file added EFI/OC/Docs/AcpiSamples/Binaries/SSDT-SBUS-MCHC.aml
Binary file not shown.
Binary file added EFI/OC/Docs/AcpiSamples/Binaries/SSDT-UNC.aml
Binary file not shown.
36 changes: 36 additions & 0 deletions EFI/OC/Docs/AcpiSamples/Source/SSDT-ALS0.dsl
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/*
* Starting with macOS 10.15 Ambient Light Sensor presence is required for backlight functioning.
* Here we create an Ambient Light Sensor ACPI Device, which can be used by SMCLightSensor kext
* to report either dummy (when no device is present) or valid values through SMC interface.
*/
DefinitionBlock ("", "SSDT", 2, "ACDT", "ALS0", 0x00000000)
{
Scope (_SB)
{
Device (ALS0)
{
Name (_HID, "ACPI0008" /* Ambient Light Sensor Device */) // _HID: Hardware ID
Name (_CID, "smc-als") // _CID: Compatible ID
Name (_ALI, 0x012C) // _ALI: Ambient Light Illuminance
Name (_ALR, Package (0x01) // _ALR: Ambient Light Response
{
Package (0x02)
{
0x64,
0x012C
}
})
Method (_STA, 0, NotSerialized) // _STA: Status
{
If (_OSI ("Darwin"))
{
Return (0x0F)
}
Else
{
Return (Zero)
}
}
}
}
}
25 changes: 25 additions & 0 deletions EFI/OC/Docs/AcpiSamples/Source/SSDT-AWAC.dsl
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/*
* For 300-series only. If you can't force enable Legacy RTC in BIOS GUI.
* macOS does yet not support AWAC, so we have to force enable RTC. Do not use RTC ACPI patch.
*
* The Time and Alarm device provides an alternative to the real time clock (RTC), which is defined as a fixed feature hardware device.
* The wake timers allow the system to transition from the S3 (or optionally S4/S5) state to S0 state after a time period elapses.
* In comparison with the Real Time Clock (RTC) Alarm, the Time and Alarm device provides a larger scale of flexibility in the operation of the wake timers,
* and allows the implementation of the time source to be abstracted from the OSPM.
*/

DefinitionBlock ("", "SSDT", 2, "ACDT", "AWAC", 0x00000000)
{
External (STAS, IntObj)

Scope (\)
{
Method (_INI, 0, NotSerialized) // _INI: Initialize
{
If (_OSI ("Darwin"))
{
STAS = One
}
}
}
}
34 changes: 34 additions & 0 deletions EFI/OC/Docs/AcpiSamples/Source/SSDT-BRG0.dsl
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/*
* This table provides an example of creating a missing ACPI device
* to ensure early DeviceProperty application. In this example
* a GPU device is created for a platform having an extra PCI
* bridge in the path - PCI0.PEG0.PEGP.BRG0.GFX0:
* PciRoot(0x0)/Pci(0x1,0x0)/Pci(0x0,0x0)/Pci(0x0,0x0)/Pci(0x0,0x0)
* Such tables are particularly relevant for macOS 11.0 and newer.
*/

DefinitionBlock ("", "SSDT", 2, "ACDT", "BRG0", 0x00000000)
{
External (_SB_.PCI0.PEG0.PEGP, DeviceObj)

Scope (\_SB.PCI0.PEG0.PEGP)
{
/*
* This is a PCI bridge device present on PEGP.
* Normally seen as pci-bridge in I/O Registry.
*/
Device (BRG0)
{
Name (_ADR, Zero)

/*
* This is an actual GPU device present on the bridge.
* Normally seen as display in I/O Registry.
*/
Device (GFX0)
{
Name (_ADR, Zero) // _ADR: Address
}
}
}
}
115 changes: 115 additions & 0 deletions EFI/OC/Docs/AcpiSamples/Source/SSDT-EC-USBX.dsl
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
/*
* AppleUsbPower compatibility table for Skylake+.
*
* Be warned that power supply values can be different
* for different systems. Depending on the configuration
* these values must match injected IOKitPersonalities
* for com.apple.driver.AppleUSBMergeNub. iPad remains
* being the most reliable device for testing USB port
* charging support.
*
* Try NOT to rename EC0, H_EC, etc. to EC.
* These devices are incompatible with macOS and may break
* at any time. AppleACPIEC kext must NOT load on desktops.
* See the disable code below.
*
* While on some laptops, this kext is essential to access EC
* region for battery status etc. Please ignore EC related
* patches under the circumstance.
*
* Reference USB: https://applelife.ru/posts/550233
* Reference EC: https://applelife.ru/posts/807985
*/
DefinitionBlock ("", "SSDT", 2, "ACDT", "SsdtEC", 0x00001000)
{
External (_SB_.PCI0.LPCB, DeviceObj)

/*
* Uncomment replacing EC0 with your own value in case your
* motherboard has an existing embedded controller of PNP0C09 type.
*
* While renaming EC0 to EC might potentially work initially,
* it connects an incompatible driver (AppleACPIEC) to your hardware.
* This can make your system unbootable at any time or hide bugs that
* could trigger randomly.
*/

/**
External (_SB_.PCI0.LPCB.EC0, DeviceObj)
Scope (\_SB.PCI0.LPCB.EC0)
{
Method (_STA, 0, NotSerialized) // _STA: Status
{
If (_OSI ("Darwin"))
{
Return (0)
}
Else
{
Return (0x0F)
}
}
}
**/

Scope (\_SB)
{
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
})
}
Method (_STA, 0, NotSerialized) // _STA: Status
{
If (_OSI ("Darwin"))
{
Return (0x0F)
}
Else
{
Return (Zero)
}
}
}
}

Scope (\_SB.PCI0.LPCB)
{
Device (EC)
{
Name (_HID, "ACID0001") // _HID: Hardware ID
Method (_STA, 0, NotSerialized) // _STA: Status
{
If (_OSI ("Darwin"))
{
Return (0x0F)
}
Else
{
Return (Zero)
}
}
}
}
}
73 changes: 73 additions & 0 deletions EFI/OC/Docs/AcpiSamples/Source/SSDT-EC.dsl
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
/*
* AppleUsbPower compatibility table for legacy hardware.
*
* Be warned that power supply values can be different
* for different systems. Depending on the configuration
* the values must be present in injected IOKitPersonalities
* for com.apple.driver.AppleUSBMergeNub. iPad remains being
* the most reliable device for testing USB port charging.
*
* Try NOT to rename EC0, H_EC, etc. to EC.
* These devices are incompatible with macOS and may break
* at any time. AppleACPIEC kext must NOT load on desktops.
* See the disable code below.
*
* While on some laptops, this kext is essential to access EC
* region for battery status etc. Please ignore EC related
* patches under the circumstance.
*
* Reference USB: https://applelife.ru/posts/550233
* Reference EC: https://applelife.ru/posts/807985
*/
DefinitionBlock ("", "SSDT", 2, "ACDT", "SsdtEC", 0x00001000)
{
External (_SB_.PCI0.LPCB, DeviceObj)

/*
* Uncomment replacing EC0 with your own value in case your
* motherboard has an existing embedded controller of PNP0C09 type.
*
* While renaming EC0 to EC might potentially work initially,
* it connects an incompatible driver (AppleACPIEC) to your hardware.
* This can make your system unbootable at any time or hide bugs that
* could trigger randomly.
*/

/**
External (_SB_.PCI0.LPCB.EC0, DeviceObj)
Scope (\_SB.PCI0.LPCB.EC0)
{
Method (_STA, 0, NotSerialized) // _STA: Status
{
If (_OSI ("Darwin"))
{
Return (0)
}
Else
{
Return (0x0F)
}
}
}
**/

Scope (\_SB.PCI0.LPCB)
{
Device (EC)
{
Name (_HID, "ACID0001") // _HID: Hardware ID
Method (_STA, 0, NotSerialized) // _STA: Status
{
If (_OSI ("Darwin"))
{
Return (0x0F)
}
Else
{
Return (Zero)
}
}
}
}
}
38 changes: 38 additions & 0 deletions EFI/OC/Docs/AcpiSamples/Source/SSDT-EHCx_OFF.dsl
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/*
* USB compatibility table for disable phantoms EHC1, EHC2.
*
* Attention!
* Only for 7,8,9-series chipsets and 10.11 and newer!
*
* To disable EHC1 and EHC2 - set an option "XHCI Mode" to "Enabled" in yours BIOS.
* If the "XHCI Mode" option is not available in yours BIOS or works incorrectly, then use this ACPI table.
* Disabling through BIOS is preferable whenever possible.
*
* WARN: for some motherboards you need to use either "EH1D = One" or "EH2D = One" but not both!
* This is because for some motherboards, device (EHC1 or EHC2) is used by macOS. Check the IOReg.
*/
DefinitionBlock ("", "SSDT", 2, "ACDT", "EHCx_OFF", 0x00001000)
{
Scope (\)
{
OperationRegion (RCRG, SystemMemory, 0xFED1F418, One)
Field (RCRG, DWordAcc, Lock, Preserve)
{
, 13,
EH2D, 1,
, 1,
EH1D, 1
}

Method (_INI, 0, NotSerialized) // _INI: Initialize
{
// In most cases this patch does benefit all operating systems,
// yet on select pre-Windows 10 it may cause issues.
// Remove If (_OSI ("Darwin")) in case you have none.
If (_OSI ("Darwin")) {
EH1D = One // Disable EHC1
EH2D = One // Disable EHC2
}
}
}
}
28 changes: 28 additions & 0 deletions EFI/OC/Docs/AcpiSamples/Source/SSDT-IMEI.dsl
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*
* Only necessary when no IMEI device (with any name) is present in the DSDT and a custom device-id
* is needed to be set via DeviceProperties (some Sandy Bridge or Ivy Bridge configurations).
*/
DefinitionBlock ("", "SSDT", 2, "ACDT", "IMEI", 0x00000000)
{
External (_SB_.PCI0, DeviceObj)

Scope (_SB.PCI0)
{
Device (IMEI)
{
Name (_ADR, 0x00160000) // _ADR: Address
Method (_STA, 0, NotSerialized) // _STA: Status
{
If (_OSI ("Darwin"))
{
Return (0x0F)
}
Else
{
Return (Zero)
}
}
}
}
}

Loading

0 comments on commit dad6cd0

Please sign in to comment.