Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Ausdauersportler

macrumors 603
Nov 25, 2019
5,007
5,826
Has anyone tried using GenericUSBXHCI.kext from RehabMan for USB3 instead of the multiple drivers?

It is supposed to support FL1100 based cards. Quite old now though and maybe doesn't work on newer Mac OS but maybe worth a shot.

On the drivers, has anyone tested whether all three are actually needed since XhciDxe.efi is what is supposed to be doing the job. Could also be that having another one call on it activates it ... in which case maybe only two (XhciDxe.efi plus another) will be enough.
Thanks,

have a questions about this approach:
Using a kernel extension instead of an efi driver would not allow us to have USB boot support?

Every macOS we used here already provides the FL1100 driver and offers post boot support with USB3 devices using either these hardware mods or an thunderbolt/elgato dock.

Do I miss something?
 

Dayo

macrumors 68020
Dec 21, 2018
2,256
1,278
You are correct that a kext would likely remove boot support since it would only be loaded on booting something. Was just an initial thought to try to get a better idea of what is actually happening.

That can be eliminated and leaves checking whether the other two drivers are actually needed.
 
  • Like
Reactions: Ausdauersportler

Ausdauersportler

macrumors 603
Nov 25, 2019
5,007
5,826
Did you manage to determine whether the load order is important?

UsbHubDxe before XhciDxe v XhciDxe before UsbHubDxe?
I used the same load order as shown in the config.plist sniplet. So UsbHubDxe first. Never tried another load order, just disabled both Usb* one after another. Using only XhciDxe did not work for me.
 

Dayo

macrumors 68020
Dec 21, 2018
2,256
1,278
Thanks. Puzzling as when X requires Y, the load order is typically significant.

Could be that the USB Hub driver sets something in the environment that only comes into play at a later stage of the start up process when the xHCI driver is present. In which case, it might be that simply reloading that version in the firmware as @joevt thought in some other post might also work ... unless there is something in the Trashcan version of UsbHubDxe that is coming into play.

Out of curiosity, does ForgeUEFI make a difference for you on anything?
Also do you know whether your machine is on EFI 1.x or on UEFI 2.x?
 

Ausdauersportler

macrumors 603
Nov 25, 2019
5,007
5,826
Thanks. Puzzling as when X requires Y, the load order is typically significant.

Could be that the USB Hub driver sets something in the environment that only comes into play at a later stage of the start up process when the xHCI driver is present. In which case, it might be that simply reloading that version in the firmware as @joevt thought in some other post might also work ... unless there is something in the Trashcan version of UsbHubDxe that is coming into play.

Out of curiosity, does ForgeUEFI make a difference for you on anything?
Enabling it does not change the behavior with both extensions injected (works as before) and with the XhciDxe, only (fails to boot completely)! Disconnecting the Thunderbolt 2 / USB3 dock allows me to boot into OC and macOS.
Also do you know whether your machine is on EFI 1.x or on UEFI 2.x?
Assume my iMac12,2 (Mid 2011) is still EFI 1.x Apple style, i.e. with a lot of 2.x add ons. No time to use refind to check it out. Is there any more easy way? My guess is the 2012+ models are 2.x
 

Dayo

macrumors 68020
Dec 21, 2018
2,256
1,278
Thanks. I suppose there needs to be an elimination/investigation of what I dub as the OsxAptioFix Effect.

So, back in 2017, some chaps started looking into getting bootscreens on cMP with modern GOP Capable GPUs and were looking at rEFInd:

In 2018, it finally got to a point where it worked on the MP3,1 but not on the MP5,1 (with AMD GPUs Only):

For some reason though, to also get the Stage 1 loading screen, you needed to load an OsxAptioFix driver:

I started the stuff that would end up as RefindPlus in trying to update the patched rEFInd v0.11.5 instance from that thread to v0.12.0. It was finally cracked sometime in 2020 and as a bonus, the MP5,1 issue was also sorted (Nvidia GPUs on both was sorted later):

The OsxAptioFix driver was still needed for full support and stayed that way until someone, I think it was @joevt, asked the big question of "Why?" in another channel. Macs do not use Aptio boards and do not need the hack stuff on the memory the driver does and the stuff probably doesn't even do anything.

Luckily, the OsxAptioFix driver is OpenSource and after looking and testing stuff, it turned out that it was just about three or so lines of code in the driver that is there as a side show item, not directly related to the memory fix that the driver does, that sorted stuff out on cMP. If the primary aim of memory manipulation gymastics had actually run, it would have messed stuff up.

I think there is a chance something similar is going on with the UsbBusDxe driver in our case.

Current status is:
  • XhciDxe
    • EDK II Version (AKA OpenCore Version)
      • Tested and fails
      • OpenSource, so can be looked at
      • Clearly requires UEFI 2.x as calls CreateEventEx
      • CreateEventEx requirement can be bypassed
    • Clover Versions
      • Not yet tested ... seems to be more than one version
      • OpenSource, so can be looked at (Variants of EDK II Version)
        • Initial look suggests misc tweaks done
      • Clearly requires UEFI 2.x as calls CreateEventEx
      • CreateEventEx requirement can be bypassed
    • Trashcan Version
      • Tested and works when UsbBusDxe is reinstalled
        • Only UsbBusDxe from Trashcan tested
        • Not clear whether other versions similarly work
      • ClosedSource, so cannot be looked at
      • Does not appear to require UEFI 2.x
  • UsbBusDxe
    • EDK II Version
      • Not yet tested
      • OpenSource, so can be looked at
      • Potential avenue to understand what is happening depending on misc test results
      • Potential way to get to "Active Ingredient"
    • MP5,1 Version
      • Not yet tested
      • ClosedSource, so cannot be looked at
      • Still would be intersting to know if works like Trashcan version
    • Trashcan Version
      • Tested and works for fixing XhciDxe ... why exactly?
 
Last edited:
  • Like
Reactions: Ausdauersportler

Ausdauersportler

macrumors 603
Nov 25, 2019
5,007
5,826
Last night I finally pulled the plug and injected the USB3 drivers from the MP6,1 into the iMac12,2 firmware, i.e. replaced the existing UsbBusDxe (file GUID: 240612B7-A063-11D4-9A3A-0090273FC14D using the Replace as is) and added the XhciDxe (file GUID: 8CE65FC0-8F33-42A7-A2EA-46DEBE231EA6 using the Insert after...) right after it using UEFITool 0.2.6 and got native USB3 boot support via TB dock.

Same success with FL1100 based PCI card connect via mPCI port. (see pictures attached, the USB3 connected external SSD is responsible for all the orange icons on the EFI boot screen).

Not sure if the cMP community tried this....

(for @Dayo )

Special thanks to @m0bil for making firmware mods and flashing easy and @Jazzzny for providing the drivers.

Some notes:
  1. Here you find a comprehensive but not complete documentation how to use UEFITool removing, adding or replacing modules.
  2. Did this mod here on two iMac12,2 successfully and can use USB3 with an Elgato and have not seen any incompatibilities in more than two years.
 

Attachments

  • IMG_1181.jpg
    IMG_1181.jpg
    620.5 KB · Views: 292
  • IMG_1180.jpg
    IMG_1180.jpg
    486.8 KB · Views: 263
  • IMG_1182.jpg
    IMG_1182.jpg
    388.7 KB · Views: 251
  • DXE_driver_UsbBusDxe.ffs.zip
    14.6 KB · Views: 160
  • DXE_driver_XhciDxe.ffs.zip
    16.7 KB · Views: 139
  • USB3 via FL1100.png
    USB3 via FL1100.png
    175.7 KB · Views: 283
Last edited:

iPhone_se

macrumors newbie
Feb 1, 2019
22
24
Hi Ausdauersportler, thanks for the great work, as always, on this firmware mod for the 2011 iMac12,2.

I was wondering if you would be kind enough to post your modified iMac12,2 firmware .bin with this mod? I would like to flash my iMac12,2 with it to allow me to use my TB3 dock to boot USB3 devices. Or as an alternative, could you provide a little more detail about the steps required to incorporate the @Jazzzny MP6,1 drivers into the original iMac12,2 firmware .bin? I have a CH341A programming device and am very experienced in flashing EEPROM firmware. I used one of your detailed posts in the 2011 graphics card upgrade thread to flash my WX4150 with a new GOP.rom.

Many thanks!

iMac 27 Mid 2011 WX4150 i7-2600
 
Last edited:

Ausdauersportler

macrumors 603
Nov 25, 2019
5,007
5,826
Hi Ausdauersportler, thanks for the great work, as always, on this firmware mod for the 2011 iMac12,2.

I was wondering if you would be kind enough to post your modified iMac12,2 firmware .bin with this mod? I would like to flash my iMac12,2 with it to allow me to use my TB3 dock to boot USB3 devices. Or as an alternative, could you provide a little more detail about the steps required to incorporate the @Jazzzny MP6,1 drivers into the original iMac12,2 firmware .bin? I have a CH341A programming device and am very experienced in flashing EEPROM firmware. I used one of your detailed posts in the 2011 graphics card upgrade thread to flash my WX4150 with a new GOP.rom.

Many thanks!

iMac 27 Mid 2011 WX4150 i7-2600
Enable XHCI aka USB3 booting in OCLP settings and build and rewrite OpenCore to your EFI. Reboot and checking you can see USB3 devices on the OCLP picker. You should be able to boot from OCLP picker, although sleep/wake may be broken.

If this works your TB dock will provide USB booting on EFI boot after firmware flashing.
 

iPhone_se

macrumors newbie
Feb 1, 2019
22
24
Enable XHCI aka USB3 booting in OCLP settings and build and rewrite OpenCore to your EFI. Reboot and checking you can see USB3 devices on the OCLP picker. You should be able to boot from OCLP picker, although sleep/wake may be broken.

If this works your TB dock will provide USB booting on EFI boot after firmware flashing.

Hey thanks Ausdauersportler for this tip to enable XHCI setting in OCLP!! I did not even know about this setting even though I have been using OCLP for over a year now running Ventura flawlessly on my iMac12,2 with WX4150.

After enabling the XHCI USB3 setting in the OCLP and rebuilding/rewriting to the EFI, when I booted up with the Samsung T7 connected to the Caldigit TS3 TB dock, amazingly the T7 showed up in the OCLP boot picker!! I then proceeded to clean install Sonoma 14 beta macOS on it perfectly, rebooting the T7 several times from TB dock during the normal install process. Everything was super smooth and fast, even a little faster than my internal SATA SSD.

I was not expecting this since I am still running the stock unmodified iMac12,2 firmware !! How is this possible??

I have attached a couple of screen shots below for reference. I guess I am not going to have to open up this iMac12,2 after all to flash a modified firmware to get the TB USB3 booting working after all?! That is a huge relief since it is kind of a pain to remove the display to get access to the mainboard firmware IC.

I cannot thank you enough for another incredibly useful old Intel iMac tip that will keep this old reliable 12,2 running for a few more years with fast USB3 booting and storage through Caldigit TS3+ TB dock and Apple USB2 to USB3 adapter.

I am heading over to your PayPal support link right after posting this to send you a little beer money as thanks for the help.

Also, don't want to forget to mention, many thanks to the amazing OCLP devs that are total macOS rock stars!!

iMac 27 Mid 2011 WX4150 i7-2600, Apple USB2 to USB3 adapter, Caldigit TS3+ TB dock, Samsung T7 external SSD
 

Attachments

  • 2011_imac12_2_USB3_SamsungT7_speed.png
    2011_imac12_2_USB3_SamsungT7_speed.png
    229.4 KB · Views: 110
  • 2011_imac12_2_USB3_TS3_Sonoma14.png
    2011_imac12_2_USB3_TS3_Sonoma14.png
    255.6 KB · Views: 105

Ausdauersportler

macrumors 603
Nov 25, 2019
5,007
5,826
Hey thanks Ausdauersportler for this tip to enable XHCI setting in OCLP!! I did not even know about this setting even though I have been using OCLP for over a year now running Ventura flawlessly on my iMac12,2 with WX4150.

After enabling the XHCI USB3 setting in the OCLP and rebuilding/rewriting to the EFI, when I booted up with the Samsung T7 connected to the Caldigit TS3 TB dock, amazingly the T7 showed up in the OCLP boot picker!! I then proceeded to clean install Sonoma 14 beta macOS on it perfectly, rebooting the T7 several times from TB dock during the normal install process. Everything was super smooth and fast, even a little faster than my internal SATA SSD.

I was not expecting this since I am still running the stock unmodified iMac12,2 firmware !! How is this possible??

I have attached a couple of screen shots below for reference. I guess I am not going to have to open up this iMac12,2 after all to flash a modified firmware to get the TB USB3 booting working after all?! That is a huge relief since it is kind of a pain to remove the display to get access to the mainboard firmware IC.

I cannot thank you enough for another incredibly useful old Intel iMac tip that will keep this old reliable 12,2 running for a few more years with fast USB3 booting and storage through Caldigit TS3+ TB dock and Apple USB2 to USB3 adapter.

I am heading over to your PayPal support link right after posting this to send you a little beer money as thanks for the help.

Also, don't want to forget to mention, many thanks to the amazing OCLP devs that are total macOS rock stars!!

iMac 27 Mid 2011 WX4150 i7-2600, Apple USB2 to USB3 adapter, Caldigit TS3+ TB dock, Samsung T7 external SSD
The main difference between the recent iMac firmware patching and the OCLP solution:
When pressing alt/option and entering the EFI boot picker you will not be able to access USB3 devices.
Both solutions are using the same drivers.
iMac firmware patching has it’s own risks, though.
 

iPhone_se

macrumors newbie
Feb 1, 2019
22
24
Last night I finally pulled the plug and injected the USB3 drivers from the MP6,1 into the iMac12,2 firmware, i.e. replaced the existing UsbBusDxe and added the XhciDxe right after it using UEFITool 0.2.6 and got native USB3 boot support via TB dock.

Same success with FL1100 based PCI card connect via mPCI port. (see pictures attached, the USB3 connected external SSD is responsible for all the orange icons on the EFI boot screen).

Not sure if the cMP community tried this....

(for @Dayo )

Special thanks to @m0bil for making firmware mods and flashing easy and @Jazzzny for providing the drivers.

Hi Ausdauersportler,

I decided to go ahead and modify the firmware using your generously provided USB3 UsbBusDxe.ffs and XhciDxe.ffs files and UEFITool 0.2.8. I followed your same steps of replacing the existing UsbBusDxe module and added the XhciDxe right after it. Everything went great with that part, so I then applied m0bil's bootrom protection bypass patch before flashing it to the firmware IC using the CH341A.

Of course I used your awesome "Swiss army knife of bios hackers" GRML-Flash tool and flashrom software. Everything worked great in the end, but I was a little worried when I saw an "ERASE FAILED!" error message during the flashing write process. But the flashrom utility apparently found another erase function that worked, and continued working on the write operation. Finally a couple minutes later I saw a message that the erase/write was done, and was successfully verified.

I was being super cautious and used several reads and shasum checksums to make sure that my ch341a clip was making secure contact with the MX25L6405 IC before writing the modded firmware file to it. After the write and successful verification message, I removed the clip, held my breath, then hit the power button and tried to boot the new firmware. After the normal short power on pause I was rewarded with that beautiful Mac power on chime. I then proceeded to install the display which I had left off in case I did not get the chime and had to revert the firmware back to the original.bin firmware.

After the display was back in and everything was buttoned up, was the real test...would my Caldigit TS3 TB dock and Samsung T7 show up in the EFI boot picker? Sure enough they did, just as expected thanks to your awesome work and provided .ffs USB3 driver modules! (Note: before this firmware mod project I removed the previously installed OCLP USB3 drivers by unchecking the XHCI setting and rebuilding/reinstalling OCLP).

Many thanks to you for this USB3 firmware mod, and of course, Sir m0bil, for his awesome flash protection bypass patch!
iMac 12,2 27 Mid 2011 WX4150 i7-2600, Apple USB2 to USB3 adapter, Caldigit TS3+ TB dock, Samsung T7 external SSD
 
Last edited:
  • Like
Reactions: Ausdauersportler
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.