So I've recently "finished" my xHCI controller driver, and realized that I had only been testing it in QEMU.
The next VMs I am testing it with are VMware and Virtualbox.
Both of these allow virtualizing real USB devices so I am not just testing the QEMU built-in ones. (I know that QEMU has virtualizing too, but I'm on WSL2 right now and it does not support USB devices. Maybe I'll boot up Linux sometime and try it.)
I also tried testing my OS on the only computer I'm willing to test it on that has xHCI support. Unfortunately, I could not get it to attach a device to the xHCI rather than the EHCI, so I just gave up. I even turned off the "legacy USB controller" in the BIOS. It initializes the xHCI controller all right, but detects no attached device on the single port that shows up (or its USB2 companion). The laptop has 4 USB ports physically, but only 1 port pair on the xHCI controller.
Here are the results:
Code: Select all
UHCI:
QEMU - Works
VMWare - Works (with real (virtualized) devices too)
VBox - Not supported by software
xHCI:
QEMU - Works
VMware - Fails
VBox - Fails
In VMware, it manages to address the devices, but fails when trying to get the Device Descriptor (it times out).
VirtualBox fails even worse, as it fails when trying to enable a slot (it also times out).
I would like to be able to test with Bochs as well, but unfortunately I haven't been able to figure out how to get USB devices connected to the emulator.
Does anyone know why this is happening? Is there some quirk with QEMU that prevents it from working with the other two?
Anyone have experience with Bochs' USB?
Note: The serial logs from my OS for VMWare, VirtualBox, and QEMU are attatched.