[haiku-development] Re: Virtual 8086 mode support

Ingo Weinhold <ingo_weinhold@xxxxxx> wrote:
> On 2008-04-19 at 19:28:11 [+0200], Jan Klötzke <
> jan.kloetzke@xxxxxxxxxx>
> wrote:
> > It turned out to be not very difficult in the end. There is a new
> > syscall
> > vm86() which enters virtual 8086 mode for the current thread. The
> > caller
> > passes
> > a structure with all the registers with where the execution should
> > begin in
> > vm86 mode. Whenever a priviliged intruction is executed the vm86()
> > call will
> > return with B_OK or, if a signal is delivered, with B_INTERRUPTED.
> > In any
> > case
> > the passed registers structure will be updated to the values where
> > the vm86
> > mode was left.
> Nice! I wonder, why this is a syscall, though. If the intended use is
> for the
> VESA driver, it won't really help. Or do I miss something?

The VESA driver also has an accelerant. I dunno if one need this
functionality in userland, but you'd need a syscall anyway to offload
that functionality to the driver (just an ioctl(), of course).
Since you want to access low memory (and would need a dedicated kernel
thread to do so in the kernel, otherwise it's mapped by some app), it
might even only be possible to do that in userland ATM.

Bye,
   Axel.


Other related posts: