Contribute
Register

XHC USB Kext Creation Guideline

Status
Not open for further replies.
This has been challenging with this board Asus Tuf Z390m-Pro Gaming. The USB identifier is native so without any USB kext all USB ports are recognized, but only 2 SS ports work for USB 3.0. Never can I remove or add any ports. with or without following your guide, removing ports in bios or clover. Attached IORegistryExplore never changes except to show my kext from your guide was loaded, but no ports listed under IOPowermanagment.

Hi Toad, there are a few things, that can not be right in your kext:

1) Don´t use blank spaces in your filename
2) replace "XHCI" with "XHC" under IONameMatch in your info.plist
3) Your port-count can not be right. It is not the address of SSP2. You have much more "hidden" SSP´s

if you type (example): "uia_exclude=HS03;HS04;HS05;HS06;HS07;HS08;HS09;HS10;HS11;HS12;SS01;USR1;USR2" (under "Boot" in clover configurator) you can temporary throw out unused ports, and you will see, the new ssp´s will appear. Don't throw our ports, that you need.

Try this till you really found the last port and use the adress off the real last port as port-count.

You will at least have SSP6, my last one was SS10.

Don´t forget, to throw out all USB related kext´s in your Efi and the usb port limit patch in Clover config, before you do the search.

Then you should be fine
 
Last edited:
Thanks kgb,

I've throughly read your guide several times and understand what your saying. That's exactly what I've done is eliminate HS ports to make room for the six SS ports.
Still no joy. Yes I've tried the USB port elimination from BIOS and clover too.

If you or someone can glance at my iMac pro Asus kext that I created following your guide and give me any advice I would greatly appreciate it. Thanks.

Maybe your mobo does not use more than 2 SS ports? How many USB3.0 onboard connectors/headers are on your mobo? Are all USB3.0 onboard connectors/headers fully funtional after implementing only 2 SS ports?

As soon I am able I will revise your kext.

Good luck in the meanwhile.
 
Hi Toad, there are a few things, that can not be right in your kext:

1) Don´t use blank spaces in your filename
2) replace "XHCI" with "XHC" under IONameMatch in your info.plist
3) Your port-count can not be right. It is not the address of SSP2. You have much more "hidden" SSP´s

if you type (example): "uia_exclude=HS03;HS04;HS05;HS06;HS07;HS08;HS09;HS10;HS11;HS12;SS01;USR1;USR2" (under "Boot" in clover configurator) you can temporary throw out unused ports, and you will see, the new ssp´s will appear. Don't throw our ports, that you need.

Try this till you really found the last port and use the adress off the real last port as port-count.

You will at least have SSP6, my last one was SS10.

Don´t forget, to throw out all USB related kext´s in your Efi and the usb port limit patch in Clover config, before you do the search.

Then you should be fine

Thanks for the input! I made progress this morning. The boot patch works in conjunction with RehabMan's USBInjectAll Kext. that allowed me to discover SS10 on this board. With correct information and your help Ill see if I can fix the Kext from this guide.

Thanks again!!
 
Interesting....
Screen Shot 2019-01-01 at 1.43.28 PM.png
My @14 USB addresses do not go above 14f00000. So I only have 14100000-14f00000 (15 Ports) to work with.
The uia=HS01;HS03;HS04;HS11;HS12;HS13;HS14:USR1;USR2 in clover only works with RehabMan's USBInjectAll.kext. with his Kext and His boot Arguments in Clover, Now all USB ports work correctly each port with USB2.0 and USB3.0.

Still going to see if this method is still viable, and cleaner. (meaning no boot arguments that might get lost)
 
Interesting....
View attachment 376158My @14 USB addresses do not go above 14f00000. So I only have 14100000-14f00000 (15 Ports) to work with.
The uia=HS01;HS03;HS04;HS11;HS12;HS13;HS14:USR1;USR2 in clover only works with RehabMan's USBInjectAll.kext. with his Kext and His boot Arguments in Clover, Now all USB ports work correctly each port with USB2.0 and USB3.0.

Still going to see if this method is still viable, and cleaner. (meaning no boot arguments that might get lost)

Sorry, that's what I wanted to write at the moment. You need "USBinjectAll" for the discovery. I had the same problem, as I wanted to search for your problem on my Asus ROG Maximus X (z370).

But now you see, that you have 10 SS Ports, as I predicted. Your port-count is "1a 00 00 00"

The Adresses of the ports are indeed not 14f00000 or so. You have to click inside the Ports. For Example, if you click on HS02 you will see port <02 00 00 00>. This is the address that you should give the ports inside your kext.

But you are right, you have only 15 ports to use. You have to decide which of them you need. For my z170 I have thrown out 2 USB2.0 Ports at the front plate and everything, that didn't show up my USB-Stick.

So I have:
Backside: 2x USB2.0, 4xUSB3.0
Frontside: 2x USB3.0
This is 8xHS and 6xSS makes 14 Ports

After your kext is ready, you have to throw out the "USBinjectAll.kext"
 
Last edited:
Removed USBInjectAll.kext. Cleaned up Pro-dummy-XHCI.kext as per guide for 15 port truncated kext.
Didn't work for me.
On this motherboard I don't even see that its possible to do a non turncated kext with only 15 addresses to work with. any suggestions?

Screen shot 2.21.46pm this method (if I did it right)
Screen shot 1.43.28 PM with USBInjectAll and boot Arguments. (Working!)
 

Attachments

  • MacMini8.1-Asus Tuf Z390m-Pro-XHCI (15).kext.zip
    2.9 KB · Views: 77
  • Screen Shot 2019-01-01 at 2.21.46 PM.png
    Screen Shot 2019-01-01 at 2.21.46 PM.png
    194.5 KB · Views: 73
  • Screen Shot 2019-01-01 at 1.43.28 PM.png
    Screen Shot 2019-01-01 at 1.43.28 PM.png
    318.1 KB · Views: 70
Removed USBInjectAll.kext. Cleaned up Pro-dummy-XHCI.kext as per guide for 15 port truncated kext.
Didn't work for me.
On this motherboard I don't even see that its possible to do a non turncated kext with only 15 addresses to work with. any suggestions?

Screen shot 2.21.46pm this method (if I did it right)
Screen shot 1.43.28 PM with USBInjectAll and boot Arguments. (Working!)


Your port count is still wrong!! Try <1a 00 00 00> (The Number of your LAST SS-Port, could be SS10. Even if you only use SS01 to SS06)

Your Port dresses are also wrong!! eg HS02 should be <02 00 00 00> an NOT <14200000> and so on.

Why do you have SS07 and SSP1 mixed name conventions inside. I would suppose SSP1 should be SS01.

You have 2 adresses under IOPCIPrimarymatch in ioregexplorer. maybe because you inserted one. Be sure you use the right one for your driver.

Look at my example for my 370 board. should be the same adresses (not your drivers adress of course)
 

Attachments

  • Racke-iMacPro-ASUSROGMAXIMUSX-XHCI.kext.zip
    3.5 KB · Views: 79
  • Screenshot 2019-01-01 at 23.18.24.png
    Screenshot 2019-01-01 at 23.18.24.png
    210.6 KB · Views: 80
Last edited:
Good evening to all you port limiters. Here is my kext for the:

ASUS ROG MAXIMUS X HERO (z370)

edited: actually kexts attached
 

Attachments

  • Racke-iMac18.3-ASUS-Z370-RMXH-XHC-15port.kext.zip
    3.4 KB · Views: 66
  • Racke-iMac18.3-ASUS-Z370-RMXH-XHC.kext.zip
    3.3 KB · Views: 67
Last edited:
Ran into an interesting situation. I made an edit error that has 2 port list, but the second injected port list is working! unfortunately its not clean for me to submit.
I started over with the template kext from this guide, but can't get it to work.

Nevermind, still working this out...
 
Last edited:
First I have to apologise to everybody here, for using the knowledge of the community for years now, without giving something back. Thanks to KGP and RehabMan for lots of knowledge, regarding this topic.

I made the kext for the Gigabyte z170x designare and will upload it as soon as possible.
I have thrown out everything useless and also the USB2 connectors at the Front Panel.
The Problem, that took me a while, was that I had to change "XHCI" to just "XHC" as IONameMatch in the "info.plist".

btw: my "restart issue" is also solved since I stayed within the Portlimit. I use no Portlimit Patch (config.plist) and no USBinjectAll.kext (EFI kext folder).

I will do kexts for Asus ROG Maximus Hero X (z370) and Gigabyte z390 Designare in the next days as well.


I found also another solution for the Portlimit-Problem. You can also throw out unused ports in Clover Configurator.

Example: "uia_exclude=HS03;HS04;HS05;HS06;HS07;HS08;HS09;HS10;HS11;HS12;SS01;USR1;USR2" (under "Boot").

This seems to be the easiest way? Everything works after that. Is this a "bad" way?


Update 01.01.2019: Port Layout updated, Both internal USB2.0 connectors checked but disabled

o.k. port-count was wrong. Highest port is SSP6 with port number 16000000. Therefore I changed port-count from 1a000000 to 16000000. See attached files. Please upload both fully implemented and truncated 15-port XHC Usb kexts for the Gigabyte z170x Designare. As soon I have both files, I will implement them in the Github library.

Thanks, dude!
 

Attachments

  • Racke-iMacPro-GAZ170Designare-XHCI.kext.zip
    4 KB · Views: 70
Status
Not open for further replies.
Back
Top