Skip to content

Commit

Permalink
Attempt to fix #197 by using back USBInjectAll, credit @jackxuechen
Browse files Browse the repository at this point in the history
  • Loading branch information
stevezhengshiqi committed Jun 28, 2019
1 parent 1ac2c24 commit 67088a8
Show file tree
Hide file tree
Showing 20 changed files with 14,168 additions and 1,236 deletions.
Binary file added EFI/CLOVER/ACPI/patched/SSDT-USB.aml
Binary file not shown.
172 changes: 172 additions & 0 deletions EFI/CLOVER/ACPI/patched/SSDT-USB.dsl
Original file line number Diff line number Diff line change
@@ -0,0 +1,172 @@
// Necessary hotpatch
// Maintained by: stevezhengshiqi
// Reference: https://www.tonymacx86.com/threads/guide-creating-a-custom-ssdt-for-usbinjectall-kext.211311 by Rehabman
// USB power injection and patch USB ports, pair with USBInjectAll.kext

DefinitionBlock ("", "SSDT", 2, "hack", "_USB", 0x00000000)
{
Device (_SB.USBX)
{
Name (_ADR, Zero) // _ADR: Address
Method (_DSM, 4, NotSerialized) // _DSM: Device-Specific Method
{
If (!Arg2)
{
Return (Buffer (One)
{
0x03 // .
})
}

Return (Package (0x04)
{
"kUSBSleepPortCurrentLimit",
0x0BB8,
"kUSBWakePortCurrentLimit",
0x0BB8
})
}
}

Device (UIAC)
{
Name (_HID, "UIA00000") // _HID: Hardware ID
Name (RMCF, Package (0x02)
{
"8086_9d2f",
Package (0x04)
{
"port-count",
Buffer (0x04)
{
0x12, 0x00, 0x00, 0x00 // ....
},

"ports",
Package (0x14)
{
"HS01",
Package (0x04)
{
"UsbConnector",
0x03,
"port",
Buffer (0x04)
{
0x01, 0x00, 0x00, 0x00 // ....
}
},

"HS03",
Package (0x04)
{
"UsbConnector",
0x03,
"port",
Buffer (0x04)
{
0x03, 0x00, 0x00, 0x00 // ....
}
},

"HS04",
Package (0x04)
{
"UsbConnector",
0x03,
"port",
Buffer (0x04)
{
0x04, 0x00, 0x00, 0x00 // ....
}
},

"HS05",
Package (0x04)
{
"UsbConnector",
0xFF,
"port",
Buffer (0x04)
{
0x05, 0x00, 0x00, 0x00 // ....
}
},

"HS06",
Package (0x04)
{
"UsbConnector",
0xFF,
"port",
Buffer (0x04)
{
0x06, 0x00, 0x00, 0x00 // ....
}
},

"HS09",
Package (0x04)
{
"UsbConnector",
0x03,
"port",
Buffer (0x04)
{
0x09, 0x00, 0x00, 0x00 // ....
}
},

"SS01",
Package (0x04)
{
"UsbConnector",
0x03,
"port",
Buffer (0x04)
{
0x0D, 0x00, 0x00, 0x00 // ....
}
},

"SS02",
Package (0x04)
{
"UsbConnector",
0x03,
"port",
Buffer (0x04)
{
0x0E, 0x00, 0x00, 0x00 // ....
}
},

"SS03",
Package (0x04)
{
"UsbConnector",
0x03,
"port",
Buffer (0x04)
{
0x0F, 0x00, 0x00, 0x00 // ....
}
},

"SS04",
Package (0x04)
{
"UsbConnector",
0x03,
"port",
Buffer (0x04)
{
0x10, 0x00, 0x00, 0x00 // ....
}
}
}
}
})
}
}

10 changes: 9 additions & 1 deletion EFI/CLOVER/config.plist
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
<false/>
<key>Timeout</key>
<integer>4</integer>
<key>NeverHibernate</key>
<key>RtcHibernateAware</key>
<true/>
</dict>
<key>Devices</key>
Expand Down Expand Up @@ -362,6 +362,14 @@
</array>
<key>KernelToPatch</key>
<array>
<dict>
<key>Comment</key>
<string>MSR 0xE2 _xcpm_idle instant reboot(c) Pike R. Alpha</string>
<key>Find</key>
<data>ILniAAAADzA=</data>
<key>Replace</key>
<data>ILniAAAAkJA=</data>
</dict>
<dict>
<key>Comment</key>
<string>Disable panic kext logging on 10.13 release kernel (credit vit9696)</string>
Expand Down
Loading

0 comments on commit 67088a8

Please sign in to comment.