Contribute
Register

[Guide] Creating a Custom SSDT for USBInjectAll.kext

Yes,... now you can do port discovery and create custom SSDT.

Except my USB3.1 ports (Which are not connected to the Intel chipset) the discovery was done.
Bit suprised about the result because I thought HSXX for USB2 will be also SSXX for USB3, but that isn't so.

For me it looks like this:
External USB2 connector to onboard ports 20/21 (as described in the system manual):
HS01
HS02
HS12
HS13
External USB2 connector to onboard port 19
HS 10
HS 11
External USB3 connector to onboard port 7
HS05 / SS06
I/O Panel port 10
HS09 / SS03
HS08 / SS04
I/O Panel Port 15
HS07 / SS02
HS06 / SS01

But now I have some doubts about the right configuration.

Code:
DefinitionBlock ("", "SSDT", 2, "hack", "UIAC-ALL", 0)
{
    Device(UIAC)
    {
        Name(_HID, "UIA00000")

        Name(RMCF, Package()
        {
            "8086_8xxx", Package()
            {
                "port-count", Buffer() { 16, 0, 0, 0 },
                "ports", Package()
                {
                    "HS01", Package()
                    {
                        "UsbConnector", 3,
                        "port", Buffer() { 1, 0, 0, 0 },
                    },
                    "HS02", Package()
                    {
                        "UsbConnector", 3,
                        "port", Buffer() { 2, 0, 0, 0 },
                    },
                    "HS05", Package()
                    {
                        "UsbConnector", 3,
                        "port", Buffer() { 5, 0, 0, 0 },
                    },
                    "HS06", Package()
                    {
                        "UsbConnector", 3,
                        "port", Buffer() { 6, 0, 0, 0 },
                    },
                    "HS07", Package()
                    {
                        "UsbConnector", 3,
                        "port", Buffer() { 7, 0, 0, 0 },
                    },
                    "HS08", Package()
                    {
                        "UsbConnector", 3,
                        "port", Buffer() { 8, 0, 0, 0 },
                    },
                    "HS09", Package()
                    {
                        "UsbConnector", 3,
                        "port", Buffer() { 9, 0, 0, 0 },
                    },
                    "HS10", Package()
                    {
                        "UsbConnector", 3,
                        "port", Buffer() { 10, 0, 0, 0 },
                    },
                    "HS11", Package()
                    {
                        "UsbConnector", 3,
                        "port", Buffer() { 11, 0, 0, 0 },
                    },
                    "HS12", Package()
                    {
                        "UsbConnector", 3,
                        "port", Buffer() { 12, 0, 0, 0 },
                    },
                    "HS13", Package()
                    {
                        "UsbConnector", 3,
                        "port", Buffer() { 13, 0, 0, 0 },
                    },
                    "SS01", Package()
                    {
                        "UsbConnector", 3,
                        "port", Buffer() { 17, 0, 0, 0 },
                    },
                    "SS02", Package()
                    {
                        "UsbConnector", 3,
                        "port", Buffer() { 18, 0, 0, 0 },
                    },
                    "SS03", Package()
                    {
                        "UsbConnector", 3,
                        "port", Buffer() { 19, 0, 0, 0 },
                    },
                    "SS04", Package()
                    {
                        "UsbConnector", 3,
                        "port", Buffer() { 20, 0, 0, 0 },
                    },
                    "SS06", Package()
                    {
                        "UsbConnector", 3,
                        "port", Buffer() { 22, 0, 0, 0 },
                    },
                },
            },
        })
    }
}
//EOF

Name(RMCF, Package() -> What is "RMCF"?
"8086_8xxx", Package() -> What is "8086_8xxx"?
 
Bit suprised about the result because I thought HSXX for USB2 will be also SSXX for USB3, but that isn't so.

The numbers used for HSxx/SSxx pairs do not necessarily match. OEM choice.

Name(RMCF, Package() -> What is "RMCF"?

It is the object that USBInjectAll.kext evaluates to obtain configuration data overrides.

"8086_8xxx", Package() -> What is "8086_8xxx"?

It matches against any XHC with a hex device-id starting with 8.
 
Hi, I have some problems with my last build:

High Sierra 10.13.5 - SMBIOS iMac18,3
MB GB H310M H
CPU i3-8100
Graphics Palit GTX 760 (without web driver)

The main problem is that sometimes I have a reboot after shutdown.
Less important is the fact that if I put the machine in sleep, I get a "crash" with a restart.
I also add that the shutdown is strangely longer than usual (1-2 minutes).

Everything else works perfectly, even better than expected considering the hardware.
My first suspicion is a problem with the usb ports, I noticed in fact that if I turn off the computer with an external USB3 HD connected I get a reboot.
Other USB devices are a BT keyboard and mouse, as well as a USB-wifi antenna (Edimax EW-7612UAN V2) with driver for MacOS HS (which I have now moved to a USB2 port).

What could cause the problem?
 

Attachments

  • Problem Reporting.zip
    21.1 MB · Views: 116
Hi, I have some problems with my last build:

High Sierra 10.13.5 - SMBIOS iMac18,3
MB GB H310M H
CPU i3-8100
Graphics Palit GTX 760 (without web driver)

The main problem is that sometimes I have a reboot after shutdown.
Less important is the fact that if I put the machine in sleep, I get a "crash" with a restart.
I also add that the shutdown is strangely longer than usual (1-2 minutes).

Everything else works perfectly, even better than expected considering the hardware.
My first suspicion is a problem with the usb ports, I noticed in fact that if I turn off the computer with an external USB3 HD connected I get a reboot.
Other USB devices are a BT keyboard and mouse, as well as a USB-wifi antenna (Edimax EW-7612UAN V2) with driver for MacOS HS (which I have now moved to a USB2 port).

What could cause the problem?

Off-topic (your problems are not likely related to USB port injection).
 
Off-topic (your problems are not likely related to USB port injection).
Currently I do not know exactly what the problem is, but I know for sure that the computer will restart if a USB3 device is connected :think:
 
You might check your BIOS settings (ErP related?).
ERP already active and the bios is configured as in my other two builds (which work perfectly).
Thanks for your help, I'll try to find out what else causes the problem
 
Hi there,

I have my homework and Intel USB ports are working perfectly fine (and hopefully are correctly configured in my SSDT) but I have an annoying problem with Asmedia USB 3.1 A/C ports of my motherboard (Asus Z370 Prime A as you can see in my signature), which return the classic error:

Screenshot 2018-07-02 16.48.43.png

and I haven't been able to get rid of it. Nevertheless after waking the USB devices are correctly connected again in any case but still I got that message. Her you have my IOreg and Clover folder. Please have a look, thank you!
 

Attachments

  • problem reporting.zip
    4.9 MB · Views: 50
Hi there,

I have my homework and Intel USB ports are working perfectly fine (and hopefully are correctly configured in my SSDT) but I have an annoying problem with Asmedia USB 3.1 A/C ports of my motherboard (Asus Z370 Prime A as you can see in my signature), which return the classic error:

View attachment 338914

and I haven't been able to get rid of it. Nevertheless after waking the USB devices are correctly connected again in any case but still I got that message. Her you have my IOreg and Clover folder. Please have a look, thank you!

Off-topic.
As per post #1 this guide is only for Intel USB controllers (xHCI and EHCI).
 
Hello @RehabMan! Thanks for taking the time to make this guide!

I'm having a bit of a problem though,

After renaming everything, applying the correct port limit patch and installing your kext, I go into IORegistryExplorer app, I scroll down (not using the Search Bar) to look for XHC and I cannot expand to see any info on the ports to get info from them, even though I have USB devices plugged into some of those ports. I mean, there's no triangle to expand any info but a USB drive using one of the ports is showing up in the desktop, kind of bizarre..

I do see plugged in devices in EH01. Don't know what might be working wrong..
Screen Shot 2018-07-04 at 00.21.18.png

Screen Shot 2018-07-04 at 00.24.52.png

Screen Shot 2018-07-04 at 00.21.47.png


I'm sure it's a stupid problem, but it got me stuck.. :banghead:

Do you know what I'm doing wrong? It's frustrating!

Again, thanks a lot for this great guide!
 
Last edited:
Back
Top