UHCI Controller slow in VMWare
Posted: Sun Apr 23, 2017 1:24 pm
Hey guys,
I've been working on my UHCI controller code, and I've got it mostly working, but there are a few weird issues when running in VMWare. I did a forum search and found one thread that sounds exactly like my issue here: http://forum.osdev.org/viewtopic.php?f=1&t=21703
That thread ended with no real resolution that I could find.
My first issue is that the frame counter is incrementing about once per second, instead of once per millisecond like the specs say. Everything seems to work, just very slowly. It may take 1-2 seconds before I get a response from the device.
Second, I can only seem to get one TD worth of data from the device. If I set the controller to 64-bytes max payload, I can get 64 bytes from the device in a single TD, but if I chain another TD after it, I get a STALL and CRC error. I've tried toggling the data toggle bit and leaving it the same, and I get the same results.
Specifically, I can do a GET_DESCRIPTOR with one SETUP TD, one IN TD and one Result TD. But if I request more than 32 or 64 bytes, and chain another IN TD, the second IN TD fails with its STALL and CRC error flags set, and no bytes transferred (0x7ff).
I assume these two issues are related, but they could be completely separate. Has anyone figured these issues out yet?
I've tried Windows XP and Arch Linux with the same configuration, and they seem to work fine, so it has to be something in the PCI or UHCI host controller configuration.
Thanks, guys.
I've been working on my UHCI controller code, and I've got it mostly working, but there are a few weird issues when running in VMWare. I did a forum search and found one thread that sounds exactly like my issue here: http://forum.osdev.org/viewtopic.php?f=1&t=21703
That thread ended with no real resolution that I could find.
My first issue is that the frame counter is incrementing about once per second, instead of once per millisecond like the specs say. Everything seems to work, just very slowly. It may take 1-2 seconds before I get a response from the device.
Second, I can only seem to get one TD worth of data from the device. If I set the controller to 64-bytes max payload, I can get 64 bytes from the device in a single TD, but if I chain another TD after it, I get a STALL and CRC error. I've tried toggling the data toggle bit and leaving it the same, and I get the same results.
Specifically, I can do a GET_DESCRIPTOR with one SETUP TD, one IN TD and one Result TD. But if I request more than 32 or 64 bytes, and chain another IN TD, the second IN TD fails with its STALL and CRC error flags set, and no bytes transferred (0x7ff).
I assume these two issues are related, but they could be completely separate. Has anyone figured these issues out yet?
I've tried Windows XP and Arch Linux with the same configuration, and they seem to work fine, so it has to be something in the PCI or UHCI host controller configuration.
Thanks, guys.