jhb at freebsd.org
Wed Feb 27 21:51:17 UTC 2008
On Wednesday 27 February 2008 01:45:23 pm Peter Jeremy wrote:
> On Wed, Feb 27, 2008 at 07:34:48AM -0600, Jeff Isaac wrote:
> >doodle with, not BIOS), BUT, from a general knowledge perspective, what
> >advantages does virtual 86 mode have over real mode? Essentially, why did
> >the FreeBSD project choose the virtual implementation? More portable?
> >Easier to write? None of the above? Thanks! :)
> The kernel run in 32-bit protected mode. Switching between protected
> mode and real mode requires a reasonable degree of voodoo which does
> not currently exist in the kernel (the loader handles the initial real
> to protected transition and the kernel then never leaves protected mode).
> Plus you need to either ensure that exceptions/interrupts won't occur
> or handle them in real mode. OTOH, virtual86 mode is part of the
> hardware - you create a task descriptor and set the VM86 bit. Any
> exceptions etc are delivered to the kernel.
And VM86 mode was designed for running real mode code from protected mode
safely. The problem is that since a certain OS from the pacific northwest
just invokes the BIOS from real mode BIOS vendors have become lazy since
their QA usually consists of WHQL or something similar.
More information about the freebsd-amd64