I had some time to work on my XHCI-driver (in intel assembly).
I still don't get the Device Descriptor, but SetAddress returns with OK.
I have a problem with the Legacy Support.
IDs of Extended Capabilities:
VirtualBox: 02 02 (so there are two "Supported Protocol"-entries)
Dell Inspiron 5559: 02 02 C0 01 C6 C7 C2 0A C3 C4 C5
As it can be seen above, there is no ID=1, so VirtualBox provides no Legacy Support.
Lunt says in his book(1st ed. page 9-9) that if the Legacy Support is found, then it must be the first item in the list.
That's why the 01 in case of Dell Inspiron 5559 shouldn't be Legacy Support (!?).
According to the XHCI-specs (7.1): "The USB Legacy Support provided by the xHC is optional normative functionality ...".
The question is how can I turn off Legacy Support, if it is not present in the list of Extended Capabilities?
I have a working EHCI-driver (can read/write files from/to pendrives), so turning off Legacy Support works for me in case of EHCI.
Regards,
rob
XHCI Legacy
Re: XHCI Legacy
If there is no USB Legacy Support Extended Capability (ID 0x01) then the XHCI does not implement legacy support. Thus it does not need to be turned off. If it is present you need to acquire the OS-BIOS semaphore, similar to EHCI.
I don't see where the spec states that capability 0x01 has to be the first capability.
I don't see where the spec states that capability 0x01 has to be the first capability.
managarm: Microkernel-based OS capable of running a Wayland desktop (Discord: https://discord.gg/7WB6Ur3). My OS-dev projects: [mlibc: Portable C library for managarm, qword, Linux, Sigma, ...] [LAI: AML interpreter] [xbstrap: Build system for OS distributions].
Re: XHCI Legacy
So, does this mean, that BIOS won't interfere, if Legacy-Support is not present in the ExtCaps?Korona wrote:Thus it does not need to be turned off.
Re: XHCI Legacy
Yes.
managarm: Microkernel-based OS capable of running a Wayland desktop (Discord: https://discord.gg/7WB6Ur3). My OS-dev projects: [mlibc: Portable C library for managarm, qword, Linux, Sigma, ...] [LAI: AML interpreter] [xbstrap: Build system for OS distributions].
Re: XHCI Legacy
Section 7.1.1 in version 1.1Korona wrote:I don't see where the spec states that capability 0x01 has to be the first capability.
"This register is an xHCI extended capability register. It includes a specific function section and a pointer
to the next xHCI Extended Capability. This register is used by pre-OS software (BIOS) and the operating
system to coordinate ownership of the xHC."
It is used as a start for the extended capabilities list and is at offset "xECP + 00h".
Therefore, it is pretty much required to be present. I don't know of any xHCI implementation that does not support Legacy Support, but it has been a few months since I have worked with USB.
Ben
http://www.fysnet.net/the_universal_serial_bus.htm
Re: XHCI Legacy
Thanks Ben.BenLunt wrote: It is used as a start for the extended capabilities list and is at offset "xECP + 00h".
Therefore, it is pretty much required to be present.
I checked my code many times but it still seems that there is no xhci-Legacy-Support in virtualbox.
As for the Dell-Inspiron, I will check that ID=1 which is not at xECP+00h.
Sooner or later I will have working xHCI-driver.
Re: XHCI Legacy
Even though that says xECP I think they mean "start of the capability" and not the literal xECP register here. I might be wrong though.BenLunt wrote:It is used as a start for the extended capabilities list and is at offset "xECP + 00h".
XHCIs on PCI expansion cards will probably not provide legacy support. I don't think there is a PCIe packet that causes the system to enter SMM; therefore those cards should be unable to implement legacy support.
managarm: Microkernel-based OS capable of running a Wayland desktop (Discord: https://discord.gg/7WB6Ur3). My OS-dev projects: [mlibc: Portable C library for managarm, qword, Linux, Sigma, ...] [LAI: AML interpreter] [xbstrap: Build system for OS distributions].