OHCI: relink root hub port index to existing device ID
Posted: Mon Feb 03, 2025 9:33 am
Playing around with my OHCI driver, and had a fun idea pop into my head
What if instead of resetting the host controller, it were possible to disable the control list and periodic list, then move all the data to memory I control, leaving the devices as set up by the bios?
I wouldn't need to peek at any BIOS tables, except for one thing. If a device is disconnected from the root hub, I'll only get the port index where it was. Leaving off downstream hubs for now, as they are a simpler problem.
The BIOS of course knew the mapping from that port index to the device ID. How can I find that same mapping later? Ideally without having to do a port reset, because it's already been done by the bios and it takes for... ever... by which I mean about 1 second.
All of this assumes the bios keeps the OHCI controller operational for whatever reason, SMM emulating a PS/2 keyboard, handling disk read requests from real mode int 13h, etc.
I can't think of a way to do it. Looking for ideas.
What if instead of resetting the host controller, it were possible to disable the control list and periodic list, then move all the data to memory I control, leaving the devices as set up by the bios?
I wouldn't need to peek at any BIOS tables, except for one thing. If a device is disconnected from the root hub, I'll only get the port index where it was. Leaving off downstream hubs for now, as they are a simpler problem.
The BIOS of course knew the mapping from that port index to the device ID. How can I find that same mapping later? Ideally without having to do a port reset, because it's already been done by the bios and it takes for... ever... by which I mean about 1 second.
All of this assumes the bios keeps the OHCI controller operational for whatever reason, SMM emulating a PS/2 keyboard, handling disk read requests from real mode int 13h, etc.
I can't think of a way to do it. Looking for ideas.