[SeaBIOS] ohci bulk?

Kevin O'Connor kevin at koconnor.net
Tue Sep 28 02:21:12 CEST 2010


On Mon, Sep 27, 2010 at 06:29:31PM +0200, Stefan Reinauer wrote:
>Left
> alone the question if the USB stack shouldn't be migrated into coreboot
> completely rather than potentially opening a huge security hole and
> another API to keep stable.

One can't do the full USB stack in SMI - if nothing else, seabios
would need to translate the disk access requests into coreboot SMI
requests.  At that point, there's going to be an API and probably all
the same security concerns.

However, it's a valid question.  I do kinda like the way SeaBIOS can
do USB without needing SMI today.  Only OHCI bulk has been an issue so
far.  (Though OHCI keyboard leds would also be a problem.)  Using SMI
for OHCI bulk seems like "using a sledgehammer to kill a fly" to me.
In particular, I'd guess most people would be using ehci bulk today.

> > using an SMI to get out of vm86 mode requires the
> > BIOS to emulate all memory accesses to user memory (manually walking
> > the page table, forcing page faults) which is tricky;
> Whereas an alternative could be to have vm86 users provide their own USB
> stack.

It's possible to support OHCI bulk by switching into protected mode;
failing any requests made while in vm86 mode.  Two problems: freedos
by default uses vm86 mode; there's no good way to know whether to
return in real mode or bigreal mode.

> How do other BIOSes solve the problem?

That's a good question, and I don't know the answer.  I would guess
they have an SMI keyboard handler that does some of the bulk work too.

-Kevin



More information about the SeaBIOS mailing list