inter80386

PHYSICAL

MEMORY

...........~~~ 02000000(H)

VIRTUAL MODE 8086 TASK

 

8086 OS

 

 

 

 

EMPTY

 

 

OOOOOOOO(H)

 

 

 

 

PAGE DIRECTORY

TASK 1 PAGE

~I TASK 1

8086 OS

ROOT

TABLE

WI!!

MEMORY

111 MEMORY

VIRTUAL MODE

PAGE DIRECTORY

I777l

TASK 2

~ 80386 OS

8086 TASK

TASK 1

rtfLA

MEMORY

~ MEMORY

231630-69

Figure 4-24. Virtual 8086 Environment Memory Management

Figure 4·24 shows how the 80386 paging hardware enables multiple 8086 programs to run under a virtu· al memory demand paged system.

4.6.4Protection and 1/0 Permission Bitmap

All Virtual 8086 Mode programs execute at privilege level 3, the level of least privilege. As such, Virtual 8086 Mode programs are subject to all of the protec- tion checks defined in Protected Mode. (This is dif- ferent from Real Mode which implicitly is executing at privilege level 0, the level of greatest privilege.) Thus, an attempt to execute a privileged instruction when in Virtual 8086 Mode will cause an exception 13 fault.

The following are privileged instructions, which may be executed only at Privilege Level o. Therefore, at- tempting to execute these instructions in Virtual 8086 Mode (or anytime CPL > 0) causes an excep- tion 13 fault:

LIDT: MOV DRn,reg: MOV reg,DRn:

LGDT: MOV TRn,reg: MOV reg,TRn:

LMSW: MOV CRn,reg: MOV reg,CRn. CLTS;

HLT:

Several instructions, particularly those applying to the multitasking model and protection model, are available only in Protected Mode. Therefore, at- tempting to execute the following instructions in Real Mode or in Virtual 8086 Mode generates an exception 6 fault:

LTR; STR;

LLDT; SLDT;

LAR: VERR:

LSL; VERW;

ARPL.

The instructions which are IOPL-sensitive in Protect- ed Mode are:

IN;STI:

OUT; CLI

INS:

OUTS;

REP INS;

REP OUTS;

56

Page 117
Image 117
Intel 80386 manual Protection and 1/0 Permission Bitmap, Virtual 8086 Environment Memory Management