• Updated 2023-07-12: Hello, Guest! Welcome back, and be sure to check out this follow-up post about our outage a week or so ago.

PowerMac G4 USB 2.0 PCI card - It boots!

SiliconValleyPirate

Well-known member
Okay, this was a really pleasant surprise. I found in a recent sort-out a USB 2.0 PCI card in a box of old stuff. It has a NEC720101 chip, no ROM onboard or anything that would indicate it's a Mac specific card, but I thought as a giggle I'd lob it in the GigE G4 and see what happened. First and pleasant surprise was it worked. I plugged in a USB stick and not only did it mount but it copied to the internal drive at 20MB/s - great. That's going to save my sanity a bit.

I had recently built bootable USB stick installers (using CarbonCopyCloner, if anyone's interested) for Tiger and Leopard as a contingency for dead or missing optical drives, something highly relevant to my G4 Quicksilver as it's entirely missing the optical drive and any mounting hardware inside. I also had a few... shenanigans... with the FireWire on the Quicksilver, although I think I eventually narrowed it down to a faulty hard disk enclosure.

ANYHOW, I decided, for a stupid bound-to-fail stunt, to try and boot the GigE off a USB stick in the USB 2.0 PCI card. It usually shows up in the boot selector firmware menu, so I tried that. Initially the hard drive partitions came up and I thought 'yeah, didn't think s-' and just as I was about to write it off the USB installer showed up. I clicked on it and hit the go button and sure enough it booted into the installer :O  I was... surprised... to say the least.

Here's how I think it worked. I don't think the PowerMac G4 firmware is smart enough to be able to tell cards and internal PCI devices apart. I think it just enumerated the USB 2.0 card as a OHCI (USB 1.1) into the device tree along with the internal USB ports. I might look in the PCI device tree int he OF prompt to confirm this. It then just uses the USB drive's PCI address as the boot device and it goes, loads the kernel using USB 1.1 OHCI and then when OS X re-inits the USB bus it treats the cards as EHCI (USB 2.0) and remounts the USB stick as a USB 2.0 device and from there it proceeds at USB 2.0 speeds. Interesting hack! I haven't tried it on the Quicksilver to see if it can differentiate, but I am skeptical as to wether it can. I'd be interested to know if this works on an MDD or a G5, and if the Yikes/B&W supports it too (I never tried it on my B&W).

To confirm my theory I picked up another LaCie branded NEC-based USB 2.0 card on eBay to try to see if it was a fluke or if it really is capable of booting from some Generic PCI cards.

UPDATE:

  • Yes it works exactly the same on my Quicksilver
  • I listed out the PCI device tree in the Quicksilver's Open Firmware prompt and it does indeed enumerate it as a usb device in the same tree as the onboard USB port
  • The 10.4 Installer definitely recognises it as EHCI once it's loaded in the driver kexts (confirmed via System Profiler)
  • I timed a USB 2.0 boot vs USB 1.1 (onboard port) boot of the same Tiger install stick and the kernel load is the same speed (the firmware is having to read the kernel at USB 1.1 speed), but once the OS begins to load it starts way faster on USB 2.0, confirming my theory that OS X is injecting a kext that allows it to function as USB 2.0



Man I've missed this sort of poking and prodding of hardware. You don't get this fun out of modern PCs, I tell ya!

 
Last edited by a moderator:
Top