It has been a while since I have posted something on this forum but I, once again, need your guys help .
Recently I decided to start working on my USB support again. It was working in general but I felt that it could be improved a lot, secondly I needed to add some new functions in order to make my mouse driver work. Re-coding UHCI and OHCI succeeded with some big struggles, but I did manage to get them both working in the end.
After applying some updates to my EHCI driver I decided to test it, and surprise surprise, it actually worked . Only on qemu and virtualbox though, real hardware somehow refused to reset and initialize the controller. I did some digging and found out that the following occurred: Every register on the EHCI controller reads as 0xFFFFFFFF (See register dump bellow).
Code: Select all
[590] [Info]: Activating driver EHCI USB Controller
[604] [Info]: EHCI Bar0 -> 0xFFA80800 0x00000000 0x00000400 0 0
[621] [Info]: EHCI regBase -> 0xC1500000
[633] [Info]: ------------------- EHCI Register Dump-----------------------
[653] [Info]: EHCI EHCI_CAPS_CapLength 0xFFFFFFFF
[666] [Info]: EHCI EHCI_CAPS_Reserved 0xFFFFFFFF
[679] [Info]: EHCI EHCI_CAPS_IVersion 0xFFFFFFFF
[692] [Info]: EHCI EHCI_CAPS_HCSParams 0xFFFFFFFF
[706] [Info]: EHCI EHCI_CAPS_HCCParams 0xFFFFFFFF
[719] [Info]: EHCI EHCI_CAPS_HCSPPortRoute 0xFFFFFFFF
[734] [Info]: EHCI EHCI_OPS_USBCommand 0xFFFFFFFF
[747] [Info]: EHCI EHCI_OPS_USBStatus 0xFFFFFFFF
[760] [Info]: EHCI EHCI_OPS_USBInterrupt 0xFFFFFFFF
[774] [Info]: EHCI EHCI_OPS_FrameIndex 0xFFFFFFFF
[788] [Info]: EHCI EHCI_OPS_CtrlDSSegemnt 0xFFFFFFFF
[802] [Info]: EHCI EHCI_OPS_PeriodicListBase 0xFFFFFFFF
[817] [Info]: EHCI EHCI_OPS_AsyncListBase 0xFFFFFFFF
[831] [Info]: EHCI EHCI_OPS_ConfigFlag 0xFFFFFFFF
[844] [Info]: EHCI EHCI_OPS_PortStatus 0xFFFFFFFF
[858] [Info]: -------------------------------------------------------------
[1388] [Error]: driver initialize failed for driver -> EHCI USB Controller
The initialization code can be found here: https://github.com/Remco123/CactusOS/bl ... ci.cpp#L53
Note: Code works fine on virtual machines and register values are correct
Really hope one of you guys can help me with this!
Thanks in advance,
GhelloWorld/Remco123