Skip to content

Commit

Permalink
add SSDT-USB.dsl; drop MCFG table; change to MacBookPro8,2
Browse files Browse the repository at this point in the history
  • Loading branch information
RehabMan committed May 10, 2016
1 parent d3c5720 commit d204b56
Show file tree
Hide file tree
Showing 14 changed files with 173 additions and 4 deletions.
2 changes: 2 additions & 0 deletions Patches.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
ED9956161C94BA0C00B3B13F /* SSDT-XOSI.dsl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "SSDT-XOSI.dsl"; path = "hotpatch/SSDT-XOSI.dsl"; sourceTree = "<group>"; };
ED9956171C94BA0C00B3B13F /* SSDT-SMBUS.dsl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "SSDT-SMBUS.dsl"; path = "hotpatch/SSDT-SMBUS.dsl"; sourceTree = "<group>"; };
ED9956181C94BA0C00B3B13F /* SSDT-PNLF.dsl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "SSDT-PNLF.dsl"; path = "hotpatch/SSDT-PNLF.dsl"; sourceTree = "<group>"; };
ED9E1B951CD049C2008776A7 /* SSDT-USB.dsl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "SSDT-USB.dsl"; path = "hotpatch/SSDT-USB.dsl"; sourceTree = "<group>"; };
EDAC054D1CA38DDB00109CA4 /* SSDT-PluginType1.dsl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "SSDT-PluginType1.dsl"; path = "hotpatch/SSDT-PluginType1.dsl"; sourceTree = "<group>"; };
EDB68B771C99B72500147700 /* SSDT-XSEL.dsl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "SSDT-XSEL.dsl"; path = "hotpatch/SSDT-XSEL.dsl"; sourceTree = "<group>"; };
EDBE0CBD1CC2CA920008EF8F /* SSDT-Debug.dsl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "SSDT-Debug.dsl"; path = "hotpatch/SSDT-Debug.dsl"; sourceTree = "<group>"; };
Expand Down Expand Up @@ -107,6 +108,7 @@
EDAC054D1CA38DDB00109CA4 /* SSDT-PluginType1.dsl */,
ED02043F1CA770A2006E7175 /* SSDT-HDEF.dsl */,
ED0204401CA770A2006E7175 /* SSDT-HDAU.dsl */,
ED9E1B951CD049C2008776A7 /* SSDT-USB.dsl */,
ED02043E1CA77082006E7175 /* SSDT-EH01.dsl */,
ED02043D1CA77082006E7175 /* SSDT-EH02.dsl */,
ED02043C1CA77082006E7175 /* SSDT-XHC.dsl */,
Expand Down
10 changes: 9 additions & 1 deletion config_HD3000_1366x768.plist
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,21 @@
</dict>
<key>DropTables</key>
<array>
<dict>
<key>Signature</key>
<string>MCFG</string>
</dict>
<dict>
<key>Signature</key>
<string>DMAR</string>
</dict>
</array>
<key>#DropTables</key>
<array>
<dict>
<key>Signature</key>
<string>MCFG</string>
</dict>
<dict>
<key>Signature</key>
<string>DMAR</string>
Expand Down Expand Up @@ -460,7 +468,7 @@
<key>SMBIOS</key>
<dict>
<key>ProductName</key>
<string>MacBookPro8,1</string>
<string>MacBookPro8,2</string>
<key>Trust</key>
<true/>
</dict>
Expand Down
10 changes: 9 additions & 1 deletion config_HD3000_1366x768_7series.plist
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,21 @@
</dict>
<key>DropTables</key>
<array>
<dict>
<key>Signature</key>
<string>MCFG</string>
</dict>
<dict>
<key>Signature</key>
<string>DMAR</string>
</dict>
</array>
<key>#DropTables</key>
<array>
<dict>
<key>Signature</key>
<string>MCFG</string>
</dict>
<dict>
<key>Signature</key>
<string>DMAR</string>
Expand Down Expand Up @@ -373,7 +381,7 @@
<key>SMBIOS</key>
<dict>
<key>ProductName</key>
<string>MacBookPro8,1</string>
<string>MacBookPro8,2</string>
<key>Trust</key>
<true/>
</dict>
Expand Down
10 changes: 9 additions & 1 deletion config_HD3000_1600x900.plist
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,21 @@
</dict>
<key>DropTables</key>
<array>
<dict>
<key>Signature</key>
<string>MCFG</string>
</dict>
<dict>
<key>Signature</key>
<string>DMAR</string>
</dict>
</array>
<key>#DropTables</key>
<array>
<dict>
<key>Signature</key>
<string>MCFG</string>
</dict>
<dict>
<key>Signature</key>
<string>DMAR</string>
Expand Down Expand Up @@ -470,7 +478,7 @@
<key>SMBIOS</key>
<dict>
<key>ProductName</key>
<string>MacBookPro8,1</string>
<string>MacBookPro8,2</string>
<key>Trust</key>
<true/>
</dict>
Expand Down
10 changes: 9 additions & 1 deletion config_HD3000_1600x900_7series.plist
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,21 @@
</dict>
<key>DropTables</key>
<array>
<dict>
<key>Signature</key>
<string>MCFG</string>
</dict>
<dict>
<key>Signature</key>
<string>DMAR</string>
</dict>
</array>
<key>#DropTables</key>
<array>
<dict>
<key>Signature</key>
<string>MCFG</string>
</dict>
<dict>
<key>Signature</key>
<string>DMAR</string>
Expand Down Expand Up @@ -383,7 +391,7 @@
<key>SMBIOS</key>
<dict>
<key>ProductName</key>
<string>MacBookPro8,1</string>
<string>MacBookPro8,2</string>
<key>Trust</key>
<true/>
</dict>
Expand Down
8 changes: 8 additions & 0 deletions config_HD4000_1366x768.plist
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,21 @@
</dict>
<key>DropTables</key>
<array>
<dict>
<key>Signature</key>
<string>MCFG</string>
</dict>
<dict>
<key>Signature</key>
<string>DMAR</string>
</dict>
</array>
<key>#DropTables</key>
<array>
<dict>
<key>Signature</key>
<string>MCFG</string>
</dict>
<dict>
<key>Signature</key>
<string>DMAR</string>
Expand Down
8 changes: 8 additions & 0 deletions config_HD4000_1366x768_6series.plist
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,21 @@
</dict>
<key>DropTables</key>
<array>
<dict>
<key>Signature</key>
<string>MCFG</string>
</dict>
<dict>
<key>Signature</key>
<string>DMAR</string>
</dict>
</array>
<key>#DropTables</key>
<array>
<dict>
<key>Signature</key>
<string>MCFG</string>
</dict>
<dict>
<key>Signature</key>
<string>DMAR</string>
Expand Down
8 changes: 8 additions & 0 deletions config_HD4000_1600x900.plist
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,21 @@
</dict>
<key>DropTables</key>
<array>
<dict>
<key>Signature</key>
<string>MCFG</string>
</dict>
<dict>
<key>Signature</key>
<string>DMAR</string>
</dict>
</array>
<key>#DropTables</key>
<array>
<dict>
<key>Signature</key>
<string>MCFG</string>
</dict>
<dict>
<key>Signature</key>
<string>DMAR</string>
Expand Down
8 changes: 8 additions & 0 deletions config_HD4000_1600x900_6series.plist
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,21 @@
</dict>
<key>DropTables</key>
<array>
<dict>
<key>Signature</key>
<string>MCFG</string>
</dict>
<dict>
<key>Signature</key>
<string>DMAR</string>
</dict>
</array>
<key>#DropTables</key>
<array>
<dict>
<key>Signature</key>
<string>MCFG</string>
</dict>
<dict>
<key>Signature</key>
<string>DMAR</string>
Expand Down
8 changes: 8 additions & 0 deletions config_HD4600_4400_4200.plist
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,21 @@
</dict>
<key>DropTables</key>
<array>
<dict>
<key>Signature</key>
<string>MCFG</string>
</dict>
<dict>
<key>Signature</key>
<string>DMAR</string>
</dict>
</array>
<key>#DropTables</key>
<array>
<dict>
<key>Signature</key>
<string>MCFG</string>
</dict>
<dict>
<key>Signature</key>
<string>DMAR</string>
Expand Down
8 changes: 8 additions & 0 deletions config_HD5000_5100_5200.plist
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,21 @@
</dict>
<key>DropTables</key>
<array>
<dict>
<key>Signature</key>
<string>MCFG</string>
</dict>
<dict>
<key>Signature</key>
<string>DMAR</string>
</dict>
</array>
<key>#DropTables</key>
<array>
<dict>
<key>Signature</key>
<string>MCFG</string>
</dict>
<dict>
<key>Signature</key>
<string>DMAR</string>
Expand Down
8 changes: 8 additions & 0 deletions config_HD520_530_540.plist
Original file line number Diff line number Diff line change
Expand Up @@ -95,13 +95,21 @@
</dict>
<key>DropTables</key>
<array>
<dict>
<key>Signature</key>
<string>MCFG</string>
</dict>
<dict>
<key>Signature</key>
<string>DMAR</string>
</dict>
</array>
<key>#DropTables</key>
<array>
<dict>
<key>Signature</key>
<string>MCFG</string>
</dict>
<dict>
<key>Signature</key>
<string>DMAR</string>
Expand Down
8 changes: 8 additions & 0 deletions config_HD5300_5500_5600_6000.plist
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,21 @@
</dict>
<key>DropTables</key>
<array>
<dict>
<key>Signature</key>
<string>MCFG</string>
</dict>
<dict>
<key>Signature</key>
<string>DMAR</string>
</dict>
</array>
<key>#DropTables</key>
<array>
<dict>
<key>Signature</key>
<string>MCFG</string>
</dict>
<dict>
<key>Signature</key>
<string>DMAR</string>
Expand Down
71 changes: 71 additions & 0 deletions hotpatch/SSDT-USB.dsl
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
// Automatic injection of USB power properties for EH01/EH02/XHC

DefinitionBlock("", "SSDT", 2, "hack", "EH01", 0)
{

// inject properties for ECHI#1
External(_SB.PCI0.EH01, DeviceObj)
if (CondRefOf(_SB.PCI0.EH01))
{
Method(_SB.PCI0.EH01._DSM, 4)
{
If (!Arg2) { Return (Buffer() { 0x03 } ) }
Return (Package()
{
"subsystem-id", Buffer() { 0x70, 0x72, 0x00, 0x00 },
"subsystem-vendor-id", Buffer() { 0x86, 0x80, 0x00, 0x00 },
"AAPL,current-available", Buffer() { 0x34, 0x08, 0, 0 },
"AAPL,current-extra", Buffer() { 0x98, 0x08, 0, 0, },
"AAPL,current-extra-in-sleep", Buffer() { 0x40, 0x06, 0, 0, },
"AAPL,max-port-current-in-sleep", Buffer() { 0x34, 0x08, 0, 0 },
})
}
}

// inject properties for EHCI#2
External(_SB.PCI0.EH02, DeviceObj)
if (CondRefOf(_SB.PCI0.EH02))
{
Method(_SB.PCI0.EH02._DSM, 4)
{
If (!Arg2) { Return (Buffer() { 0x03 } ) }
Return (Package()
{
"subsystem-id", Buffer() { 0x70, 0x72, 0x00, 0x00 },
"subsystem-vendor-id", Buffer() { 0x86, 0x80, 0x00, 0x00 },
"AAPL,current-available", Buffer() { 0x34, 0x08, 0, 0 },
"AAPL,current-extra", Buffer() { 0x98, 0x08, 0, 0, },
"AAPL,current-extra-in-sleep", Buffer() { 0x40, 0x06, 0, 0, },
"AAPL,max-port-current-in-sleep", Buffer() { 0x34, 0x08, 0, 0 },
})
}
}

// inject properties for XHCI
External(_SB.PCI0.XHC, DeviceObj)
if (CondRefOf(_SB.PCI0.XHC))
{
Method(_SB.PCI0.XHC._DSM, 4)
{
If (!Arg2) { Return (Buffer() { 0x03 } ) }
Local0 = Package()
{
"RM,pr2-force", Buffer() { 0, 0, 0, 0 },
"subsystem-id", Buffer() { 0x70, 0x72, 0x00, 0x00 },
"subsystem-vendor-id", Buffer() { 0x86, 0x80, 0x00, 0x00 },
"AAPL,current-available", Buffer() { 0x34, 0x08, 0, 0 },
"AAPL,current-extra", Buffer() { 0x98, 0x08, 0, 0, },
"AAPL,current-extra-in-sleep", Buffer() { 0x40, 0x06, 0, 0, },
"AAPL,max-port-current-in-sleep", Buffer() { 0x34, 0x08, 0, 0 },
}
// force USB2 on XHC if EHCI is disabled
If (CondRefOf(_SB.PCI0.RMD2))
{
CreateDWordField(DerefOf(Local0[1]), 0, PR2F)
PR2F = 0x3fff
}
Return(Local0)
}
}
}
//EOF

0 comments on commit d204b56

Please sign in to comment.