mirror of
https://github.com/tylernguyen/x1c6-hackintosh.git
synced 2025-02-05 09:33:13 -06:00
ACPI patches upgrade and further keyboard ACPI patches
This commit is contained in:
parent
ec62341234
commit
2f5361d208
55 changed files with 1017 additions and 1131 deletions
BIN
EFI-OpenCore/EFI/OC/ACPI/SSDT-ALS0.aml
Executable file
BIN
EFI-OpenCore/EFI/OC/ACPI/SSDT-ALS0.aml
Executable file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
EFI-OpenCore/EFI/OC/ACPI/SSDT-GPRW.aml
Executable file
BIN
EFI-OpenCore/EFI/OC/ACPI/SSDT-GPRW.aml
Executable file
Binary file not shown.
Binary file not shown.
BIN
EFI-OpenCore/EFI/OC/ACPI/SSDT-Keyboard.aml
Executable file
BIN
EFI-OpenCore/EFI/OC/ACPI/SSDT-Keyboard.aml
Executable file
Binary file not shown.
Binary file not shown.
BIN
EFI-OpenCore/EFI/OC/ACPI/SSDT-OCBAT0-TP_tx80_x1c6th.aml
Executable file
BIN
EFI-OpenCore/EFI/OC/ACPI/SSDT-OCBAT0-TP_tx80_x1c6th.aml
Executable file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
EFI-OpenCore/EFI/OC/ACPI/SSDT-PNLF-SKL_KBL.aml
Executable file
BIN
EFI-OpenCore/EFI/OC/ACPI/SSDT-PNLF-SKL_KBL.aml
Executable file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -12,7 +12,7 @@
|
|||
<key>Enabled</key>
|
||||
<true/>
|
||||
<key>Path</key>
|
||||
<string>SSDT-OCBAT0-TP_re80_tx70-80_x1c5th-6th_s12017_p51.aml</string>
|
||||
<string>SSDT-OCBAT0-TP_tx80_x1c6th.aml</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Comment</key>
|
||||
|
@ -28,7 +28,15 @@
|
|||
<key>Enabled</key>
|
||||
<true/>
|
||||
<key>Path</key>
|
||||
<string>SSDT-PNLF.aml</string>
|
||||
<string>SSDT-PNLF-SKL_KBL.aml</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Comment</key>
|
||||
<string>fake als</string>
|
||||
<key>Enabled</key>
|
||||
<true/>
|
||||
<key>Path</key>
|
||||
<string>SSDT-ALS0.aml</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Comment</key>
|
||||
|
@ -44,7 +52,7 @@
|
|||
<key>Enabled</key>
|
||||
<true/>
|
||||
<key>Path</key>
|
||||
<string>SSDT-Keyboard-X1C6.aml</string>
|
||||
<string>SSDT-Keyboard.aml</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Comment</key>
|
||||
|
@ -102,6 +110,14 @@
|
|||
<key>Path</key>
|
||||
<string>SSDT-PWRB.aml</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Comment</key>
|
||||
<string>GPRW 0D/6D Patch</string>
|
||||
<key>Enabled</key>
|
||||
<true/>
|
||||
<key>Path</key>
|
||||
<string>SSDT-GPRW.aml</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Comment</key>
|
||||
<string>DTPG</string>
|
||||
|
@ -123,6 +139,74 @@
|
|||
<array/>
|
||||
<key>Patch</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>Comment</key>
|
||||
<string>Name6D-03 to 00</string>
|
||||
<key>Count</key>
|
||||
<integer>0</integer>
|
||||
<key>Enabled</key>
|
||||
<true/>
|
||||
<key>Find</key>
|
||||
<data>
|
||||
Cm0KAw==
|
||||
</data>
|
||||
<key>Limit</key>
|
||||
<integer>0</integer>
|
||||
<key>Mask</key>
|
||||
<data>
|
||||
</data>
|
||||
<key>OemTableId</key>
|
||||
<data>
|
||||
</data>
|
||||
<key>Replace</key>
|
||||
<data>
|
||||
Cm0KAA==
|
||||
</data>
|
||||
<key>ReplaceMask</key>
|
||||
<data>
|
||||
</data>
|
||||
<key>Skip</key>
|
||||
<integer>0</integer>
|
||||
<key>TableLength</key>
|
||||
<integer>0</integer>
|
||||
<key>TableSignature</key>
|
||||
<data>
|
||||
</data>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Comment</key>
|
||||
<string>Name6D-04 to 00</string>
|
||||
<key>Count</key>
|
||||
<integer>0</integer>
|
||||
<key>Enabled</key>
|
||||
<true/>
|
||||
<key>Find</key>
|
||||
<data>
|
||||
Cm0KBA==
|
||||
</data>
|
||||
<key>Limit</key>
|
||||
<integer>0</integer>
|
||||
<key>Mask</key>
|
||||
<data>
|
||||
</data>
|
||||
<key>OemTableId</key>
|
||||
<data>
|
||||
</data>
|
||||
<key>Replace</key>
|
||||
<data>
|
||||
Cm0KAA==
|
||||
</data>
|
||||
<key>ReplaceMask</key>
|
||||
<data>
|
||||
</data>
|
||||
<key>Skip</key>
|
||||
<integer>0</integer>
|
||||
<key>TableLength</key>
|
||||
<integer>0</integer>
|
||||
<key>TableSignature</key>
|
||||
<data>
|
||||
</data>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Comment</key>
|
||||
<string>TP-BAT:GBIF03 to XBIF03</string>
|
||||
|
@ -216,6 +300,40 @@
|
|||
<key>TableLength</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Comment</key>
|
||||
<string>TP-BAT:AJTP03 to XJTP03</string>
|
||||
<key>Count</key>
|
||||
<integer>0</integer>
|
||||
<key>Enabled</key>
|
||||
<true/>
|
||||
<key>Find</key>
|
||||
<data>
|
||||
QUpUUAM=
|
||||
</data>
|
||||
<key>Limit</key>
|
||||
<integer>0</integer>
|
||||
<key>Mask</key>
|
||||
<data>
|
||||
</data>
|
||||
<key>OemTableId</key>
|
||||
<data>
|
||||
</data>
|
||||
<key>Replace</key>
|
||||
<data>
|
||||
WEpUUAM=
|
||||
</data>
|
||||
<key>ReplaceMask</key>
|
||||
<data>
|
||||
</data>
|
||||
<key>Skip</key>
|
||||
<integer>0</integer>
|
||||
<key>TableLength</key>
|
||||
<integer>0</integer>
|
||||
<key>TableSignature</key>
|
||||
<data>
|
||||
</data>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Comment</key>
|
||||
<string>Mutex:MDGS=0</string>
|
||||
|
@ -570,143 +688,7 @@
|
|||
</dict>
|
||||
<dict>
|
||||
<key>Comment</key>
|
||||
<string>_Q13 to XQ13(FN+4)</string>
|
||||
<key>Count</key>
|
||||
<integer>1</integer>
|
||||
<key>Enabled</key>
|
||||
<true/>
|
||||
<key>Find</key>
|
||||
<data>
|
||||
X1ExMw==
|
||||
</data>
|
||||
<key>Limit</key>
|
||||
<integer>0</integer>
|
||||
<key>Mask</key>
|
||||
<data>
|
||||
</data>
|
||||
<key>OemTableId</key>
|
||||
<data>
|
||||
</data>
|
||||
<key>Replace</key>
|
||||
<data>
|
||||
WFExMw==
|
||||
</data>
|
||||
<key>ReplaceMask</key>
|
||||
<data>
|
||||
</data>
|
||||
<key>Skip</key>
|
||||
<integer>0</integer>
|
||||
<key>TableLength</key>
|
||||
<integer>0</integer>
|
||||
<key>TableSignature</key>
|
||||
<data>
|
||||
</data>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Comment</key>
|
||||
<string>_Q14 to XQ14(up)</string>
|
||||
<key>Count</key>
|
||||
<integer>1</integer>
|
||||
<key>Enabled</key>
|
||||
<true/>
|
||||
<key>Find</key>
|
||||
<data>
|
||||
X1ExNA==
|
||||
</data>
|
||||
<key>Limit</key>
|
||||
<integer>0</integer>
|
||||
<key>Mask</key>
|
||||
<data>
|
||||
</data>
|
||||
<key>OemTableId</key>
|
||||
<data>
|
||||
</data>
|
||||
<key>Replace</key>
|
||||
<data>
|
||||
WFExNA==
|
||||
</data>
|
||||
<key>ReplaceMask</key>
|
||||
<data>
|
||||
</data>
|
||||
<key>Skip</key>
|
||||
<integer>0</integer>
|
||||
<key>TableLength</key>
|
||||
<integer>0</integer>
|
||||
<key>TableSignature</key>
|
||||
<data>
|
||||
</data>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Comment</key>
|
||||
<string>_Q15 to XQ15(down)</string>
|
||||
<key>Count</key>
|
||||
<integer>1</integer>
|
||||
<key>Enabled</key>
|
||||
<true/>
|
||||
<key>Find</key>
|
||||
<data>
|
||||
X1ExNQ==
|
||||
</data>
|
||||
<key>Limit</key>
|
||||
<integer>0</integer>
|
||||
<key>Mask</key>
|
||||
<data>
|
||||
</data>
|
||||
<key>OemTableId</key>
|
||||
<data>
|
||||
</data>
|
||||
<key>Replace</key>
|
||||
<data>
|
||||
WFExNQ==
|
||||
</data>
|
||||
<key>ReplaceMask</key>
|
||||
<data>
|
||||
</data>
|
||||
<key>Skip</key>
|
||||
<integer>0</integer>
|
||||
<key>TableLength</key>
|
||||
<integer>0</integer>
|
||||
<key>TableSignature</key>
|
||||
<data>
|
||||
</data>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Comment</key>
|
||||
<string>_Q16 to XQ16(dualScreen)</string>
|
||||
<key>Count</key>
|
||||
<integer>1</integer>
|
||||
<key>Enabled</key>
|
||||
<true/>
|
||||
<key>Find</key>
|
||||
<data>
|
||||
X1ExNg==
|
||||
</data>
|
||||
<key>Limit</key>
|
||||
<integer>0</integer>
|
||||
<key>Mask</key>
|
||||
<data>
|
||||
</data>
|
||||
<key>OemTableId</key>
|
||||
<data>
|
||||
</data>
|
||||
<key>Replace</key>
|
||||
<data>
|
||||
WFExNg==
|
||||
</data>
|
||||
<key>ReplaceMask</key>
|
||||
<data>
|
||||
</data>
|
||||
<key>Skip</key>
|
||||
<integer>0</integer>
|
||||
<key>TableLength</key>
|
||||
<integer>0</integer>
|
||||
<key>TableSignature</key>
|
||||
<data>
|
||||
</data>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Comment</key>
|
||||
<string>_Q6A to XQ6A(Microphone)</string>
|
||||
<string>_Q6A to XQ6A (F4 - Microphone Mute)</string>
|
||||
<key>Count</key>
|
||||
<integer>1</integer>
|
||||
<key>Enabled</key>
|
||||
|
@ -740,7 +722,109 @@
|
|||
</dict>
|
||||
<dict>
|
||||
<key>Comment</key>
|
||||
<string>_Q64 to XQ64(Wireless)</string>
|
||||
<string>_Q15 to XQ15 (F5 - Brightness Down)</string>
|
||||
<key>Count</key>
|
||||
<integer>1</integer>
|
||||
<key>Enabled</key>
|
||||
<true/>
|
||||
<key>Find</key>
|
||||
<data>
|
||||
X1ExNQ==
|
||||
</data>
|
||||
<key>Limit</key>
|
||||
<integer>0</integer>
|
||||
<key>Mask</key>
|
||||
<data>
|
||||
</data>
|
||||
<key>OemTableId</key>
|
||||
<data>
|
||||
</data>
|
||||
<key>Replace</key>
|
||||
<data>
|
||||
WFExNQ==
|
||||
</data>
|
||||
<key>ReplaceMask</key>
|
||||
<data>
|
||||
</data>
|
||||
<key>Skip</key>
|
||||
<integer>0</integer>
|
||||
<key>TableLength</key>
|
||||
<integer>0</integer>
|
||||
<key>TableSignature</key>
|
||||
<data>
|
||||
</data>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Comment</key>
|
||||
<string>_Q14 to XQ14 (F6 - Brightness Up)</string>
|
||||
<key>Count</key>
|
||||
<integer>1</integer>
|
||||
<key>Enabled</key>
|
||||
<true/>
|
||||
<key>Find</key>
|
||||
<data>
|
||||
X1ExNA==
|
||||
</data>
|
||||
<key>Limit</key>
|
||||
<integer>0</integer>
|
||||
<key>Mask</key>
|
||||
<data>
|
||||
</data>
|
||||
<key>OemTableId</key>
|
||||
<data>
|
||||
</data>
|
||||
<key>Replace</key>
|
||||
<data>
|
||||
WFExNA==
|
||||
</data>
|
||||
<key>ReplaceMask</key>
|
||||
<data>
|
||||
</data>
|
||||
<key>Skip</key>
|
||||
<integer>0</integer>
|
||||
<key>TableLength</key>
|
||||
<integer>0</integer>
|
||||
<key>TableSignature</key>
|
||||
<data>
|
||||
</data>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Comment</key>
|
||||
<string>_Q16 to XQ16 (F7 - Dual Display)</string>
|
||||
<key>Count</key>
|
||||
<integer>1</integer>
|
||||
<key>Enabled</key>
|
||||
<true/>
|
||||
<key>Find</key>
|
||||
<data>
|
||||
X1ExNg==
|
||||
</data>
|
||||
<key>Limit</key>
|
||||
<integer>0</integer>
|
||||
<key>Mask</key>
|
||||
<data>
|
||||
</data>
|
||||
<key>OemTableId</key>
|
||||
<data>
|
||||
</data>
|
||||
<key>Replace</key>
|
||||
<data>
|
||||
WFExNg==
|
||||
</data>
|
||||
<key>ReplaceMask</key>
|
||||
<data>
|
||||
</data>
|
||||
<key>Skip</key>
|
||||
<integer>0</integer>
|
||||
<key>TableLength</key>
|
||||
<integer>0</integer>
|
||||
<key>TableSignature</key>
|
||||
<data>
|
||||
</data>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Comment</key>
|
||||
<string>_Q64 to XQ64 (F8 - Network)</string>
|
||||
<key>Count</key>
|
||||
<integer>1</integer>
|
||||
<key>Enabled</key>
|
||||
|
@ -774,7 +858,7 @@
|
|||
</dict>
|
||||
<dict>
|
||||
<key>Comment</key>
|
||||
<string>_Q66 to XQ66(Settings)</string>
|
||||
<string>_Q66 to XQ66 (F9 - Settings)</string>
|
||||
<key>Count</key>
|
||||
<integer>1</integer>
|
||||
<key>Enabled</key>
|
||||
|
@ -808,7 +892,7 @@
|
|||
</dict>
|
||||
<dict>
|
||||
<key>Comment</key>
|
||||
<string>_Q60 to XQ60(Bluetooth)</string>
|
||||
<string>_Q60 to XQ60 (F10 - Bluetooth)</string>
|
||||
<key>Count</key>
|
||||
<integer>1</integer>
|
||||
<key>Enabled</key>
|
||||
|
@ -842,7 +926,7 @@
|
|||
</dict>
|
||||
<dict>
|
||||
<key>Comment</key>
|
||||
<string>_Q61 to XQ61(Keyboard)</string>
|
||||
<string>_Q61 to XQ61 (F11 - Keyboard)</string>
|
||||
<key>Count</key>
|
||||
<integer>1</integer>
|
||||
<key>Enabled</key>
|
||||
|
@ -876,7 +960,7 @@
|
|||
</dict>
|
||||
<dict>
|
||||
<key>Comment</key>
|
||||
<string>_Q62 to XQ62(Star)</string>
|
||||
<string>_Q62 to XQ62 (F12 - Star)</string>
|
||||
<key>Count</key>
|
||||
<integer>1</integer>
|
||||
<key>Enabled</key>
|
||||
|
@ -908,40 +992,6 @@
|
|||
<data>
|
||||
</data>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Comment</key>
|
||||
<string>_Q65 to XQ65(CutScreen)</string>
|
||||
<key>Count</key>
|
||||
<integer>1</integer>
|
||||
<key>Enabled</key>
|
||||
<true/>
|
||||
<key>Find</key>
|
||||
<data>
|
||||
X1E2NQ==
|
||||
</data>
|
||||
<key>Limit</key>
|
||||
<integer>0</integer>
|
||||
<key>Mask</key>
|
||||
<data>
|
||||
</data>
|
||||
<key>OemTableId</key>
|
||||
<data>
|
||||
</data>
|
||||
<key>Replace</key>
|
||||
<data>
|
||||
WFE2NQ==
|
||||
</data>
|
||||
<key>ReplaceMask</key>
|
||||
<data>
|
||||
</data>
|
||||
<key>Skip</key>
|
||||
<integer>0</integer>
|
||||
<key>TableLength</key>
|
||||
<integer>0</integer>
|
||||
<key>TableSignature</key>
|
||||
<data>
|
||||
</data>
|
||||
</dict>
|
||||
</array>
|
||||
<key>Quirks</key>
|
||||
<dict>
|
||||
|
@ -1527,7 +1577,7 @@
|
|||
<key>7C436110-AB2A-4BBB-A880-FE41995C9F82</key>
|
||||
<dict>
|
||||
<key>boot-args</key>
|
||||
<string>keepsyms=1</string>
|
||||
<string>keepsyms=1 -igfxdump -igfxfbdump</string>
|
||||
<key>csr-active-config</key>
|
||||
<data>
|
||||
5wMAAA==
|
||||
|
|
|
@ -83,3 +83,6 @@ Why?: `PMCR`,` APP9876` missing in DSDT.
|
|||
|
||||
> ### SSDT-PWRB
|
||||
Why?: `PNP0C0C` missing in DSDT.
|
||||
|
||||
> ### SSDT-ALS0
|
||||
Why?: `ACPI0008` missing in DSDT.
|
||||
|
|
37
patches/SSDT-ALS0.dsl
Normal file
37
patches/SSDT-ALS0.dsl
Normal file
|
@ -0,0 +1,37 @@
|
|||
/*
|
||||
* 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)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,46 +0,0 @@
|
|||
// BrightKey for TP
|
||||
// In config ACPI, _Q14 to XQ14(TP-up)
|
||||
// Find: 5F 51 31 34
|
||||
// Replace: 58 51 31 34
|
||||
|
||||
// In config ACPI, _Q15 to XQ15(TP-down)
|
||||
// Find: 5F 51 31 35
|
||||
// Replace: 58 51 31 35
|
||||
//
|
||||
DefinitionBlock("", "SSDT", 2, "ACDT", "BrightFN", 0)
|
||||
{
|
||||
External(_SB.PCI0.LPCB.KBD, DeviceObj)
|
||||
External(_SB.PCI0.LPCB.EC, DeviceObj)
|
||||
External(_SB.PCI0.LPCB.EC.XQ14, MethodObj)
|
||||
External(_SB.PCI0.LPCB.EC.XQ15, MethodObj)
|
||||
|
||||
Scope (_SB.PCI0.LPCB.EC)
|
||||
{
|
||||
Method (_Q14, 0, NotSerialized)//up
|
||||
{
|
||||
If (_OSI ("Darwin"))
|
||||
{
|
||||
Notify(\_SB.PCI0.LPCB.KBD, 0x0406)
|
||||
Notify(\_SB.PCI0.LPCB.KBD, 0x10)
|
||||
}
|
||||
Else
|
||||
{
|
||||
\_SB.PCI0.LPCB.EC.XQ14()
|
||||
}
|
||||
}
|
||||
|
||||
Method (_Q15, 0, NotSerialized)//down
|
||||
{
|
||||
If (_OSI ("Darwin"))
|
||||
{
|
||||
Notify(\_SB.PCI0.LPCB.KBD, 0x0405)
|
||||
Notify(\_SB.PCI0.LPCB.KBD, 0x20)
|
||||
}
|
||||
Else
|
||||
{
|
||||
\_SB.PCI0.LPCB.EC.XQ15()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//EOF
|
|
@ -1,5 +1,5 @@
|
|||
//Add DMAC
|
||||
DefinitionBlock ("", "SSDT", 2, "ACDT", "DMAC", 0)
|
||||
DefinitionBlock ("", "SSDT", 2, "OCLT", "DMAC", 0)
|
||||
{
|
||||
External(_SB.PCI0.LPCB, DeviceObj)
|
||||
Scope (_SB.PCI0.LPCB)
|
||||
|
|
|
@ -1,40 +0,0 @@
|
|||
|
||||
DefinitionBlock ("", "SSDT", 2, "APPLE ", "SsdtEC", 0x00001000)
|
||||
{
|
||||
External (_SB_.PCI0.LPCB, DeviceObj)
|
||||
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)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
//
|
||||
DefinitionBlock("", "SSDT", 2, "ACDT", "EXT3", 0)
|
||||
DefinitionBlock("", "SSDT", 2, "OCLT", "EXT3", 0)
|
||||
{
|
||||
External(_SI._SST, MethodObj)
|
||||
Method (EXT3, 1, NotSerialized)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
//
|
||||
DefinitionBlock("", "SSDT", 2, "ACDT", "EXT4", 0)
|
||||
DefinitionBlock("", "SSDT", 2, "OCLT", "EXT4", 0)
|
||||
{
|
||||
External(_SB.LID, DeviceObj)
|
||||
External(_SB.LID0, DeviceObj)
|
||||
|
|
34
patches/SSDT-GPRW.dsl
Normal file
34
patches/SSDT-GPRW.dsl
Normal file
|
@ -0,0 +1,34 @@
|
|||
//
|
||||
// In config ACPI, GPRW to XPRW
|
||||
// Find: 47505257 02
|
||||
// Replace: 58505257 02
|
||||
//
|
||||
DefinitionBlock ("", "SSDT", 2, "OCLT", "GPRW", 0)
|
||||
{
|
||||
External(XPRW, MethodObj)
|
||||
Method (GPRW, 2, NotSerialized)
|
||||
{
|
||||
If (_OSI ("Darwin"))
|
||||
{
|
||||
If ((0x6D == Arg0))
|
||||
{
|
||||
Return (Package ()
|
||||
{
|
||||
0x6D,
|
||||
Zero
|
||||
})
|
||||
}
|
||||
|
||||
If ((0x0D == Arg0))
|
||||
{
|
||||
Return (Package ()
|
||||
{
|
||||
0x0D,
|
||||
Zero
|
||||
})
|
||||
}
|
||||
}
|
||||
Return (XPRW (Arg0, Arg1))
|
||||
}
|
||||
}
|
||||
|
|
@ -1,143 +0,0 @@
|
|||
//Fix HPET,RTC,TIMR
|
||||
DefinitionBlock ("", "SSDT", 2, "ACDT", "HRTfix", 0)
|
||||
{
|
||||
External (_SB.PCI0.LPCB, DeviceObj)
|
||||
External (_SB.PCI0.LPCB.RTC, DeviceObj)
|
||||
External (_SB.PCI0.LPCB.TIMR, DeviceObj)
|
||||
External (HPAE, IntObj)
|
||||
//External (HPTE, IntObj)
|
||||
|
||||
//disable HPET
|
||||
Scope (\)
|
||||
{
|
||||
If (_OSI ("Darwin"))
|
||||
{
|
||||
HPAE =0
|
||||
//HPTE =0
|
||||
}
|
||||
}
|
||||
|
||||
//disable RTC
|
||||
Scope (_SB.PCI0.LPCB.RTC)
|
||||
{
|
||||
Method (_STA, 0, NotSerialized)
|
||||
{
|
||||
If (_OSI ("Darwin"))
|
||||
{
|
||||
Return (0)
|
||||
}
|
||||
Else
|
||||
{
|
||||
Return (0x0F)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//disable TIMR
|
||||
Scope (_SB.PCI0.LPCB.TIMR)
|
||||
{
|
||||
Method (_STA, 0, NotSerialized)
|
||||
{
|
||||
If (_OSI ("Darwin"))
|
||||
{
|
||||
Return (0)
|
||||
}
|
||||
Else
|
||||
{
|
||||
Return (0x0F)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Scope (_SB.PCI0.LPCB)
|
||||
{
|
||||
//Fake HPE0
|
||||
Device (HPE0)
|
||||
{
|
||||
Name (_HID, EisaId ("PNP0103"))
|
||||
Name (_UID, Zero)
|
||||
Name (BUF0, ResourceTemplate ()
|
||||
{
|
||||
IRQNoFlags() { 0, 8 }
|
||||
Memory32Fixed (ReadWrite,
|
||||
0xFED00000,
|
||||
0x00000400,
|
||||
)
|
||||
})
|
||||
Method (_STA, 0, NotSerialized)
|
||||
{
|
||||
If (_OSI ("Darwin"))
|
||||
{
|
||||
Return (0x0F)
|
||||
}
|
||||
Else
|
||||
{
|
||||
Return (0)
|
||||
}
|
||||
}
|
||||
Method (_CRS, 0, Serialized)
|
||||
{
|
||||
Return (BUF0)
|
||||
}
|
||||
}
|
||||
|
||||
//Fake RTC0
|
||||
Device (RTC0)
|
||||
{
|
||||
Name (_HID, EisaId ("PNP0B00"))
|
||||
Name (_CRS, ResourceTemplate ()
|
||||
{
|
||||
IO (Decode16,
|
||||
0x0070,
|
||||
0x0070,
|
||||
0x01,
|
||||
0x02,
|
||||
)
|
||||
})
|
||||
Method (_STA, 0, NotSerialized)
|
||||
{
|
||||
If (_OSI ("Darwin"))
|
||||
{
|
||||
Return (0x0F)
|
||||
}
|
||||
Else
|
||||
{
|
||||
Return (0)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Fake TIM0
|
||||
Device (TIM0)
|
||||
{
|
||||
Name (_HID, EisaId ("PNP0100"))
|
||||
Name (_CRS, ResourceTemplate ()
|
||||
{
|
||||
IO (Decode16,
|
||||
0x0040,
|
||||
0x0040,
|
||||
0x01,
|
||||
0x04,
|
||||
)
|
||||
IO (Decode16,
|
||||
0x0050,
|
||||
0x0050,
|
||||
0x10,
|
||||
0x04,
|
||||
)
|
||||
})
|
||||
Method (_STA, 0, NotSerialized)
|
||||
{
|
||||
If (_OSI ("Darwin"))
|
||||
{
|
||||
Return (0x0F)
|
||||
}
|
||||
Else
|
||||
{
|
||||
Return (0)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
180
patches/SSDT-Keyboard.dsl
Normal file
180
patches/SSDT-Keyboard.dsl
Normal file
|
@ -0,0 +1,180 @@
|
|||
DefinitionBlock("", "SSDT", 2, "OCLT", "BrightFN", 0)
|
||||
{
|
||||
External(_SB.PCI0.LPCB.KBD, DeviceObj)
|
||||
External(_SB.PCI0.LPCB.EC, DeviceObj)
|
||||
External(_SB.PCI0.LPCB.EC.XQ6A, MethodObj)
|
||||
External(_SB.PCI0.LPCB.EC.XQ15, MethodObj)
|
||||
External(_SB.PCI0.LPCB.EC.XQ14, MethodObj)
|
||||
External(_SB.PCI0.LPCB.EC.XQ16, MethodObj)
|
||||
External(_SB.PCI0.LPCB.EC.XQ64, MethodObj)
|
||||
External(_SB.PCI0.LPCB.EC.XQ66, MethodObj)
|
||||
External(_SB.PCI0.LPCB.EC.XQ60, MethodObj)
|
||||
External(_SB.PCI0.LPCB.EC.XQ61, MethodObj)
|
||||
External(_SB.PCI0.LPCB.EC.XQ62, MethodObj)
|
||||
|
||||
Scope (_SB.PCI0.LPCB.EC)
|
||||
{
|
||||
Method (_Q6A, 0, NotSerialized) // F4 - Microphone Mute
|
||||
{
|
||||
If (_OSI ("Darwin"))
|
||||
{
|
||||
Notify(\_SB.PCI0.LPCB.KBD, 0x033E)
|
||||
}
|
||||
Else
|
||||
{
|
||||
\_SB.PCI0.LPCB.EC.XQ6A()
|
||||
}
|
||||
}
|
||||
|
||||
Method (_Q15, 0, NotSerialized) // F5 - Brightness Down
|
||||
{
|
||||
If (_OSI ("Darwin"))
|
||||
{
|
||||
Notify(\_SB.PCI0.LPCB.KBD, 0x0405)
|
||||
Notify(\_SB.PCI0.LPCB.KBD, 0x20)
|
||||
}
|
||||
Else
|
||||
{
|
||||
\_SB.PCI0.LPCB.EC.XQ15()
|
||||
}
|
||||
}
|
||||
|
||||
Method (_Q14, 0, NotSerialized) // F6 - Brightness Up
|
||||
{
|
||||
If (_OSI ("Darwin"))
|
||||
{
|
||||
Notify(\_SB.PCI0.LPCB.KBD, 0x0406)
|
||||
Notify(\_SB.PCI0.LPCB.KBD, 0x10)
|
||||
}
|
||||
Else
|
||||
{
|
||||
\_SB.PCI0.LPCB.EC.XQ14()
|
||||
}
|
||||
}
|
||||
|
||||
Method (_Q16, 0, NotSerialized) // F7 - Dual Display
|
||||
{
|
||||
If (_OSI ("Darwin"))
|
||||
{
|
||||
Notify(\_SB.PCI0.LPCB.KBD, 0x046E)
|
||||
}
|
||||
Else
|
||||
{
|
||||
\_SB.PCI0.LPCB.EC.XQ16()
|
||||
}
|
||||
}
|
||||
|
||||
Method (_Q64, 0, NotSerialized) // F8 - Network
|
||||
{
|
||||
If (_OSI ("Darwin"))
|
||||
{
|
||||
Notify(\_SB.PCI0.LPCB.KBD, 0x0369)
|
||||
}
|
||||
Else
|
||||
{
|
||||
\_SB.PCI0.LPCB.EC.XQ64()
|
||||
}
|
||||
}
|
||||
|
||||
Method (_Q66, 0, NotSerialized) // F9 - Settings
|
||||
{
|
||||
If (_OSI ("Darwin"))
|
||||
{
|
||||
Notify(\_SB.PCI0.LPCB.KBD, 0x036A)
|
||||
}
|
||||
Else
|
||||
{
|
||||
\_SB.PCI0.LPCB.EC.XQ66()
|
||||
}
|
||||
}
|
||||
|
||||
Method (_Q60, 0, NotSerialized) // F10 - Bluetooh
|
||||
{
|
||||
If (_OSI ("Darwin"))
|
||||
{
|
||||
Notify(\_SB.PCI0.LPCB.KBD, 0x036B)
|
||||
}
|
||||
Else
|
||||
{
|
||||
\_SB.PCI0.LPCB.EC.XQ60()
|
||||
}
|
||||
}
|
||||
|
||||
Method (_Q61, 0, NotSerialized) // F11 - Keyboard
|
||||
{
|
||||
If (_OSI ("Darwin"))
|
||||
{
|
||||
Notify(\_SB.PCI0.LPCB.KBD, 0x0368)
|
||||
}
|
||||
Else
|
||||
{
|
||||
\_SB.PCI0.LPCB.EC.XQ61()
|
||||
}
|
||||
}
|
||||
|
||||
Method (_Q62, 0, NotSerialized) // F12 - Star
|
||||
{
|
||||
If (_OSI ("Darwin"))
|
||||
{
|
||||
Notify(\_SB.PCI0.LPCB.KBD, 0x036C)
|
||||
}
|
||||
Else
|
||||
{
|
||||
\_SB.PCI0.LPCB.EC.XQ62()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Scope (_SB.PCI0.LPCB.KBD)
|
||||
{
|
||||
// Select specific configuration in VoodooPS2Trackpad.kext
|
||||
Method(_DSM, 4)
|
||||
{
|
||||
If (!Arg2) { Return (Buffer() { 0x03 } ) }
|
||||
Return (Package()
|
||||
{
|
||||
"RM,oem-id", "LENOVO",
|
||||
"RM,oem-table-id", "Thinkpad_Clickpad",
|
||||
})
|
||||
}
|
||||
// Overrides (the example data here is default in the Info.plist)
|
||||
Name(RMCF, Package()
|
||||
{
|
||||
"Synaptics TouchPad", Package()
|
||||
{
|
||||
"BogusDeltaThreshX", 800,
|
||||
"BogusDeltaThreshY", 800,
|
||||
"Clicking", ">y",
|
||||
"DragLockTempMask", 0x40004,
|
||||
"DynamicEWMode", ">n",
|
||||
"FakeMiddleButton", ">n",
|
||||
"HWResetOnStart", ">y",
|
||||
//"ForcePassThrough", ">y",
|
||||
//"SkipPassThrough", ">y",
|
||||
"PalmNoAction When Typing", ">y",
|
||||
"ScrollResolution", 800,
|
||||
"SmoothInput", ">y",
|
||||
"UnsmoothInput", ">y",
|
||||
"Thinkpad", ">y",
|
||||
"EdgeBottom", 0,
|
||||
"FingerZ", 30,
|
||||
"MaxTapTime", 100000000,
|
||||
"MouseMultiplierX", 2,
|
||||
"MouseMultiplierY", 2,
|
||||
"MouseScrollMultiplierX", 2,
|
||||
"MouseScrollMultiplierY", 2,
|
||||
//"TrackpointScrollYMultiplier", 1, //Change this value to 0xFFFF in order to inverse the vertical scroll direction of the Trackpoint when holding the middle mouse button.
|
||||
//"TrackpointScrollXMultiplier", 1, //Change this value to 0xFFFF in order to inverse the horizontal scroll direction of the Trackpoint when holding the middle mouse button.
|
||||
},
|
||||
"Keyboard", Package()
|
||||
{
|
||||
"Custom PS2 Map", Package()
|
||||
{
|
||||
Package() { },
|
||||
"e037=64", // PrtSc=F13
|
||||
},
|
||||
},
|
||||
})
|
||||
}
|
||||
}
|
||||
//EOF
|
|
@ -1,23 +0,0 @@
|
|||
//Add MCHC
|
||||
DefinitionBlock ("", "SSDT", 2, "ACDT", "MCHC", 0)
|
||||
{
|
||||
External (_SB.PCI0, DeviceObj)
|
||||
Scope (_SB.PCI0)
|
||||
{
|
||||
Device (MCHC)
|
||||
{
|
||||
Name (_ADR, Zero)
|
||||
Method (_STA, 0, NotSerialized)
|
||||
{
|
||||
If (_OSI ("Darwin"))
|
||||
{
|
||||
Return (0x0F)
|
||||
}
|
||||
Else
|
||||
{
|
||||
Return (Zero)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,431 +0,0 @@
|
|||
// battery
|
||||
DefinitionBlock ("", "SSDT", 2, "ACDT", "BAT0", 0)
|
||||
{
|
||||
External(_SB.PCI0.LPCB.EC, DeviceObj)
|
||||
External(_SB.PCI0.LPCB.EC.AC._PSR, MethodObj)
|
||||
External(_SB.PCI0.LPCB.EC.BSWR, IntObj)
|
||||
External(_SB.PCI0.LPCB.EC.BSWA, IntObj)
|
||||
External(_SB.PCI0.LPCB.EC.BATM, MutexObj)
|
||||
External(_SB.PCI0.LPCB.EC.HIID, FieldUnitObj)
|
||||
External(_SB.PCI0.LPCB.EC.B0I0, IntObj)
|
||||
External(_SB.PCI0.LPCB.EC.B0I1, IntObj)
|
||||
External(_SB.PCI0.LPCB.EC.B0I2, IntObj)
|
||||
External(_SB.PCI0.LPCB.EC.B0I3, IntObj)
|
||||
External(_SB.PCI0.LPCB.EC.B1I0, IntObj)
|
||||
External(_SB.PCI0.LPCB.EC.B1I1, IntObj)
|
||||
External(_SB.PCI0.LPCB.EC.B1I2, IntObj)
|
||||
External(_SB.PCI0.LPCB.EC.B1I3, IntObj)
|
||||
//
|
||||
External(_SB.PCI0.LPCB.EC.XBIF, MethodObj)
|
||||
External(_SB.PCI0.LPCB.EC.XBIX, MethodObj)
|
||||
External(_SB.PCI0.LPCB.EC.XBST, MethodObj)
|
||||
|
||||
Method (B1B2, 2, NotSerialized)
|
||||
{
|
||||
ShiftLeft (Arg1, 8, Local0)
|
||||
Or (Arg0, Local0, Local0)
|
||||
Return (Local0)
|
||||
|
||||
}
|
||||
Method (B1B4, 4, NotSerialized)
|
||||
{
|
||||
Store (Arg3, Local0)
|
||||
Or (Arg2, ShiftLeft (Local0, 0x08), Local0)
|
||||
Or (Arg1, ShiftLeft (Local0, 0x08), Local0)
|
||||
Or (Arg0, ShiftLeft (Local0, 0x08), Local0)
|
||||
Return (Local0)
|
||||
}
|
||||
Scope(\_SB.PCI0.LPCB.EC)
|
||||
{
|
||||
Method (RE1B, 1, NotSerialized)
|
||||
{
|
||||
OperationRegion(ERAM, EmbeddedControl, Arg0, 1)
|
||||
Field(ERAM, ByteAcc, NoLock, Preserve) { BYTE, 8 }
|
||||
Return(BYTE)
|
||||
}
|
||||
Method (RECB, 2, Serialized)
|
||||
{
|
||||
ShiftRight(Arg1, 3, Arg1)
|
||||
Name(TEMP, Buffer(Arg1) { })
|
||||
Add(Arg0, Arg1, Arg1)
|
||||
Store(0, Local0)
|
||||
While (LLess(Arg0, Arg1))
|
||||
{
|
||||
Store(RE1B(Arg0), Index(TEMP, Local0))
|
||||
Increment(Arg0)
|
||||
Increment(Local0)
|
||||
}
|
||||
Return(TEMP)
|
||||
}
|
||||
OperationRegion (BRAM, EmbeddedControl, 0x00, 0x0100)
|
||||
Field (BRAM, ByteAcc, NoLock, Preserve)
|
||||
{
|
||||
Offset (0xA0),
|
||||
BRCA,8,BRCB,8, //SBRC, 16,
|
||||
BFC0,8,BFC1,8, //SBFC, 16,s2
|
||||
//SBAE, 16,
|
||||
//SBRS, 16,
|
||||
Offset (0xA8),
|
||||
BAC0,8,BAC1,8, //SBAC, 16,s2
|
||||
BVO0,8,BVO1,8, //SBVO, 16,
|
||||
//SBAF, 16,
|
||||
//SBBS, 16
|
||||
}
|
||||
Field (BRAM, ByteAcc, NoLock, Preserve)
|
||||
{
|
||||
Offset (0xA0),
|
||||
BBM0,8,BBM1,8, //SBBM, 16,
|
||||
//SBMD, 16,
|
||||
Offset (0xA4),
|
||||
BC00,8,BC01,8, //SBCC, 16 //E470,T470S
|
||||
|
||||
}
|
||||
Field (BRAM, ByteAcc, NoLock, Preserve)
|
||||
{
|
||||
Offset (0xA0),
|
||||
BDC0,8,BDC1,8, //SBDC, 16,s2
|
||||
BDV0,8,BDV1,8, //SBDV, 16,s2
|
||||
//SBOM, 16,
|
||||
//SBSI, 16,
|
||||
//SBDT, 16,
|
||||
Offset (0xAA),
|
||||
BSN0,8,BSN1,8 //SBSN, 16,s2
|
||||
}
|
||||
Field (BRAM, ByteAcc, NoLock, Preserve)
|
||||
{
|
||||
Offset (0xA0),
|
||||
BCH0,8,BCH1,8,BCH2,8,BCH3,8 //SBCH, 32
|
||||
}
|
||||
|
||||
Method (GBIF, 3, NotSerialized)
|
||||
{
|
||||
If (_OSI ("Darwin"))
|
||||
{
|
||||
Acquire (BATM, 0xFFFF)
|
||||
If (Arg2)
|
||||
{
|
||||
Or (Arg0, 0x01, HIID)
|
||||
Store (B1B2 (BBM0, BBM1), Local7)
|
||||
ShiftRight (Local7, 0x0F, Local7)
|
||||
XOr (Local7, 0x01, Index (Arg1, 0x00))
|
||||
Store (Arg0, HIID)
|
||||
If (Local7)
|
||||
{
|
||||
Multiply (B1B2 (BFC0, BFC1), 0x0A, Local1)
|
||||
}
|
||||
Else
|
||||
{
|
||||
Store (B1B2 (BFC0, BFC1), Local1)
|
||||
}
|
||||
|
||||
Store (Local1, Index (Arg1, 0x02))
|
||||
Or (Arg0, 0x02, HIID)
|
||||
If (Local7)
|
||||
{
|
||||
Multiply (B1B2 (BDC0, BDC1), 0x0A, Local0)
|
||||
}
|
||||
Else
|
||||
{
|
||||
Store (B1B2 (BDC0, BDC1), Local0)
|
||||
}
|
||||
|
||||
Store (Local0, Index (Arg1, 0x01))
|
||||
Divide (Local1, 0x14, Local2, Index (Arg1, 0x05))
|
||||
If (Local7)
|
||||
{
|
||||
Store (0xC8, Index (Arg1, 0x06))
|
||||
}
|
||||
ElseIf (B1B2 (BDV0, BDV1))
|
||||
{
|
||||
Divide (0x00030D40, B1B2 (BDV0, BDV1), Local2, Index (Arg1, 0x06))
|
||||
}
|
||||
Else
|
||||
{
|
||||
Store (0x00, Index (Arg1, 0x06))
|
||||
}
|
||||
|
||||
Store (B1B2 (BDV0, BDV1), Index (Arg1, 0x04))
|
||||
Store (B1B2 (BSN0, BSN1), Local0)
|
||||
Name (SERN, Buffer (0x06)
|
||||
{
|
||||
" "
|
||||
})
|
||||
Store (0x04, Local2)
|
||||
While (Local0)
|
||||
{
|
||||
Divide (Local0, 0x0A, Local1, Local0)
|
||||
Add (Local1, 0x30, Index (SERN, Local2))
|
||||
Decrement (Local2)
|
||||
}
|
||||
|
||||
Store (SERN, Index (Arg1, 0x0A))
|
||||
Or (Arg0, 0x06, HIID)
|
||||
//Arg1 [0x09] = SBDN
|
||||
Arg1 [0x09] = RECB(0xA0,128)
|
||||
Or (Arg0, 0x04, HIID)
|
||||
Name (BTYP, Buffer (0x05)
|
||||
{
|
||||
0x00, 0x00, 0x00, 0x00, 0x00
|
||||
})
|
||||
Store (B1B4 (BCH0, BCH1, BCH2, BCH3), BTYP)
|
||||
Store (BTYP, Index (Arg1, 0x0B))
|
||||
Or (Arg0, 0x05, HIID)
|
||||
//Arg1 [0x0C] = SBMN
|
||||
Arg1 [0x0C] = RECB(0xA0,128)
|
||||
}
|
||||
Else
|
||||
{
|
||||
Arg1 [One] = 0xFFFFFFFF
|
||||
Arg1 [0x05] = Zero
|
||||
Arg1 [0x06] = Zero
|
||||
Arg1 [0x02] = 0xFFFFFFFF
|
||||
}
|
||||
|
||||
Release (BATM)
|
||||
Return (Arg1)
|
||||
}
|
||||
Else
|
||||
{
|
||||
Return (\_SB.PCI0.LPCB.EC.XBIF(Arg0, Arg1, Arg2))
|
||||
}
|
||||
}
|
||||
|
||||
Method (GBIX, 3, NotSerialized)
|
||||
{
|
||||
If (_OSI ("Darwin"))
|
||||
{
|
||||
Acquire (BATM, 0xFFFF)
|
||||
If (Arg2)
|
||||
{
|
||||
Or (Arg0, 0x01, HIID)
|
||||
Store (B1B2 (BC00, BC01), Local7)
|
||||
Store (Local7, Index (Arg1, 0x08))
|
||||
Store (B1B2 (BBM0, BBM1), Local7)
|
||||
ShiftRight (Local7, 0x0F, Local7)
|
||||
XOr (Local7, 0x01, Index (Arg1, 0x01))
|
||||
Store (Arg0, HIID)
|
||||
If (Local7)
|
||||
{
|
||||
Multiply (B1B2 (BFC0, BFC1), 0x0A, Local1)
|
||||
}
|
||||
Else
|
||||
{
|
||||
Store (B1B2 (BFC0, BFC1), Local1)
|
||||
}
|
||||
|
||||
Store (Local1, Index (Arg1, 0x03))
|
||||
Or (Arg0, 0x02, HIID)
|
||||
If (Local7)
|
||||
{
|
||||
Multiply (B1B2 (BDC0, BDC1), 0x0A, Local0)
|
||||
}
|
||||
Else
|
||||
{
|
||||
Store (B1B2 (BDC0, BDC1), Local0)
|
||||
}
|
||||
|
||||
Store (Local0, Index (Arg1, 0x02))
|
||||
Divide (Local1, 0x14, Local2, Index (Arg1, 0x06))
|
||||
If (Local7)
|
||||
{
|
||||
Store (0xC8, Index (Arg1, 0x07))
|
||||
}
|
||||
ElseIf (B1B2 (BDV0, BDV1))
|
||||
{
|
||||
Divide (0x00030D40, B1B2 (BDV0, BDV1), Local2, Index (Arg1, 0x07))
|
||||
}
|
||||
Else
|
||||
{
|
||||
Store (0x00, Index (Arg1, 0x07))
|
||||
}
|
||||
|
||||
Store (B1B2 (BDV0, BDV1), Index (Arg1, 0x05))
|
||||
Store (B1B2 (BSN0, BSN1), Local0)
|
||||
Name (SERN, Buffer (0x06)
|
||||
{
|
||||
" "
|
||||
})
|
||||
Store (0x04, Local2)
|
||||
While (Local0)
|
||||
{
|
||||
Divide (Local0, 0x0A, Local1, Local0)
|
||||
Add (Local1, 0x30, Index (SERN, Local2))
|
||||
Decrement (Local2)
|
||||
}
|
||||
|
||||
Store (SERN, Index (Arg1, 0x11))
|
||||
Or (Arg0, 0x06, HIID)
|
||||
//Arg1 [0x10] = SBDN
|
||||
Arg1 [0x10] = RECB(0xA0,128)
|
||||
Or (Arg0, 0x04, HIID)
|
||||
Name (BTYP, Buffer (0x05)
|
||||
{
|
||||
0x00, 0x00, 0x00, 0x00, 0x00
|
||||
})
|
||||
Store (B1B4 (BCH0, BCH1, BCH2, BCH3), BTYP)
|
||||
Store (BTYP, Index (Arg1, 0x12))
|
||||
Or (Arg0, 0x05, HIID)
|
||||
//Arg1 [0x13] = SBMN
|
||||
Arg1 [0x13] = RECB(0xA0,128)
|
||||
}
|
||||
Else
|
||||
{
|
||||
Arg1 [0x02] = 0xFFFFFFFF
|
||||
Arg1 [0x06] = Zero
|
||||
Arg1 [0x07] = Zero
|
||||
Arg1 [0x03] = 0xFFFFFFFF
|
||||
}
|
||||
|
||||
Release (BATM)
|
||||
Return (Arg1)
|
||||
}
|
||||
Else
|
||||
{
|
||||
Return (\_SB.PCI0.LPCB.EC.XBIX(Arg0, Arg1, Arg2))
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Method (GBST, 4, NotSerialized)
|
||||
{
|
||||
If (_OSI ("Darwin"))
|
||||
{
|
||||
Acquire (BATM, 0xFFFF)
|
||||
If (And (Arg1, 0x20))
|
||||
{
|
||||
Store (0x02, Local0)
|
||||
}
|
||||
ElseIf (And (Arg1, 0x40))
|
||||
{
|
||||
Store (0x01, Local0)
|
||||
}
|
||||
Else
|
||||
{
|
||||
Store (0x00, Local0)
|
||||
}
|
||||
|
||||
If (And (Arg1, 0x07)) {}
|
||||
Else
|
||||
{
|
||||
Or (Local0, 0x04, Local0)
|
||||
}
|
||||
|
||||
If (LEqual (And (Arg1, 0x07), 0x07))
|
||||
{
|
||||
Store (0x04, Local0)
|
||||
Store (0x00, Local1)
|
||||
Store (0x00, Local2)
|
||||
Store (0x00, Local3)
|
||||
}
|
||||
Else
|
||||
{
|
||||
Store (Arg0, HIID)
|
||||
Store (B1B2 (BVO0, BVO1), Local3)
|
||||
If (Arg2)
|
||||
{
|
||||
Multiply (B1B2 (BRCA, BRCB), 0x0A, Local2)
|
||||
}
|
||||
Else
|
||||
{
|
||||
Store (B1B2 (BRCA, BRCB), Local2)
|
||||
}
|
||||
|
||||
Store (B1B2 (BAC0, BAC1), Local1)
|
||||
If (LGreaterEqual (Local1, 0x8000))
|
||||
{
|
||||
If (And (Local0, 0x01))
|
||||
{
|
||||
Subtract (0x00010000, Local1, Local1)
|
||||
}
|
||||
Else
|
||||
{
|
||||
Store (0x00, Local1)
|
||||
}
|
||||
}
|
||||
ElseIf (LNot (And (Local0, 0x02)))
|
||||
{
|
||||
Store (0x00, Local1)
|
||||
}
|
||||
|
||||
If (Arg2)
|
||||
{
|
||||
Multiply (Local3, Local1, Local1)
|
||||
Divide (Local1, 0x03E8, Local7, Local1)
|
||||
Store (Local0, Local7)
|
||||
Store (Local7, Local0)
|
||||
}
|
||||
}
|
||||
|
||||
Local5 = (One << (Arg0 >> 0x04))
|
||||
BSWA |= BSWR /* \_SB_.PCI0.LPCB.EC__.BSWR */
|
||||
If (((BSWA & Local5) == Zero))
|
||||
{
|
||||
Arg3 [Zero] = Local0
|
||||
Arg3 [One] = Local1
|
||||
Arg3 [0x02] = Local2
|
||||
Arg3 [0x03] = Local3
|
||||
If ((Arg0 == Zero))
|
||||
{
|
||||
B0I0 = Local0
|
||||
B0I1 = Local1
|
||||
B0I2 = Local2
|
||||
B0I3 = Local3
|
||||
}
|
||||
Else
|
||||
{
|
||||
B1I0 = Local0
|
||||
B1I1 = Local1
|
||||
B1I2 = Local2
|
||||
B1I3 = Local3
|
||||
}
|
||||
}
|
||||
Else
|
||||
{
|
||||
If (\_SB.PCI0.LPCB.EC.AC._PSR ())
|
||||
{
|
||||
If ((Arg0 == Zero))
|
||||
{
|
||||
Arg3 [Zero] = \_SB.PCI0.LPCB.EC.B0I0
|
||||
Arg3 [One] = \_SB.PCI0.LPCB.EC.B0I1
|
||||
Arg3 [0x02] = \_SB.PCI0.LPCB.EC.B0I2
|
||||
Arg3 [0x03] = \_SB.PCI0.LPCB.EC.B0I3
|
||||
}
|
||||
Else
|
||||
{
|
||||
Arg3 [Zero] = \_SB.PCI0.LPCB.EC.B1I0
|
||||
Arg3 [One] = \_SB.PCI0.LPCB.EC.B1I1
|
||||
Arg3 [0x02] = \_SB.PCI0.LPCB.EC.B1I2
|
||||
Arg3 [0x03] = \_SB.PCI0.LPCB.EC.B1I3
|
||||
}
|
||||
}
|
||||
Else
|
||||
{
|
||||
Arg3 [Zero] = Local0
|
||||
Arg3 [One] = Local1
|
||||
Arg3 [0x02] = Local2
|
||||
Arg3 [0x03] = Local3
|
||||
}
|
||||
|
||||
If ((((Local0 & 0x04) == Zero) && ((Local2 > Zero) &&
|
||||
(Local3 > Zero))))
|
||||
{
|
||||
BSWA &= ~Local5
|
||||
Arg3 [Zero] = Local0
|
||||
Arg3 [One] = Local1
|
||||
Arg3 [0x02] = Local2
|
||||
Arg3 [0x03] = Local3
|
||||
}
|
||||
}
|
||||
|
||||
Release (BATM)
|
||||
Return (Arg3)
|
||||
}
|
||||
Else
|
||||
{
|
||||
Return (\_SB.PCI0.LPCB.EC.XBST(Arg0, Arg1, Arg2, Arg3))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//EOF
|
||||
|
480
patches/SSDT-OCBAT0-TP_tx80_x1c6th.dsl
Normal file
480
patches/SSDT-OCBAT0-TP_tx80_x1c6th.dsl
Normal file
|
@ -0,0 +1,480 @@
|
|||
// battery
|
||||
DefinitionBlock ("", "SSDT", 2, "OCLT", "BATT", 0)
|
||||
{
|
||||
External (_SB.PCI0.LPCB.EC, DeviceObj)
|
||||
External (_SB.PCI0.LPCB.EC.AC._PSR, MethodObj)
|
||||
External (_SB.PCI0.LPCB.EC.B0I0, IntObj)
|
||||
External (_SB.PCI0.LPCB.EC.B0I1, IntObj)
|
||||
External (_SB.PCI0.LPCB.EC.B0I2, IntObj)
|
||||
External (_SB.PCI0.LPCB.EC.B0I3, IntObj)
|
||||
External (_SB.PCI0.LPCB.EC.B1I0, IntObj)
|
||||
External (_SB.PCI0.LPCB.EC.B1I1, IntObj)
|
||||
External (_SB.PCI0.LPCB.EC.B1I2, IntObj)
|
||||
External (_SB.PCI0.LPCB.EC.B1I3, IntObj)
|
||||
External (_SB.PCI0.LPCB.EC.BATM, MutexObj)
|
||||
External (_SB.PCI0.LPCB.EC.BATW, MethodObj)
|
||||
External (_SB.PCI0.LPCB.EC.BSWA, IntObj)
|
||||
External (_SB.PCI0.LPCB.EC.BSWR, IntObj)
|
||||
External (_SB.PCI0.LPCB.EC.HB0S, FieldUnitObj)
|
||||
External (_SB.PCI0.LPCB.EC.HB1S, FieldUnitObj)
|
||||
External (_SB.PCI0.LPCB.EC.HIID, FieldUnitObj)
|
||||
//
|
||||
External(_SB.PCI0.LPCB.EC.XBIF, MethodObj)
|
||||
External(_SB.PCI0.LPCB.EC.XBIX, MethodObj)
|
||||
External(_SB.PCI0.LPCB.EC.XBST, MethodObj)
|
||||
External(_SB.PCI0.LPCB.EC.XJTP, MethodObj)
|
||||
|
||||
Method (B1B2, 2, NotSerialized)
|
||||
{
|
||||
Local0 = (Arg1 << 0x08)
|
||||
Local0 |= Arg0
|
||||
Return (Local0)
|
||||
}
|
||||
|
||||
Method (B1B4, 4, NotSerialized)
|
||||
{
|
||||
Local0 = Arg3
|
||||
Local0 = (Arg2 | (Local0 << 0x08))
|
||||
Local0 = (Arg1 | (Local0 << 0x08))
|
||||
Local0 = (Arg0 | (Local0 << 0x08))
|
||||
Return (Local0)
|
||||
}
|
||||
|
||||
Scope (\_SB.PCI0.LPCB.EC)
|
||||
{
|
||||
Method (RE1B, 1, NotSerialized)
|
||||
{
|
||||
OperationRegion (ECOR, EmbeddedControl, Arg0, One)
|
||||
Field (ECOR, ByteAcc, NoLock, Preserve)
|
||||
{
|
||||
BYTE, 8
|
||||
}
|
||||
|
||||
Return (BYTE)
|
||||
}
|
||||
|
||||
Method (RECB, 2, Serialized)
|
||||
{
|
||||
Arg1 >>= 0x03
|
||||
Name (TEMP, Buffer (Arg1){})
|
||||
Arg1 += Arg0
|
||||
Local0 = Zero
|
||||
While ((Arg0 < Arg1))
|
||||
{
|
||||
TEMP [Local0] = RE1B (Arg0)
|
||||
Arg0++
|
||||
Local0++
|
||||
}
|
||||
|
||||
Return (TEMP)
|
||||
}
|
||||
|
||||
OperationRegion (BRAM, EmbeddedControl, Zero, 0x0100)
|
||||
Field (BRAM, ByteAcc, NoLock, Preserve)
|
||||
{
|
||||
Offset (0xA0),
|
||||
RC00, 8, RC01, 8, //SBRC, 16,
|
||||
FC00, 8, FC01, 8, //SBFC, 16,
|
||||
, 16,
|
||||
, 16,
|
||||
AC00, 8, AC01, 8, //SBAC, 16,
|
||||
BV00, 8, BV01, 8, //SBVO, 16,
|
||||
, 16,
|
||||
, 16
|
||||
}
|
||||
|
||||
Field (BRAM, ByteAcc, NoLock, Preserve)
|
||||
{
|
||||
Offset (0xA0),
|
||||
SB00, 8, SB01, 8, //SBBM, 16,
|
||||
, 16,
|
||||
CC00, 8, CC01, 8, //SBCC, 16 //E470,T470S
|
||||
}
|
||||
|
||||
Field (BRAM, ByteAcc, NoLock, Preserve)
|
||||
{
|
||||
Offset (0xA0),
|
||||
DC00, 8, DC01, 8, //SBDC, 16,
|
||||
DV00, 8, DV01, 8, //SBDV, 16,
|
||||
, 16,
|
||||
, 16,
|
||||
, 16,
|
||||
SN00, 8, SN01, 8 //SBSN, 16
|
||||
}
|
||||
|
||||
Field (BRAM, ByteAcc, NoLock, Preserve)
|
||||
{
|
||||
Offset (0xA0),
|
||||
CH00, 8, CH01, 8, CH02, 8, CH03, 8 //SBCH, 32
|
||||
}
|
||||
|
||||
Method (GBIF, 3, NotSerialized)
|
||||
{
|
||||
If (_OSI ("Darwin"))
|
||||
{
|
||||
Acquire (BATM, 0xFFFF)
|
||||
If (Arg2)
|
||||
{
|
||||
HIID = (Arg0 | One)
|
||||
Local7 = B1B2 (SB00, SB01)
|
||||
Local7 >>= 0x0F
|
||||
Arg1 [Zero] = (Local7 ^ One)
|
||||
HIID = Arg0
|
||||
If (Local7)
|
||||
{
|
||||
Local1 = (B1B2 (FC00, FC01) * 0x0A)
|
||||
}
|
||||
Else
|
||||
{
|
||||
Local1 = B1B2 (FC00, FC01)
|
||||
}
|
||||
|
||||
Arg1 [0x02] = Local1
|
||||
HIID = (Arg0 | 0x02)
|
||||
If (Local7)
|
||||
{
|
||||
Local0 = (B1B2 (DC00, DC01) * 0x0A)
|
||||
}
|
||||
Else
|
||||
{
|
||||
Local0 = B1B2 (DC00, DC01)
|
||||
}
|
||||
|
||||
Arg1 [One] = Local0
|
||||
Divide (Local1, 0x14, Local2, Arg1 [0x05])
|
||||
If (Local7)
|
||||
{
|
||||
Arg1 [0x06] = 0xC8
|
||||
}
|
||||
ElseIf (B1B2 (DV00, DV01))
|
||||
{
|
||||
Divide (0x00030D40, B1B2 (DV00, DV01), Local2, Arg1 [0x06])
|
||||
}
|
||||
Else
|
||||
{
|
||||
Arg1 [0x06] = Zero
|
||||
}
|
||||
|
||||
Arg1 [0x04] = B1B2 (DV00, DV01)
|
||||
Local0 = B1B2 (SN00, SN01)
|
||||
Name (SERN, Buffer (0x06)
|
||||
{
|
||||
" "
|
||||
})
|
||||
Local2 = 0x04
|
||||
While (Local0)
|
||||
{
|
||||
Divide (Local0, 0x0A, Local1, Local0)
|
||||
SERN [Local2] = (Local1 + 0x30)
|
||||
Local2--
|
||||
}
|
||||
|
||||
Arg1 [0x0A] = SERN
|
||||
HIID = (Arg0 | 0x06)
|
||||
Arg1 [0x09] = RECB (0xA0, 0x80)
|
||||
HIID = (Arg0 | 0x04)
|
||||
Name (BTYP, Buffer (0x05)
|
||||
{
|
||||
0x00, 0x00, 0x00, 0x00, 0x00
|
||||
})
|
||||
BTYP = B1B4 (CH00, CH01, CH02, CH03)
|
||||
Arg1 [0x0B] = BTYP
|
||||
HIID = (Arg0 | 0x05)
|
||||
Arg1 [0x0C] = RECB (0xA0, 0x80)
|
||||
}
|
||||
Else
|
||||
{
|
||||
Arg1 [One] = 0xFFFFFFFF
|
||||
Arg1 [0x05] = Zero
|
||||
Arg1 [0x06] = Zero
|
||||
Arg1 [0x02] = 0xFFFFFFFF
|
||||
}
|
||||
|
||||
Release (BATM)
|
||||
Return (Arg1)
|
||||
}
|
||||
Else
|
||||
{
|
||||
Return (\_SB.PCI0.LPCB.EC.XBIF(Arg0, Arg1, Arg2))
|
||||
}
|
||||
}
|
||||
|
||||
Method (GBIX, 3, NotSerialized)
|
||||
{
|
||||
If (_OSI ("Darwin"))
|
||||
{
|
||||
Acquire (BATM, 0xFFFF)
|
||||
If (Arg2)
|
||||
{
|
||||
HIID = (Arg0 | One)
|
||||
Local7 = B1B2 (CC00, CC01)
|
||||
Arg1 [0x08] = Local7
|
||||
Local7 = B1B2 (SB00, SB01)
|
||||
Local7 >>= 0x0F
|
||||
Arg1 [One] = (Local7 ^ One)
|
||||
HIID = Arg0
|
||||
If (Local7)
|
||||
{
|
||||
Local1 = (B1B2 (FC00, FC01) * 0x0A)
|
||||
}
|
||||
Else
|
||||
{
|
||||
Local1 = B1B2 (FC00, FC01)
|
||||
}
|
||||
|
||||
Arg1 [0x03] = Local1
|
||||
HIID = (Arg0 | 0x02)
|
||||
If (Local7)
|
||||
{
|
||||
Local0 = (B1B2 (DC00, DC01) * 0x0A)
|
||||
}
|
||||
Else
|
||||
{
|
||||
Local0 = B1B2 (DC00, DC01)
|
||||
}
|
||||
|
||||
Arg1 [0x02] = Local0
|
||||
Divide (Local1, 0x14, Local2, Arg1 [0x06])
|
||||
If (Local7)
|
||||
{
|
||||
Arg1 [0x07] = 0xC8
|
||||
}
|
||||
ElseIf (B1B2 (DV00, DV01))
|
||||
{
|
||||
Divide (0x00030D40, B1B2 (DV00, DV01), Local2, Arg1 [0x07])
|
||||
}
|
||||
Else
|
||||
{
|
||||
Arg1 [0x07] = Zero
|
||||
}
|
||||
|
||||
Arg1 [0x05] = B1B2 (DV00, DV01)
|
||||
Local0 = B1B2 (SN00, SN01)
|
||||
Name (SERN, Buffer (0x06)
|
||||
{
|
||||
" "
|
||||
})
|
||||
Local2 = 0x04
|
||||
While (Local0)
|
||||
{
|
||||
Divide (Local0, 0x0A, Local1, Local0)
|
||||
SERN [Local2] = (Local1 + 0x30)
|
||||
Local2--
|
||||
}
|
||||
|
||||
Arg1 [0x11] = SERN
|
||||
HIID = (Arg0 | 0x06)
|
||||
Arg1 [0x10] = RECB (0xA0, 0x80)
|
||||
HIID = (Arg0 | 0x04)
|
||||
Name (BTYP, Buffer (0x05)
|
||||
{
|
||||
0x00, 0x00, 0x00, 0x00, 0x00
|
||||
})
|
||||
BTYP = B1B4 (CH00, CH01, CH02, CH03)
|
||||
Arg1 [0x12] = BTYP
|
||||
HIID = (Arg0 | 0x05)
|
||||
Arg1 [0x13] = RECB (0xA0, 0x80)
|
||||
}
|
||||
Else
|
||||
{
|
||||
Arg1 [0x02] = 0xFFFFFFFF
|
||||
Arg1 [0x06] = Zero
|
||||
Arg1 [0x07] = Zero
|
||||
Arg1 [0x03] = 0xFFFFFFFF
|
||||
}
|
||||
|
||||
Release (BATM)
|
||||
Return (Arg1)
|
||||
}
|
||||
Else
|
||||
{
|
||||
Return (\_SB.PCI0.LPCB.EC.XBIX(Arg0, Arg1, Arg2))
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Method (GBST, 4, NotSerialized)
|
||||
{
|
||||
If (_OSI ("Darwin"))
|
||||
{
|
||||
Acquire (BATM, 0xFFFF)
|
||||
If ((Arg1 & 0x20))
|
||||
{
|
||||
Local0 = 0x02
|
||||
}
|
||||
ElseIf ((Arg1 & 0x40))
|
||||
{
|
||||
Local0 = One
|
||||
}
|
||||
Else
|
||||
{
|
||||
Local0 = Zero
|
||||
}
|
||||
|
||||
If ((Arg1 & 0x07)){}
|
||||
Else
|
||||
{
|
||||
Local0 |= 0x04
|
||||
}
|
||||
|
||||
If (((Arg1 & 0x07) == 0x07))
|
||||
{
|
||||
Local0 = 0x04
|
||||
Local1 = Zero
|
||||
Local2 = Zero
|
||||
Local3 = Zero
|
||||
}
|
||||
Else
|
||||
{
|
||||
HIID = Arg0
|
||||
Local3 = B1B2 (BV00, BV01)
|
||||
If (Arg2)
|
||||
{
|
||||
Local2 = (B1B2 (RC00, RC01) * 0x0A)
|
||||
}
|
||||
Else
|
||||
{
|
||||
Local2 = B1B2 (RC00, RC01)
|
||||
}
|
||||
|
||||
Local1 = B1B2 (AC00, AC01)
|
||||
If ((Local1 >= 0x8000))
|
||||
{
|
||||
If ((Local0 & One))
|
||||
{
|
||||
Local1 = (0x00010000 - Local1)
|
||||
}
|
||||
Else
|
||||
{
|
||||
Local1 = Zero
|
||||
}
|
||||
}
|
||||
ElseIf (!(Local0 & 0x02))
|
||||
{
|
||||
Local1 = Zero
|
||||
}
|
||||
|
||||
If (Arg2)
|
||||
{
|
||||
Local1 *= Local3
|
||||
Divide (Local1, 0x03E8, Local7, Local1)
|
||||
}
|
||||
}
|
||||
|
||||
Local5 = (One << (Arg0 >> 0x04))
|
||||
BSWA |= BSWR
|
||||
If (((BSWA & Local5) == Zero))
|
||||
{
|
||||
Arg3 [Zero] = Local0
|
||||
Arg3 [One] = Local1
|
||||
Arg3 [0x02] = Local2
|
||||
Arg3 [0x03] = Local3
|
||||
If ((Arg0 == Zero))
|
||||
{
|
||||
B0I0 = Local0
|
||||
B0I1 = Local1
|
||||
B0I2 = Local2
|
||||
B0I3 = Local3
|
||||
}
|
||||
Else
|
||||
{
|
||||
B1I0 = Local0
|
||||
B1I1 = Local1
|
||||
B1I2 = Local2
|
||||
B1I3 = Local3
|
||||
}
|
||||
}
|
||||
Else
|
||||
{
|
||||
If (\_SB.PCI0.LPCB.EC.AC._PSR ())
|
||||
{
|
||||
If ((Arg0 == Zero))
|
||||
{
|
||||
Arg3 [Zero] = B0I0
|
||||
Arg3 [One] = B0I1
|
||||
Arg3 [0x02] = B0I2
|
||||
Arg3 [0x03] = B0I3
|
||||
}
|
||||
Else
|
||||
{
|
||||
Arg3 [Zero] = B1I0
|
||||
Arg3 [One] = B1I1
|
||||
Arg3 [0x02] = B1I2
|
||||
Arg3 [0x03] = B1I3
|
||||
}
|
||||
}
|
||||
Else
|
||||
{
|
||||
Arg3 [Zero] = Local0
|
||||
Arg3 [One] = Local1
|
||||
Arg3 [0x02] = Local2
|
||||
Arg3 [0x03] = Local3
|
||||
}
|
||||
|
||||
If ((((Local0 & 0x04) == Zero) && ((Local2 > Zero) &&
|
||||
(Local3 > Zero))))
|
||||
{
|
||||
BSWA &= ~Local5
|
||||
Arg3 [Zero] = Local0
|
||||
Arg3 [One] = Local1
|
||||
Arg3 [0x02] = Local2
|
||||
Arg3 [0x03] = Local3
|
||||
}
|
||||
}
|
||||
|
||||
Release (BATM)
|
||||
Return (Arg3)
|
||||
}
|
||||
Else
|
||||
{
|
||||
Return (\_SB.PCI0.LPCB.EC.XBST(Arg0, Arg1, Arg2, Arg3))
|
||||
}
|
||||
}
|
||||
|
||||
Method (AJTP, 3, NotSerialized)
|
||||
{
|
||||
If (_OSI ("Darwin"))
|
||||
{
|
||||
Local0 = Arg1
|
||||
Acquire (BATM, 0xFFFF)
|
||||
HIID = Arg0
|
||||
Local1 = B1B2 (RC00, RC01)
|
||||
Release (BATM)
|
||||
If ((Arg0 == Zero))
|
||||
{
|
||||
Local2 = HB0S
|
||||
}
|
||||
Else
|
||||
{
|
||||
Local2 = HB1S
|
||||
}
|
||||
|
||||
If ((Local2 & 0x20))
|
||||
{
|
||||
If ((Arg2 > Zero))
|
||||
{
|
||||
Local0 += One
|
||||
}
|
||||
|
||||
If ((Local0 <= Local1))
|
||||
{
|
||||
Local0 = (Local1 + One)
|
||||
}
|
||||
}
|
||||
ElseIf ((Local2 & 0x40))
|
||||
{
|
||||
If ((Local0 >= Local1))
|
||||
{
|
||||
Local0 = (Local1 - One)
|
||||
}
|
||||
}
|
||||
|
||||
Return (Local0)
|
||||
}
|
||||
Else
|
||||
{
|
||||
Return (\_SB.PCI0.LPCB.EC.XJTP(Arg0, Arg1, Arg2))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* XCPM power management compatibility table.
|
||||
*/
|
||||
DefinitionBlock ("", "SSDT", 2, "CpuRef", "CpuPlug", 0x00003000)
|
||||
DefinitionBlock ("", "SSDT", 2, "OCLT", "CpuPlug", 0x00003000)
|
||||
{
|
||||
External (_PR.PR00, ProcessorObj)
|
||||
|
||||
|
@ -17,7 +17,7 @@ DefinitionBlock ("", "SSDT", 2, "CpuRef", "CpuPlug", 0x00003000)
|
|||
{
|
||||
Arg4 = Buffer (One)
|
||||
{
|
||||
0x03 // .
|
||||
0x03
|
||||
}
|
||||
Return (One)
|
||||
}
|
||||
|
@ -31,12 +31,12 @@ DefinitionBlock ("", "SSDT", 2, "CpuRef", "CpuPlug", 0x00003000)
|
|||
|
||||
Arg4 = Buffer (One)
|
||||
{
|
||||
0x00 // .
|
||||
0x00
|
||||
}
|
||||
Return (Zero)
|
||||
}
|
||||
|
||||
Method (_DSM, 4, NotSerialized) // _DSM: Device-Specific Method
|
||||
Method (_DSM, 4, NotSerialized)
|
||||
{
|
||||
Local0 = Package (0x02)
|
||||
{
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
//Add PMCR
|
||||
DefinitionBlock ("", "SSDT", 2, "ACDT", "PMCR", 0)
|
||||
DefinitionBlock ("", "SSDT", 2, "OCLT", "PMCR", 0)
|
||||
{
|
||||
External(_SB.PCI0.LPCB, DeviceObj)
|
||||
Scope (_SB.PCI0.LPCB)
|
||||
|
@ -19,7 +19,7 @@ DefinitionBlock ("", "SSDT", 2, "ACDT", "PMCR", 0)
|
|||
{
|
||||
If (_OSI ("Darwin"))
|
||||
{
|
||||
Return (0x0F)
|
||||
Return (0x0B)
|
||||
}
|
||||
Else
|
||||
{
|
||||
|
|
27
patches/SSDT-PNLF-SKL_KBL.dsl
Normal file
27
patches/SSDT-PNLF-SKL_KBL.dsl
Normal file
|
@ -0,0 +1,27 @@
|
|||
//
|
||||
DefinitionBlock("", "SSDT", 2, "OCLT", "PNLF", 0)
|
||||
{
|
||||
Scope(_SB)
|
||||
{
|
||||
Device(PNLF)
|
||||
{
|
||||
Name(_ADR, Zero)
|
||||
Name(_HID, EisaId ("APP0002"))
|
||||
Name(_CID, "backlight")
|
||||
//Skylake/KabyLake/KabyLake-R
|
||||
Name(_UID, 16)
|
||||
Method (_STA, 0, NotSerialized)
|
||||
{
|
||||
If (_OSI ("Darwin"))
|
||||
{
|
||||
Return (0x0B)
|
||||
}
|
||||
Else
|
||||
{
|
||||
Return (Zero)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//EOF
|
|
@ -1,256 +0,0 @@
|
|||
// Adding PNLF device for WhateverGreen.kext and others.
|
||||
// This is a modified PNLF version originally taken from RehabMan/OS-X-Clover-Laptop-Config repository:
|
||||
// https://raw.githubusercontent.com/RehabMan/OS-X-Clover-Laptop-Config/master/hotpatch/SSDT-PNLF.dsl
|
||||
// Rename GFX0 to anything else if your IGPU name is different.
|
||||
//
|
||||
// Licensed under GNU General Public License v2.0
|
||||
// https://github.com/RehabMan/OS-X-Clover-Laptop-Config/blob/master/License.md
|
||||
|
||||
#define FBTYPE_SANDYIVY 1
|
||||
#define FBTYPE_HSWPLUS 2
|
||||
#define FBTYPE_CFL 3
|
||||
|
||||
#define SANDYIVY_PWMMAX 0x710
|
||||
#define HASWELL_PWMMAX 0xad9
|
||||
#define SKYLAKE_PWMMAX 0x56c
|
||||
#define CUSTOM_PWMMAX_07a1 0x07a1
|
||||
#define CUSTOM_PWMMAX_1499 0x1499
|
||||
#define COFFEELAKE_PWMMAX 0xffff
|
||||
|
||||
DefinitionBlock("", "SSDT", 2, "ACDT", "PNLF", 0)
|
||||
{
|
||||
External(RMCF.BKLT, IntObj)
|
||||
External(RMCF.LMAX, IntObj)
|
||||
External(RMCF.LEVW, IntObj)
|
||||
External(RMCF.GRAN, IntObj)
|
||||
External(RMCF.FBTP, IntObj)
|
||||
|
||||
External(_SB.PCI0.GFX0, DeviceObj)
|
||||
Scope(_SB.PCI0.GFX0)
|
||||
{
|
||||
OperationRegion(RMP3, PCI_Config, 0, 0x14)
|
||||
}
|
||||
|
||||
// For backlight control
|
||||
Device(_SB.PCI0.GFX0.PNLF)
|
||||
{
|
||||
Name(_ADR, Zero)
|
||||
Name(_HID, EisaId("APP0002"))
|
||||
Name(_CID, "backlight")
|
||||
// _UID is set depending on PWMMax to match profiles in WhateverGreen.kext Info.plist
|
||||
// 14: Sandy/Ivy 0x710
|
||||
// 15: Haswell/Broadwell 0xad9
|
||||
// 16: Skylake/KabyLake 0x56c (and some Haswell, example 0xa2e0008)
|
||||
// 17: custom LMAX=0x7a1
|
||||
// 18: custom LMAX=0x1499
|
||||
// 19: CoffeeLake 0xffff
|
||||
// 99: Other (requires custom AppleBacklightInjector.kext/WhateverGreen.kext)
|
||||
Name(_UID, 0)
|
||||
Name(_STA, 0x0B)
|
||||
|
||||
Field(^RMP3, AnyAcc, NoLock, Preserve)
|
||||
{
|
||||
Offset(0x02), GDID,16,
|
||||
Offset(0x10), BAR1,32,
|
||||
}
|
||||
|
||||
// IGPU PWM backlight register descriptions:
|
||||
// LEV2 not currently used
|
||||
// LEVL level of backlight in Sandy/Ivy
|
||||
// P0BL counter, when zero is vertical blank
|
||||
// GRAN see description below in INI1 method
|
||||
// LEVW should be initialized to 0xC0000000
|
||||
// LEVX PWMMax except FBTYPE_HSWPLUS combo of max/level (Sandy/Ivy stored in MSW)
|
||||
// LEVD level of backlight for Coffeelake
|
||||
// PCHL not currently used
|
||||
OperationRegion(RMB1, SystemMemory, BAR1 & ~0xF, 0xe1184)
|
||||
Field(RMB1, AnyAcc, Lock, Preserve)
|
||||
{
|
||||
Offset(0x48250),
|
||||
LEV2, 32,
|
||||
LEVL, 32,
|
||||
Offset(0x70040),
|
||||
P0BL, 32,
|
||||
Offset(0xc2000),
|
||||
GRAN, 32,
|
||||
Offset(0xc8250),
|
||||
LEVW, 32,
|
||||
LEVX, 32,
|
||||
LEVD, 32,
|
||||
Offset(0xe1180),
|
||||
PCHL, 32,
|
||||
}
|
||||
|
||||
// INI1 is common code used by FBTYPE_HSWPLUS and FBTYPE_CFL
|
||||
Method(INI1, 1)
|
||||
{
|
||||
// INTEL OPEN SOURCE HD GRAPHICS, INTEL IRIS GRAPHICS, AND INTEL IRIS PRO GRAPHICS PROGRAMMER'S REFERENCE MANUAL (PRM)
|
||||
// FOR THE 2015-2016 INTEL CORE PROCESSORS, CELERON PROCESSORS AND PENTIUM PROCESSORS BASED ON THE "SKYLAKE" PLATFORM
|
||||
// Volume 12: Display (https://01.org/sites/default/files/documentation/intel-gfx-prm-osrc-skl-vol12-display.pdf)
|
||||
// page 189
|
||||
// Backlight Enabling Sequence
|
||||
// Description
|
||||
// 1. Set frequency and duty cycle in SBLC_PWM_CTL2 Backlight Modulation Frequency and Backlight Duty Cycle.
|
||||
// 2. Set granularity in 0xC2000 bit 0 (0 = 16, 1 = 128).
|
||||
// 3. Enable PWM output and set polarity in SBLC_PWM_CTL1 PWM PCH Enable and Backlight Polarity.
|
||||
// 4. Change duty cycle as needed in SBLC_PWM_CTL2 Backlight Duty Cycle.
|
||||
// This 0xC value comes from looking what OS X initializes this
|
||||
// register to after display sleep (using ACPIDebug/ACPIPoller)
|
||||
If (0 == (2 & Arg0))
|
||||
{
|
||||
Local5 = 0xC0000000
|
||||
If (CondRefOf(\RMCF.LEVW)) { If (Ones != \RMCF.LEVW) { Local5 = \RMCF.LEVW } }
|
||||
^LEVW = Local5
|
||||
}
|
||||
// from step 2 above (you may need 1 instead)
|
||||
If (4 & Arg0)
|
||||
{
|
||||
If (CondRefOf(\RMCF.GRAN)) { ^GRAN = \RMCF.GRAN }
|
||||
Else { ^GRAN = 0 }
|
||||
}
|
||||
}
|
||||
|
||||
Method(_INI)
|
||||
{
|
||||
// IntelBacklight.kext takes care of this at load time...
|
||||
// If RMCF.BKLT does not exist, it is assumed you want to use AppleBacklight.kext...
|
||||
Local4 = 1
|
||||
If (CondRefOf(\RMCF.BKLT)) { Local4 = \RMCF.BKLT }
|
||||
If (!(1 & Local4)) { Return }
|
||||
|
||||
// Adjustment required when using AppleBacklight.kext
|
||||
Local0 = ^GDID
|
||||
Local2 = Ones
|
||||
If (CondRefOf(\RMCF.LMAX)) { Local2 = \RMCF.LMAX }
|
||||
// Determine framebuffer type (for PWM register layout)
|
||||
Local3 = 0
|
||||
If (CondRefOf(\RMCF.FBTP)) { Local3 = \RMCF.FBTP }
|
||||
|
||||
// Now fixup the backlight PWM depending on the framebuffer type
|
||||
// At this point:
|
||||
// Local4 is RMCF.BLKT value, if specified (default is 1)
|
||||
// Local0 is device-id for IGPU
|
||||
// Local2 is LMAX, if specified (Ones means based on device-id)
|
||||
// Local3 is framebuffer type
|
||||
|
||||
// check Sandy/Ivy
|
||||
If (FBTYPE_SANDYIVY == Local3 || Ones != Match(Package()
|
||||
{
|
||||
// Sandy HD3000
|
||||
0x010b, 0x0102,
|
||||
0x0106, 0x1106, 0x1601, 0x0116, 0x0126,
|
||||
0x0112, 0x0122,
|
||||
// Ivy
|
||||
0x0152, 0x0156, 0x0162, 0x0166,
|
||||
0x016a,
|
||||
// Arrandale
|
||||
0x0046, 0x0042,
|
||||
}, MEQ, Local0, MTR, 0, 0))
|
||||
{
|
||||
if (Ones == Local2) { Local2 = SANDYIVY_PWMMAX }
|
||||
// change/scale only if different than current...
|
||||
Local1 = ^LEVX >> 16
|
||||
If (!Local1) { Local1 = Local2 }
|
||||
If (!(8 & Local4) && Local2 != Local1)
|
||||
{
|
||||
// set new backlight PWMMax but retain current backlight level by scaling
|
||||
Local0 = (^LEVL * Local2) / Local1
|
||||
//REVIEW: wait for vblank before setting new PWM config
|
||||
//For (Local7 = ^P0BL, ^P0BL == Local7, ) { }
|
||||
Local3 = Local2 << 16
|
||||
If (Local2 > Local1)
|
||||
{
|
||||
// PWMMax is getting larger... store new PWMMax first
|
||||
^LEVX = Local3
|
||||
^LEVL = Local0
|
||||
}
|
||||
Else
|
||||
{
|
||||
// otherwise, store new brightness level, followed by new PWMMax
|
||||
^LEVL = Local0
|
||||
^LEVX = Local3
|
||||
}
|
||||
}
|
||||
}
|
||||
// check CoffeeLake
|
||||
ElseIf (FBTYPE_CFL == Local3 || Ones != Match(Package()
|
||||
{
|
||||
// CoffeeLake identifiers from AppleIntelCFLGraphicsFramebuffer.kext
|
||||
0x3e9b, 0x3ea5, 0x3e92, 0x3e91,
|
||||
}, MEQ, Local0, MTR, 0, 0))
|
||||
{
|
||||
if (Ones == Local2) { Local2 = COFFEELAKE_PWMMAX }
|
||||
INI1(Local4)
|
||||
// change/scale only if different than current...
|
||||
Local1 = ^LEVX
|
||||
If (!Local1) { Local1 = Local2 }
|
||||
If (!(8 & Local4) && Local2 != Local1)
|
||||
{
|
||||
// set new backlight PWMMax but retain current backlight level by scaling
|
||||
Local0 = (^LEVD * Local2) / Local1
|
||||
//REVIEW: wait for vblank before setting new PWM config
|
||||
//For (Local7 = ^P0BL, ^P0BL == Local7, ) { }
|
||||
If (Local2 > Local1)
|
||||
{
|
||||
// PWMMax is getting larger... store new PWMMax first
|
||||
^LEVX = Local2
|
||||
^LEVD = Local0
|
||||
}
|
||||
Else
|
||||
{
|
||||
// otherwise, store new brightness level, followed by new PWMMax
|
||||
^LEVD = Local0
|
||||
^LEVX = Local2
|
||||
}
|
||||
}
|
||||
}
|
||||
// otherwise must be Haswell/Broadwell/Skylake/KabyLake/KabyLake-R (FBTYPE_HSWPLUS)
|
||||
Else
|
||||
{
|
||||
if (Ones == Local2)
|
||||
{
|
||||
// check Haswell and Broadwell, as they are both 0xad9 (for most common ig-platform-id values)
|
||||
If (Ones != Match(Package()
|
||||
{
|
||||
// Haswell
|
||||
0x0d26, 0x0a26, 0x0d22, 0x0412, 0x0416, 0x0a16, 0x0a1e, 0x0a1e, 0x0a2e, 0x041e, 0x041a,
|
||||
// Broadwell
|
||||
0x0bd1, 0x0bd2, 0x0BD3, 0x1606, 0x160e, 0x1616, 0x161e, 0x1626, 0x1622, 0x1612, 0x162b,
|
||||
}, MEQ, Local0, MTR, 0, 0))
|
||||
{
|
||||
Local2 = HASWELL_PWMMAX
|
||||
}
|
||||
Else
|
||||
{
|
||||
// assume Skylake/KabyLake/KabyLake-R, both 0x56c
|
||||
// 0x1916, 0x191E, 0x1926, 0x1927, 0x1912, 0x1932, 0x1902, 0x1917, 0x191b,
|
||||
// 0x5916, 0x5912, 0x591b, others...
|
||||
Local2 = SKYLAKE_PWMMAX
|
||||
}
|
||||
}
|
||||
INI1(Local4)
|
||||
// change/scale only if different than current...
|
||||
Local1 = ^LEVX >> 16
|
||||
If (!Local1) { Local1 = Local2 }
|
||||
If (!(8 & Local4) && Local2 != Local1)
|
||||
{
|
||||
// set new backlight PWMAX but retain current backlight level by scaling
|
||||
Local0 = (((^LEVX & 0xFFFF) * Local2) / Local1) | (Local2 << 16)
|
||||
//REVIEW: wait for vblank before setting new PWM config
|
||||
//For (Local7 = ^P0BL, ^P0BL == Local7, ) { }
|
||||
^LEVX = Local0
|
||||
}
|
||||
}
|
||||
|
||||
// Now Local2 is the new PWMMax, set _UID accordingly
|
||||
// The _UID selects the correct entry in AppleBacklightFixup.kext
|
||||
If (Local2 == SANDYIVY_PWMMAX) { _UID = 14 }
|
||||
ElseIf (Local2 == HASWELL_PWMMAX) { _UID = 15 }
|
||||
ElseIf (Local2 == SKYLAKE_PWMMAX) { _UID = 16 }
|
||||
ElseIf (Local2 == CUSTOM_PWMMAX_07a1) { _UID = 17 }
|
||||
ElseIf (Local2 == CUSTOM_PWMMAX_1499) { _UID = 18 }
|
||||
ElseIf (Local2 == COFFEELAKE_PWMMAX) { _UID = 19 }
|
||||
Else { _UID = 99 }
|
||||
}
|
||||
}
|
||||
}
|
16
patches/SSDT-PTSWAK.dsl
Executable file → Normal file
16
patches/SSDT-PTSWAK.dsl
Executable file → Normal file
|
@ -15,7 +15,7 @@
|
|||
// Find: 5F57414B09
|
||||
// Replace: 5A57414B09
|
||||
//
|
||||
DefinitionBlock("", "SSDT", 2, "ACDT", "PTSWAK", 0)
|
||||
DefinitionBlock("", "SSDT", 2, "OCLT", "PTSWAK", 0)
|
||||
{
|
||||
External(ZPTS, MethodObj)
|
||||
External(ZWAK, MethodObj)
|
||||
|
@ -23,6 +23,8 @@ DefinitionBlock("", "SSDT", 2, "ACDT", "PTSWAK", 0)
|
|||
External(EXT2, MethodObj)
|
||||
External(EXT3, MethodObj)
|
||||
External(EXT4, MethodObj)
|
||||
External(DGPU._ON, MethodObj)
|
||||
External(DGPU._OFF, MethodObj)
|
||||
|
||||
Scope (_SB)
|
||||
{
|
||||
|
@ -58,6 +60,12 @@ DefinitionBlock("", "SSDT", 2, "ACDT", "PTSWAK", 0)
|
|||
{
|
||||
Arg0 = 3
|
||||
}
|
||||
|
||||
If (CondRefOf (\DGPU._ON))
|
||||
{
|
||||
\DGPU._ON ()
|
||||
}
|
||||
|
||||
If (CondRefOf(EXT1))
|
||||
{
|
||||
EXT1(Arg0)
|
||||
|
@ -82,6 +90,12 @@ DefinitionBlock("", "SSDT", 2, "ACDT", "PTSWAK", 0)
|
|||
\_SB.PCI9.FNOK =0
|
||||
Arg0 = 3
|
||||
}
|
||||
|
||||
If (CondRefOf (\DGPU._OFF))
|
||||
{
|
||||
\DGPU._OFF ()
|
||||
}
|
||||
|
||||
If (CondRefOf(EXT3))
|
||||
{
|
||||
EXT3(Arg0)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
//Add PWRB
|
||||
DefinitionBlock("", "SSDT", 2, "ACDT", "PNP0C0C", 0)
|
||||
DefinitionBlock("", "SSDT", 2, "OCLT", "PNP0C0C", 0)
|
||||
{
|
||||
//search PNP0C0C
|
||||
Scope (\_SB)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
//
|
||||
DefinitionBlock ("", "SSDT", 2, "hack", "SBUS", 0)
|
||||
DefinitionBlock ("", "SSDT", 2, "OCLT", "SBUS", 0)
|
||||
{
|
||||
External (_SB_.PCI0.SBUS, DeviceObj)
|
||||
|
||||
|
|
BIN
patches/compiled/SSDT-ALS0.aml
Normal file
BIN
patches/compiled/SSDT-ALS0.aml
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
patches/compiled/SSDT-GPRW.aml
Normal file
BIN
patches/compiled/SSDT-GPRW.aml
Normal file
Binary file not shown.
Binary file not shown.
BIN
patches/compiled/SSDT-Keyboard.aml
Normal file
BIN
patches/compiled/SSDT-Keyboard.aml
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
patches/compiled/SSDT-OCBAT0-TP_tx80_x1c6th.aml
Normal file
BIN
patches/compiled/SSDT-OCBAT0-TP_tx80_x1c6th.aml
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
patches/compiled/SSDT-PNLF-SKL_KBL.aml
Normal file
BIN
patches/compiled/SSDT-PNLF-SKL_KBL.aml
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in a new issue