[haiku-development] Re: USB Keyboard and Debugger
- From: "Michael Lotz" <mmlr@xxxxxxxx>
- To: haiku-development@xxxxxxxxxxxxx
- Date: Fri, 13 Feb 2009 00:31:44
> 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?
That'd be possible of course. The reason it isn't done is that it's
quite a lot of work. I've started to implement a minimal USB stack at
one point, but you'll really need pretty much a complete host
controller driver for UHCI and OHCI that is polling based (because you
don't have interrupts). Then you'd need to initialize the controllers
with those drivers, do the addressing of the devices, interpret the
device descriptors to find the keyboard, set up the transfer pipes and
start scheduling transfers. This is pretty much about 50% of the whole
USB stack. It's not enough to simply have control over a USB port, you
still need to enumerate and address the keyboard below that port
properly for this to work. And of course you couldn't return from such
a KDL anymore, because you'd leave the controller in a completely
different state and the real host controller driver couldn't make use
of it anymore. For just retrieving debug output it'd be enough, but for
the occasional drop to KDL to get info and back it wouldn't be usable.
It's certainly doable, but it's quite a lot of work and has only limited
use. That's not to say that I necessarily won't get annoyed by it and
still implement it (I do have a legacy free board here, no serial, no
ps/2). Still I'd risk a bet to say that writing a polling nic driver to
enable debugging via network cable would be simpler to implement.
Regards
Michael
Other related posts: