Contribute
Register

XHC USB Kext Creation Guideline

Joined
Sep 5, 2012
Messages
43
Motherboard
Gigabyte GA-Z390X Designare
CPU
i9-9900K
Graphics
Vega 64
Mac
MacBook Pro, Mac mini
Mobile Phone
iOS
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:

kgp

Joined
May 30, 2014
Messages
6,607
Motherboard
Asus Prime X299 Deluxe
CPU
i9-7980XE
Graphics
Vega 64
Mac
iMac, MacBook Pro, Mac mini
Mobile Phone
iOS
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.
 
Joined
Dec 10, 2010
Messages
54
Motherboard
Asus TUF Z390m-Pro Gaming
CPU
i7-8700K
Graphics
UHD 630
Mac
iMac, MacBook Pro
Classic Mac
Apple, LC, Performa, Power Mac, SE
Mobile Phone
iOS
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!!
 
Joined
Dec 10, 2010
Messages
54
Motherboard
Asus TUF Z390m-Pro Gaming
CPU
i7-8700K
Graphics
UHD 630
Mac
iMac, MacBook Pro
Classic Mac
Apple, LC, Performa, Power Mac, SE
Mobile Phone
iOS
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)
 
Joined
Sep 5, 2012
Messages
43
Motherboard
Gigabyte GA-Z390X Designare
CPU
i9-9900K
Graphics
Vega 64
Mac
MacBook Pro, Mac mini
Mobile Phone
iOS
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:
Joined
Dec 10, 2010
Messages
54
Motherboard
Asus TUF Z390m-Pro Gaming
CPU
i7-8700K
Graphics
UHD 630
Mac
iMac, MacBook Pro
Classic Mac
Apple, LC, Performa, Power Mac, SE
Mobile Phone
iOS
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

Joined
Sep 5, 2012
Messages
43
Motherboard
Gigabyte GA-Z390X Designare
CPU
i9-9900K
Graphics
Vega 64
Mac
MacBook Pro, Mac mini
Mobile Phone
iOS
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

Last edited:
Joined
Dec 10, 2010
Messages
54
Motherboard
Asus TUF Z390m-Pro Gaming
CPU
i7-8700K
Graphics
UHD 630
Mac
iMac, MacBook Pro
Classic Mac
Apple, LC, Performa, Power Mac, SE
Mobile Phone
iOS
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:

kgp

Joined
May 30, 2014
Messages
6,607
Motherboard
Asus Prime X299 Deluxe
CPU
i9-7980XE
Graphics
Vega 64
Mac
iMac, MacBook Pro, Mac mini
Mobile Phone
iOS
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

Top