BenLunt wrote:
Hi,
slammar wrote:
This is the url to the source code of my OS, which only prints the contents of the sbrn register of the xhci controller:
https://github.com/adriancuadrado/osdev_xhciCurrently, the relative code is missing from the github.
Weird, I checked it out and I can see my code even logged out of github.
Fortunately, I attached the source code, so you should be able to see it if you download and extract the contents of the zip file.
BenLunt wrote:
slammar wrote:
In section 5.2.3 of the xhci spec it says that the SBRN register must return 0x13, 0x31 or 0x32, but it returns 0x20 in my code and I would like to know why.
I am sure that is just a typo, but it should be 0x30, 0x31, or 0x32.
Yes, it was a typo. It's fixed now.
BenLunt wrote:
As for your result of 0x20 for the SBRN, this tells me you are getting the EHCI controller and not the xHCI controller. If you are running this in VirtualBox, you do need to make sure the xHCI part of the interface is selected, though I am sure you have done this already.
I am not 100% sure what you mean by this, but when I read the Class, Subclass and Prog IF pci registers I make sure their values are 0x0C (Class = Serial Bus Controller), 0x03 (Subclass = USB Controller) and 0x30 (Prog IF = XHCI (USB3) Controller). Is this what you are talking about?
BenLunt wrote:
Second, since I don't use VirtualBox very much, there is a chance that the emulator is passing all function to the actual hardware on your machine. If this is the case, there are some controllers that start off in EHCI mode (for backward compatibility) and you must tell the controller that you are xHCI aware. This takes specific code that is specific to the hardware. This usually can be "changed" in the BIOS settings. At boot, hit the "SETUP" key (maybe F2) and see if there is a setting that tells the USB hardware to be EHCI or xHCI.
I only saw a single option in my entire BIOS configuration regarding that, which was something like USB legacy support and it was turned on. I turned it off, but the result stay the same