Contribute
Register

A Beginner's Guide to Creating a Custom USB SSDT

Comment: “Change XHC1 to XHC_” Find*: “58484331” Replace: “5848435f”

where did you get those values?
 
Ok...so during the creation of the SSDT phase, as well as afterwards, leave USBInjectAll.kext in either L/E or Clover/kexts/Other, both location is fine, correct?

also, what about FakePCIID.kext & FakePCIID_XHCIMux.kext? Can they be installed in both locations as well? Do they need to be installed prior to the port discovery? How do I know I need them? My BIOS does have such an option to enable EHCI Hand-Off.

Okay.

1) After you have created your SSDT you still need USBInjectAll.kext. Most people keep it in L/E. But as we discussed before... etc

2) The FakePCIID_XHCIMux.kext is used with EHCI controllers. If you have very many USB ports you can divert the USB2 ports to EHC instead, leaving XHCI for USB3. Personally I go with only XHC and have no need for EHC. In your case I would try without EHC first as you have an SSDT ( so no FakePCIID_XHCIMux.kext). But that is your choice. If you are going to use it, put it in L/E.

I am not a fan of duplicate kexts anywhere. However it makes sense to have FakeSMC.kext in EFI/CLOVER/kexts/Other. See this guide for more detail.

:)
 
Last edited:
Comment: “Change XHC1 to XHC_” Find*: “58484331” Replace: “5848435f”

where did you get those values?

No need to use anything you do not want to. This is just a Beginner's Guide to USB port config.

Nothing is compulsory. Please do your own research if you would rather use a different method etc:thumbup:
 
No need to use anything you do not want to. This is just a Beginner's Guide to USB port config.

Nothing is compulsory. Please do your own research if you would rather use a different method etc:thumbup:

Nono i was wondering where you got those values from, and if it should be different for my motherboard.
 
Nono i was wondering where you got those values from, and if it should be different for my motherboard.

Ah, right :thumbup:

The value should be the same. All it is doing is renaming a controller to match what macOS expects. Changing a byte. Check 31 and 5f character codes in hexadecimal :). The chances are you will not need it.

Check IORegistryExplorer and see if XHC shows up before using it. For example I do not need it. You might not either.

:)
 
I tried my best and follow every instruction but I think it is not working as it should be. When I check it with IORegistryExplorer it shows the same number of ports that were showing before patching. I have attached both the template file and a screenshot of IORegistryExplorer result.

Any help will be highly appreciated. Thank you very much.
 

Attachments

  • Kevin’s_iMac_—_IOService_—_HS01_14100000.png
    Kevin’s_iMac_—_IOService_—_HS01_14100000.png
    116.9 KB · Views: 63
  • SSDT-USB-Template.dsl
    4.1 KB · Views: 65
I tried disabling the rename XHC patches and looks like the results are the same in IORegistryExplorer.

For my specific motherboard, under System Report, I have 3 USB devices, a USB 2.0 BUS with 8C26 device id, another USB 2.0 BUS with 8C2d device id, and a USB 3.0 BUS with 8C31 device id.

The two USB 2.0 BUS corresponds to two EHCI USB 2.0 Headers on the motherboard. One of them connected to the USB 2.0 ports on the front of the case, the other is connected to the Wifi/BT card.

Please help me with the following questions I have

1) Can I ignore the EHCI kexts? just use XHC? Every single port seems to be showing up under XHC in IORegistryExplorer.

2) How many devices/packages should I have in the SSDT file? Can i simply use 8086_8xxx since all three devices starts with an 8?


402244
 
I tried my best and follow every instruction but I think it is not working as it should be. When I check it with IORegistryExplorer it shows the same number of ports that were showing before patching. I have attached both the template file and a screenshot of IORegistryExplorer result.

Any help will be highly appreciated. Thank you very much.

Hello there.

Please complete your hardware Profile so that we can help you with your problem. It's a part of the site Rules :thumbup:

Okay, well I'm guessing you have a Z97 or similar motherboard (?) But I can't tell which macOS.

Your SSDT has many errors in it. For example you use the same address for many ports. HS01 is 0x01 and so is SS01. Four ports use 0x09 and two ports use 0x0a. Each port should have a unique address. Please check the guide again.

:)
 
I tried disabling the rename XHC patches and looks like the results are the same in IORegistryExplorer.

For my specific motherboard, under System Report, I have 3 USB devices, a USB 2.0 BUS with 8C26 device id, another USB 2.0 BUS with 8C2d device id, and a USB 3.0 BUS with 8C31 device id.

The two USB 2.0 BUS corresponds to two EHCI USB 2.0 Headers on the motherboard. One of them connected to the USB 2.0 ports on the front of the case, the other is connected to the Wifi/BT card.

Please help me with the following questions I have

1) Can I ignore the EHCI kexts? just use XHC? Every single port seems to be showing up under XHC in IORegistryExplorer.

2) How many devices/packages should I have in the SSDT file? Can i simply use 8086_8xxx since all three devices starts with an 8?


View attachment 402244

Okay.

1) Probably. Upload a screen grab of the IORegistryExplorer section with your XHC ports showing.

2) One. Your Z87 chipset has Device IDs for the USB controllers it has and I believe 8086:8c26 and 8c2d are the EHC. The XHC controller is: 8086:8c31 as far as I can determine.

I would put the port limit removal patch in place along with USBInjectAll.kext then check IORegistryExplorer to see what shows ups, and whether or not I need to rename the EHC controllers (as per the guide).

If everything is showing on the XHC part of the tree, you should have 20/22 ports showing.

The System Report should show just one Device ID. The very top level 'USB 3.0 Bus'. A Screengrab would be useful.

:)
 
The screenshots is showing the EHCI and XHC sections respectively.

Also the system report page. There are three devices showing, each with a different device ID as stated above.

Also in config.plist I have disabled all of the renaming for both EHCI and XHC.

EHCI-handoff is still enabled in BIOS.

In total, port discovery led me to a total of 19 ports.

The code below is what I am using currently. Seems to be working, but I would like to figure out if i did anything wrong, and trying to understand what the heck is EHCI and if i should bother with it at all.


Code:
/*
DefinitionBlock ("", "SSDT", 2, "hack", "_UIAC", 0x00000000)
{
    Device (UIAC)
    {
        Name (_HID, "UIA00000")  // _HID: Hardware ID
        Name (RMCF, Package (0x02)
        {
            "8086_8xxx",
            Package (0x04)
            {
                "port-count",
                Buffer (0x04)
                {
                     0x15, 0x00, 0x00, 0x00                         
                },

                "ports",
                Package (0x1E)
                {
                    "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",
                        Zero,
                        "port",
                        Buffer (0x04)
                        {
                             0x05, 0x00, 0x00, 0x00                         
                        }
                    },

                    "HS06",
                    Package (0x04)
                    {
                        "UsbConnector",
                        Zero,
                        "port",
                        Buffer (0x04)
                        {
                             0x06, 0x00, 0x00, 0x00                         
                        }
                    },

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

                    "HS10",
                    Package (0x04)
                    {
                        "UsbConnector",
                        0x03,
                        "port",
                        Buffer (0x04)
                        {
                             0x0A, 0x00, 0x00, 0x00                         
                        }
                    },

                    "HS12",
                    Package (0x04)
                    {
                        "UsbConnector",
                        0xFF,
                        "port",
                        Buffer (0x04)
                        {
                             0x0C, 0x00, 0x00, 0x00                         
                        }
                    },

                    "HS13",
                    Package (0x04)
                    {
                        "UsbConnector",
                        Zero,
                        "port",
                        Buffer (0x04)
                        {
                             0x0D, 0x00, 0x00, 0x00                         
                        }
                    },

                    "HS14",
                    Package (0x04)
                    {
                        "UsbConnector",
                        Zero,
                        "port",
                        Buffer (0x04)
                        {
                             0x0E, 0x00, 0x00, 0x00                         
                        }
                    },

                    "SS01",
                    Package (0x04)
                    {
                        "UsbConnector",
                        0x03,
                        "port",
                        Buffer (0x04)
                        {
                             0x10, 0x00, 0x00, 0x00                         
                        }
                    },

                    "SS02",
                    Package (0x04)
                    {
                        "UsbConnector",
                        0x03,
                        "port",
                        Buffer (0x04)
                        {
                             0x11, 0x00, 0x00, 0x00                         
                        }
                    },

                    "SS03",
                    Package (0x04)
                    {
                        "UsbConnector",
                        0x03,
                        "port",
                        Buffer (0x04)
                        {
                             0x12, 0x00, 0x00, 0x00                         
                        }
                    },

                    "SS04",
                    Package (0x04)
                    {
                        "UsbConnector",
                        0x03,
                        "port",
                        Buffer (0x04)
                        {
                             0x13, 0x00, 0x00, 0x00                         
                        }
                    },

                    "SS05",
                    Package (0x04)
                    {
                        "UsbConnector",
                        0x03,
                        "port",
                        Buffer (0x04)
                        {
                             0x14, 0x00, 0x00, 0x00                         
                        }
                    },

                    "SS06",
                    Package (0x04)
                    {
                        "UsbConnector",
                        0x03,
                        "port",
                        Buffer (0x04)
                        {
                             0x15, 0x00, 0x00, 0x00                         
                        }
                    }
                }
            }
        })
    }
}

Thank you very much for your time at looking at my stuff!
 

Attachments

  • Screen Shot 2019-04-27 at 12.06.47 PM.png
    Screen Shot 2019-04-27 at 12.06.47 PM.png
    88.6 KB · Views: 69
  • Screen Shot 2019-04-27 at 12.07.26 PM.png
    Screen Shot 2019-04-27 at 12.07.26 PM.png
    59.5 KB · Views: 70
  • Screen Shot 2019-04-27 at 12.19.57 PM.png
    Screen Shot 2019-04-27 at 12.19.57 PM.png
    173.1 KB · Views: 59
  • Screen Shot 2019-04-27 at 12.08.32 PM.png
    Screen Shot 2019-04-27 at 12.08.32 PM.png
    37.7 KB · Views: 67
Back
Top