From: mb@smsc.sony.com (Michael Burg) Subject: Re: V86, echo, *P=NULL etc updates Date: 23 Jan 1992 21:00:23 GMT
In article <1992Jan23.112540.5889@klaava.Helsinki.FI> torvalds@klaava.Helsinki.FI (Linus Benedict Torvalds) writes:
>Replying to questions (mostly from the mailing-list - I'm trying to move
>over to alt.os.linux):
>
>> V86-mode and DOS sessions under Linux?
>
>Right. Seems everybody wants these, but the problem is that Linux wasn't
>designed with V86-mode in mind, and the memory management makes some
>assumptions that are simply incompatible with V86 tasks. The problem is
>that a V86-task /has to/ be at virtual address 0-1M, and doesn't care
>about the current linux protections scheme that uses segments. All right
>so far: but the current kernel also lives in that space. Ooops.
>
A V86-Task doesn't physically have to reside below the 1MB region. The V86
process running _thinks_ it's in the 1MB physical region with real-mode type
segments. From a memory management point of view a V86 task is basicly no
different from any other. The only major difference is that the task
might contains pages which are physically mapped to I/O devices (i.e.
video cards). The pages within a V86 task can be swapped, relocated or
even shared.
In commerical versions of Unix for the PC, the kernel support for V86 is
small compared to the entire package. Selected device drivers provide
additional support so devices can be shared between a V86 task and the
entire system. The major of coding lies with the user process attempting
to simulate the BIOS, selected MS-DOS functions & various I/O ports and memory
locations. (timers, CMOS, interrupt controllers) The kernel provides support
for selected "privilage" instructions such as cli, sti, and the "duality" of
process that is containing a V86 task. The kernel also provides a bigger time
slice for those processes which are V86 ones.
In the case of VPIX, the vpix process has a "duality" to it. Part of the
program is a normal "native" 32-bit task, the other half is a V86 task.
Switching from the native task to the V86 task can be done with a IRET
instruction - (and with a little help from the kernel setting up the TSS
correctly). The V86 task traps back into the kernel or back to
the "native" user process depending on the instructions attempted inside
the V86 task.
Intel has a system writer's book which contains a chapter on V86 support.
Michael Burg @ Sony Microsystems, San Jose CA Phone: (408) 944-4032
E-Mail: mb@smsc.sony.com or ..!{uunet,mips}!sonyusa!mb