Contribute
Register

[Guide] Creating a Custom SSDT for USBInjectAll.kext

A template is provided in the USBInjectAll.kext github repo, SSDT-UIAC-ALL.dsl, which has overrides for all the data already in the USBInjectAll.kext Info.plist. You could compile SSDT-UIAC-ALL.dsl to SSDT-UIAC-ALL.aml (File Save As, format: ACPI Machine Language Binary in MaciASL) and place it in ACPI/patched, and although all the data in the Info.plist will be overridden by the SSDT, no net change would be observed, as the data in SSDT-UIAC-ALL.dsl is the same as the data already in the USBInjectAll.kext Info.plist.

This is the template I used for my Skylake computer's SSDT. I copied it over to the Haswell computer I am using now. Or I thought I did. (Maybe I copied over my Skylake SSDT and edited that. I will go back to my other computer and find the original template.)
 
This is the template I used for my Skylake computer's SSDT. I copied it over to the Haswell computer I am using now. Or I thought I did. (Maybe I copied over my Skylake SSDT and edited that. I will go back to my other computer and find the original template.)

Read the guide relevant to determining the device-id of your XHC, as that is very important in determining the sections you keep from SSDT-UIAC-ALL.dsl.

I don't know why you used "8086_a12f" when your device-id is not 0xa12f.
 
RehabMan,

Please understand that I no more understand most of this than you would understand my saying that if you want to build an L-band parametric up converter with 4 db of gain over a 40% bandwidth, then you must provide at least 3 virtual grounds for RF, LO, and IF, and to do this your device must be built as a 3-D model, not 2-D, so "go do that." That is to say, I understand your clear English, but simply am trying this for only the second time, and there seem to be many obstacles to getting it done.

I am now in possession of SSDT-UIAC-ALL.dsl, which I downloaded from your "repo" as SSDT-UIAC-ALL.dsl.webarchive, deleting the ".webarchive" suffix against advice of the Mac OS, then opening it as a text file, then closing it and reopening it with MaciASL version "RM-1.31" (not "MaciASL version 1.4). That gave me the pretty colored page with all the stuff on it that I remember, so I guess it is a valid .dsl file. Next, I guess, I have to delete the stuff that I don't want, which includes the "device IDs" that are not "8086:8c31" (I guess). Since I have already "patched ACPI" with the EHC1-2 to EHO1-2 magic in Clover Configurator, maybe I do and maybe I do not need to delete all references to those topics in my new SSDT. But I'm not sure, although I am sure you are.

I will undoubtedly screw up the syntax in the creation of my SSDT from this master template, so I will be asking you more dumb questions later, I am sure.
 
I am now in possession of SSDT-UIAC-ALL.dsl, which I downloaded from your "repo" as SSDT-UIAC-ALL.dsl.webarchive, deleting the ".webarchive" suffix against advice of the Mac OS, then opening it as a text file, then closing it and reopening it with MaciASL version "RM-1.31" (not "MaciASL version 1.4). That gave me the pretty colored page with all the stuff on it that I remember, so I guess it is a valid .dsl file.

I added direct links in post #1 for config_patches.plist and SSDT-UIAC-ALL.dsl for those not familiar with correct github use.

Next, I guess, I have to delete the stuff that I don't want, which includes the "device IDs" that are not "8086:8c31" (I guess). Since I have already "patched ACPI" with the EHC1-2 to EHO1-2 magic in Clover Configurator, maybe I do and maybe I do not need to delete all references to those topics in my new SSDT. But I'm not sure, although I am sure you are.

Keep only those sections that apply to your USB configuration. It is covered in the guide...

I will undoubtedly screw up the syntax in the creation of my SSDT from this master template, so I will be asking you more dumb questions later, I am sure.

Be careful with edits and there should be no mistakes.
 
OK, here is my latest. I created my "SSDT-Haswell-first cut as template.dsl" (attached) by editing your "SSDT-UIAC-ALL.dsl" file (attached). From a copy of my edited template I created "SSDT-USB-Haswell 1.dsl" (attached) but could not save it as .aml, due to syntax errors beginning with line 66 and continuing with lines 71, 78,83, 88, and 93. I think the problems on lines 66 and 71 are caused by the port numbers, which from IORegistryExplorer are "0a 00 00 00" and "0b 00 00 00". In the template, those would be "10 00 00 00"and "11 00 00 00" respectively. But if I use those numbers, they will not agree with the IORegistry Explorer port numbers for HS10 (USB 2) and HS11 (Bluetooth) respectively. So I ask you to look at my question in my post 135 on page 14 of this thread.

And thanks for your direct links in post #1!
 

Attachments

  • SSDT-Haswell first cut as template.dsl.zip
    1.6 KB · Views: 107
  • SSDT-UIAC-ALL.dsl.zip
    2.2 KB · Views: 93
  • SSDT-USB-Haswell 1.dsl.zip
    1.4 KB · Views: 105
Last edited:
OK, here is my latest. I created my "SSDT-Haswell-first cut as template.dsl" (attached) by editing your "SSDT-UIAC-ALL.dsl" file (attached).

Why did you remove "EH01", "EH02", "HUB1", "HUB2" sections?
The ioreg you provided earlier showed you using the EHCI controllers.

From a copy of my edited template I created "SSDT-USB-Haswell 1.dsl" (attached) but could not save it as .aml, due to syntax errors beginning with line 66 and continuing with lines 71, 78,83, 88, and 93.

Problem is obvious. Hex numbers must be specified with 0x prefix.
You have:
Code:
                    "HS10", Package()
                    {
                        "UsbConnector", 2,
                        "port", Buffer() { 0a, 0, 0, 0 },
                    },

Should be:
Code:
                    "HS10", Package()
                    {
                        "UsbConnector", 2,
                        "port", Buffer() { 0x0a, 0, 0, 0 },
                    },

Or, as it was originally in SSDT-UIAC-ALL.dsl:
Code:
                    "HS10", Package()
                    {
                        "UsbConnector", 3,
                        "port", Buffer() { 10, 0, 0, 0 },
                    },

There is no reason to change the "port" numbers from what is provided in SSDT-UIAC-ALL.dsl. The provided code is correct. If you're changing the port assignments, you're making a mistake.

Note that your edits to the port numbers for SSP3...SSP6 are wrong. I don't know why you changed them.
 
Problem is obvious. Hex numbers must be specified with 0x prefix.
I wrote exactly the format used in IORegistryExplorer for those port numbers. If you look at my attached .ioreg file and select HS10-11 and SSP3-5 and look in the right hand column at the port numbers, you will see they are in the format <0a 00 00 00>, <0b 00 00 00>, etc, not <0x0a 00 00 00> etc. At any rate, the IORegistry is now almost correct... the only thing wrong is that port SSP6 is missing altogether, and I don't know why. I believe "port-count" should be "15" and there should be 13 entries: HS03-HS11 plus SSP3-SSP6. For some reason the .dsl file is now showing all hex numbers for the ports, and I don't know why that changed either.

There is no reason to change the "port" numbers from what is provided in SSDT-UIAC-ALL.dsl. The provided code is correct. If you're changing the port assignments, you're making a mistake.

Note that your edits to the port numbers for SSP3...SSP6 are wrong. I don't know why you changed them.

Why do you say that? My port number assignments come directly from the HSxx and SSPx port numbers in the right hand columns of IORegistryExplorer when the port limit patch was in effect. They are the result of that tedious procedure of plugging in USB3 and USB2 devices into each of the computer case connectors until all possibilities were recorded. I rechecked my table.

But now IORegistryExplorer is showing hex port numbers for the SSPx ports, whereas when I did all that previous collection of port vs. port number data, the SSPx port numbers were in decimal form. I can change that in my SSDT, if you think that would help. But I don't know why SSP6 is missing in IORegistry Explorer. There are only 12 ports showing and there should be 13.
 

Attachments

  • Bill's Haswell Hackintosh.ioreg.zip
    536.1 KB · Views: 88
OK, I'm done. I changed the port number designations in my SSDT-USB-Haswell 2.dsl to hex, ran IORegistryExplorer, plugged a USB3 flash drive into what was formerly the SSP6 port, and found that it is now the HS10 port. So since the ports are variables and not constants, I quit.

FYI, I have attached my latest IORegistryExplorer file and my latest SSDT file. I'm running with this SSDT. Understanding the weirdness of this software is beyond me.

Thanks for your help and your time, RehabMan. (To me, you are "RepoMan!")
 

Attachments

  • Bill's Haswell Hackintosh.ioreg.zip
    534.8 KB · Views: 89
  • SSDT-USB-Haswell 2.dsl.zip
    1.5 KB · Views: 86
I wrote exactly the format used in IORegistryExplorer for those port numbers. If you look at my attached .ioreg file and select HS10-11 and SSP3-5 and look in the right hand column at the port numbers, you will see they are in the format <0a 00 00 00>, <0b 00 00 00>, etc, not <0x0a 00 00 00> etc. At any rate, the IORegistry is now almost correct... the only thing wrong is that port SSP6 is missing altogether, and I don't know why. I believe "port-count" should be "15" and there should be 13 entries: HS03-HS11 plus SSP3-SSP6. For some reason the .dsl file is now showing all hex numbers for the ports, and I don't know why that changed either.



Why do you say that? My port number assignments come directly from the HSxx and SSPx port numbers in the right hand columns of IORegistryExplorer when the port limit patch was in effect. They are the result of that tedious procedure of plugging in USB3 and USB2 devices into each of the computer case connectors until all possibilities were recorded. I rechecked my table.

But now IORegistryExplorer is showing hex port numbers for the SSPx ports, whereas when I did all that previous collection of port vs. port number data, the SSPx port numbers were in decimal form. I can change that in my SSDT, if you think that would help. But I don't know why SSP6 is missing in IORegistry Explorer. There are only 12 ports showing and there should be 13.

I'll repeat it again: The port assignments are already correct in the templates provided in SSDT-UIAC-ALL.dsl. There is no reason to change them. You seem confused about hex and decimal representations of the same number.

Furthermore: If you are changing the port assignments, you are making a mistake.
 
OK, I'm done. I changed the port number designations in my SSDT-USB-Haswell 2.dsl to hex, ran IORegistryExplorer, plugged a USB3 flash drive into what was formerly the SSP6 port, and found that it is now the HS10 port. So since the ports are variables and not constants, I quit.

FYI, I have attached my latest IORegistryExplorer file and my latest SSDT file. I'm running with this SSDT. Understanding the weirdness of this software is beyond me.

Thanks for your help and your time, RehabMan. (To me, you are "RepoMan!")

The port addresses you're using for SSP3, SSP4, and SSP5 are wrong.
The correct port addresses are in SSDT-UIAC-ALL.dsl for section "8086_8xxx".
 
Back
Top