-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
alex.xu
committed
Mar 31, 2020
1 parent
3b94b1c
commit 7623add
Showing
62 changed files
with
6,153 additions
and
350 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,4 +23,3 @@ DefinitionBlock ("", "SSDT", 2, "ACDT", "AWAC", 0x00000000) | |
} | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -98,4 +98,3 @@ DefinitionBlock ("", "SSDT", 2, "ACDT", "SsdtEC", 0x00001000) | |
} | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
/* | ||
* Intel 300-series PMC support for macOS | ||
* | ||
* Starting from Z390 chipsets PMC (D31:F2) is only available through MMIO. | ||
* Since there is no standard device for PMC in ACPI, Apple introduced its | ||
* own naming "APP9876" to access this device from AppleIntelPCHPMC driver. | ||
* To avoid confusion we disable this device for all other operating systems, | ||
* as they normally use another non-standard device with "PNP0C02" HID and | ||
* "PCHRESV" UID. | ||
* | ||
* On certain implementations, including APTIO V, PMC initialisation is | ||
* required for NVRAM access. Otherwise it will freeze in SMM mode. | ||
* The reason for this is rather unclear. Note, that PMC and SPI are | ||
* located in separate memory regions and PCHRESV maps both, yet only | ||
* PMC region is used by AppleIntelPCHPMC: | ||
* 0xFE000000~0xFE00FFFF - PMC MBAR | ||
* 0xFE010000~0xFE010FFF - SPI BAR0 | ||
* 0xFE020000~0xFE035FFF - SerialIo BAR in ACPI mode | ||
* | ||
* PMC device has nothing to do to LPC bus, but is added to its scope for | ||
* faster initialisation. If we add it to PCI0, where it normally exists, | ||
* it will start in the end of PCI configuration, which is too late for | ||
* NVRAM support. | ||
*/ | ||
DefinitionBlock ("", "SSDT", 2, "ACDT", "PMCR", 0x00001000) | ||
{ | ||
External (_SB_.PCI0.LPCB, DeviceObj) | ||
|
||
Scope (_SB.PCI0.LPCB) | ||
{ | ||
Device (PMCR) | ||
{ | ||
Name (_HID, EisaId ("APP9876")) // _HID: Hardware ID | ||
Method (_STA, 0, NotSerialized) // _STA: Status | ||
{ | ||
If (_OSI ("Darwin")) | ||
{ | ||
Return (0x0B) | ||
} | ||
Else | ||
{ | ||
Return (Zero) | ||
} | ||
} | ||
Name (_CRS, ResourceTemplate () // _CRS: Current Resource Settings | ||
{ | ||
Memory32Fixed (ReadWrite, | ||
0xFE000000, // Address Base | ||
0x00010000, // Address Length | ||
) | ||
}) | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,4 +36,4 @@ DefinitionBlock ("", "SSDT", 2, "ACDT", "RTC0", 0x00000000) | |
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -70,4 +70,3 @@ DefinitionBlock ("", "SSDT", 2, "ACDT", "MCHCSBUS", 0x00000000) | |
Return (Zero) | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Oops, something went wrong.