On 9/23/10 3:16 AM, Kevin O'Connor wrote:
Using SMI is something I've thought a little about. It does have some snags: SMI programming is chipset specific on real hardware so one can't deploy a single solution for all coreboot users;
coreboot has some fairly generic SMI handler code that runs in protected mode. Some of the code parts are chipset specific and some are CPU specific, but those are no magic. Many x86 firmware implementations today allow their subsystems to add their own code to the SMI handler. coreboot could provide an interface that would allow SeaBIOS to hook its code up the very same way. 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.
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.
How do other BIOSes solve the problem?