Documente Academic
Documente Profesional
Documente Cultură
3 The 80386
80286 introduced the protected mode 80386 refined the protected mode 80386 expanded the data registers to 32 bits A new feature called virtual 8086 mode became available 80386 Modes:
Real Mode Protected Mode Virtual 8086 Mode
386 architecture has become the foundation for the next four generations of Intel processors (P3-P6) and seven different microprocessor chips.
In this mode the chip is virtually identical to 8086. I.e. it has the following:
Address space is limited to 1MB using the low order address lines A0-A19. The segmented memory addressing scheme is retained (each segment is limited to 64K)
Access to the 32-bit registers The addition of two new segments: F and G to be explained later
The addresses stored in segment registers are now interpreted as pointers into a descriptor table Each segments entry in this table is 8 bytes long and identifies :
the 32-bit base address of the segment, the segment size and the access rights
Paging Unit:
Protection Mechanism:
The main difference between segmentation and paging is the difference in block sizes. (1 byte 4GB with segmentation). (always 4kB with paging)
Virtual 8086 mode allows multiple 8086 programs (and 386 applications) to run independent of each other and simultaneously In virtual 8086, each task sees 1MB of address space (which is mapped anywhere in the 4GB of physical memory through paging) Real mode limits the 386 to 1MB of physical memory and one 8086 task can run at a time. Moreover, all of protection and memory management features of 386 are turned off. 386 can be operated in both virtual 8086 mode and protected mode simultaneously. Because each 8086 program is assigned the lowest privilege, access to other programs and segments is not allowed, thus protecting each such task.
FIGURE 3-10
When operated in Virtual 8086 Mode the 386 can run multiple 8086/88 programs simultaneously.
FIGURE 3-11 The processor model for the 80386 microprocessor consists of the bus interface unit (BIU), central processing unit (CPU), and the memory management unit (MMU).
12
Segmentation Unit Generates the 8086-style (20 bit) physical address when the 386 operates in real mode. When operated in protected mode, the descriptor registers store the base address, size, and attributes of the various segments In effect these registers cache the descriptor tables stored in RAM allowing the processor to switch between tasks very quickly
13
2.
Special-purpose registers
Used by the operating system 1. Control registers 2. System address registers 3. Debug registers 4. Test registers
15
18
FIGURE 3-13 The 80386 flag word is 32 bits long. Four new flags have been added compared to the 8086: VM, RF, NT, and IOPL. (Courtesy of Intel Corporation.)
All registers are 16-bit (same as 8086). Since no instructions default to the GS or FS, the previous segment register assignment still apply. Real Mode: Same addressing mechanism in 8086, segment registers hold the base address of the segment Protected Mode: Content of segment registers are pointers into a descriptor table whose entries determine the base address of the segment, its size and attributes
22
Page table holds the starting address of each page frame and access information about that frame.
24