- Joined
- Feb 22, 2020
- Messages
- 193
- Motherboard
- Dell Precision M4700
- CPU
- i7-3740QM
- Graphics
- M4000
So, a couple of things.
I'll start with a bit of background. The entire reason that mapping is needed is because macOS USB kexts have a limitation of 15 so called Personalities per controller. I will use personality to describe either the 2.0 or 3.0 part of a physical USB port, as these are separate.
macOS checks three sources in the below order to create these personalities:
1. IOKit Matching of USB maps. Within /System/Library/Extensions/IOUSBHostFamily.kext/Contents/PlugIns/AppleUSBHostPlatformProperties.kext/Contents/Info.plist (whew), there is a list of USB maps that match against a) SMBIOS/Model and b) the controller name in IOService (XHC1, EHC1, etc). Because these maps use IOKit matching, matching can be done by IONameMatch, IOPCIMatch, IOPropertyMatch, etc. Any sort of IOKit matching works here. The name of each personality will be the label given by the map. As long as one of these types of matching is being done, it doesn't matter if there are 6 or 8 or whatever number of properties. The USB maps that CorpNewt's USBMap utility and USBToolBox make in "native" mode use this mechanism as well. The below image comes from AppleUSBHotPlatformProperties.kext (Note that it only uses IONameMatch).
2. ACPI probing. ACPI can contain devices which represent USB personalities, which are nested underneath the USB controller. The USB kexts will check the _UPC method for USB type, placement, etc. The name of each personality will be the ACPI device name representing that personality.
3. Probe hardware. This one I know less about. SSDT-RHUB from the Dortania guide forces the USB kexts to fall back to hardware detection. It does this by disabling the ACPI USB hub device that contains all of the USB ports. You can tell if this is happening based on the personality names. The personality name will match a class name such as AppleUSB30XHCIPort.
This leads to some corrections that I would like to make regarding the comments above:
1) The name of each USB personality does not matter. The kexts will use the "port" property to figure out where the personality maps to in hardware. So while it may look weird if USBToolBox starts at HS04 or whatever, it is fine to leave the name as it is.
2) All USB Controllers should be mapped, including thunderbolt controllers which may only have 2-4 ports. This can help with sleep, spurious wake ups, etc.
3) Port count should be the highest "port" value that any USB personality has within that controller.
4) If using USBToolBox.kext and map (including the default map), you should not need any ACPI renames to avoid USB maps that come with macOS. You should also be able to avoid renames if you set a probe score above 0 in any "native" usb map. USBToolBox with a map will override any USB map that comes with macOS, and will attempt to force every port to work when using the default map that comes in the USBToolBox/kext release zip. This can be used during installation to have basic USB functionality. In addition, USBToolBox will disable ACPI probing, which is especially useful on problematic hardware (some Ryzen boards and 400 series Intel boards).
I'll start with a bit of background. The entire reason that mapping is needed is because macOS USB kexts have a limitation of 15 so called Personalities per controller. I will use personality to describe either the 2.0 or 3.0 part of a physical USB port, as these are separate.
macOS checks three sources in the below order to create these personalities:
1. IOKit Matching of USB maps. Within /System/Library/Extensions/IOUSBHostFamily.kext/Contents/PlugIns/AppleUSBHostPlatformProperties.kext/Contents/Info.plist (whew), there is a list of USB maps that match against a) SMBIOS/Model and b) the controller name in IOService (XHC1, EHC1, etc). Because these maps use IOKit matching, matching can be done by IONameMatch, IOPCIMatch, IOPropertyMatch, etc. Any sort of IOKit matching works here. The name of each personality will be the label given by the map. As long as one of these types of matching is being done, it doesn't matter if there are 6 or 8 or whatever number of properties. The USB maps that CorpNewt's USBMap utility and USBToolBox make in "native" mode use this mechanism as well. The below image comes from AppleUSBHotPlatformProperties.kext (Note that it only uses IONameMatch).
2. ACPI probing. ACPI can contain devices which represent USB personalities, which are nested underneath the USB controller. The USB kexts will check the _UPC method for USB type, placement, etc. The name of each personality will be the ACPI device name representing that personality.
3. Probe hardware. This one I know less about. SSDT-RHUB from the Dortania guide forces the USB kexts to fall back to hardware detection. It does this by disabling the ACPI USB hub device that contains all of the USB ports. You can tell if this is happening based on the personality names. The personality name will match a class name such as AppleUSB30XHCIPort.
This leads to some corrections that I would like to make regarding the comments above:
1) The name of each USB personality does not matter. The kexts will use the "port" property to figure out where the personality maps to in hardware. So while it may look weird if USBToolBox starts at HS04 or whatever, it is fine to leave the name as it is.
2) All USB Controllers should be mapped, including thunderbolt controllers which may only have 2-4 ports. This can help with sleep, spurious wake ups, etc.
3) Port count should be the highest "port" value that any USB personality has within that controller.
4) If using USBToolBox.kext and map (including the default map), you should not need any ACPI renames to avoid USB maps that come with macOS. You should also be able to avoid renames if you set a probe score above 0 in any "native" usb map. USBToolBox with a map will override any USB map that comes with macOS, and will attempt to force every port to work when using the default map that comes in the USBToolBox/kext release zip. This can be used during installation to have basic USB functionality. In addition, USBToolBox will disable ACPI probing, which is especially useful on problematic hardware (some Ryzen boards and 400 series Intel boards).
Last edited: