On Sun, 3 Dec 2000, James Mastros wrote:

> It seems to me like writing the BIOS in user space instead of guest space
> would be a big win -- we'd have the BIOS's page be execute-protected, and
> have the monitor send a message off to the userspace program to let it do
> the whole operation in one go.  I think this would be a huge win, not only
> because the code would execute much faster because we don't have to prescan,
> but also because we can use higher-level APIs.

This is actually how dosemu works, but in a different way: 99% of the BIOS
is in user space, except for console graphics, which uses the real
existing video bios in the PC.

It usually goes this way:
DOS program does INT XX -> dosemu traps -> dosemu checks whether interrupt
vector is in BIOS -> 
no: go back to guest space
yes: handle interrupt in user space

Many DOS TSRs etc. revector interrupts and then instead of INT XX call
F000:xxxx directly. The solution is simple: just put an INT XX at that
position in the BIOS and dosemu traps it.

I wonder whether it's that much of a win really: DOS uses the BIOS, but
other OSes much less.

Bart


Reply via email to