Page 2 of 2

Re: USB stack - who's done their own, and who ported one?

Posted: Thu Sep 23, 2021 4:55 pm
by thewrongchristian
I should give a bit of an update.

I have a mostly working UHCI based stack, working under QEMU. Testing on real hardware locked up when I removed a device, so I need to figure out and handle that.

I can find HID devices, but not yet plumbed it in to an event system. I'm toying with the idea of export HID to user space, so that the user code just gets and interprets HID reports, and existing PS/2 kbd/mouse can emulate a HID based interface. But that's speculation at the moment, I was just happy to reliably read reports.

I can read and write bulk only transport storage, and I'm currently re-jigging my block device stack based on what I've learned since I originally wrote that (have to refactor the IDE drivers, and the block device interface.)

My USB interface looks reasonably independent of the HCI, so the next task will be to do an EHCI driver, but that might have to wait until I've done the block device interface refactoring.

No hubs yet, other than the UHCI root hub.

Snapshot of the USB related files:
http://thewrongchristian.org.uk:8082/di ... rivers/usb

Re: USB stack - who's done their own, and who ported one?

Posted: Mon Apr 03, 2023 4:40 pm
by bellezzasolo
Bumping this thread, I've been working on my USB stack.

Strangeness first, the reset procedure leaves the devices powered up after powering off!
Image

But after much head scratching, I finally made a breakthrough with xHCI.
Image

A little bit of refactoring and a couple days more headscratching, and I now have preliminary support for USB hubs.
Image