[haiku-development] Re: USB Keyboard and Debugger

  • From: "Raymond C. Rodgers" <sinful622@xxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Wed, 11 Feb 2009 19:18:07 -0500

Michael Lotz wrote:
Hi David,

David McPaul wrote:
Is there any way to keep the USB keyboard working when we drop to the debugger.

I get a PANIC: Double Fault a lot on the Eee PC but the keyboard does
not work so I cannot trace it back
I think the only way to do that is for the kernel debugger to try and switch USB Legacy Mode back on before entering KDL. I'm not sure how easy that would be to implement though.

The problem is that this cannot really be done. For EHCI it would in principle be doable to hand the controller back to system software, but UHCI does not provide provisions for that. Since keyboards are full/ lowspeed devices they do use UHCI however. The problem is that the BIOS would have to re-initialize the controller and provide the legacy emulation again. You can't simply turn it back on, as you completely kill the legacy state the controller is in when taking over ownership and reinitializging it. The only way you could get by would be to completely disable OS support for USB (i.e. removing all USB host controller drivers) so that the system always runs in legacy emulation.


I'm not an expert on USB or how to manage USB devices, but it seems to me that a solution to this problem is going to be necessary eventually as it's getting harder to find PS2 keyboards, and though most keyboards ship with a USB to PS2 adapter, that can't be guaranteed for the future. In fact, it's no longer unusual for motherboards to not even have PS2 ports any more.

Might it be possible to reinitialize the USB ports and switch to a slimmed down USB stack with support for just a handful of devices such as keyboard, simplified USB mass storage, and perhaps something else?


Other related posts: