[haiku-development] Re: Virtual 8086 mode support

  • From: "François Revol" <revol@xxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Sun, 20 Apr 2008 12:35:59 +0200 CEST

> Am Samstag, 19. April 2008 schrieb Axel Dörfler:
> > > 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?
>
> Even though it may sound strange it was (for the first step) the
> easiest way
> to implement it.
>
> > 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.
>
> That's pretty much the explanation for why I did it as syscall. First
> of all I
> see no way on how to do it from a kernel thread. The kernel teams
> address
> space starts from 0x80000000 but in vm86 mode the thread will run in
> the 1st
> Mb of the address space. So it must be done in the context of a user
> mode
> thread unless I overlooked something.

That's not totally true.

kernel threads run in the kernel team with access to the kernel's
version of the user space, so they access the full 4GB.
At least they should.

François.

Other related posts: