beautypg.com

Intel IA-32 User Manual

Page 107

background image

Vol. 3A 3-27

PROTECTED-MODE MEMORY MANAGEMENT

(Page-directory entries for 4-KByte page tables) — Specifies the physical
address of the first byte of a page table. The bits in this field are interpreted as
the 20 most-significant bits of the physical address, which forces page tables to
be aligned on 4-KByte boundaries.

(Page-directory entries for 4-MByte pages) — Specifies the physical address
of the first byte of a 4-MByte page. Only bits 22 through 31 of this field are
used (and bits 12 through 21 are reserved and must be set to 0, for IA-32
processors through the Pentium II processor). The base address bits are inter-
preted as the 10 most-significant bits of the physical address, which forces
4-MByte pages to be aligned on 4-MByte boundaries.

Present (P) flag, bit 0

Indicates whether the page or page table being pointed to by the entry is
currently loaded in physical memory. When the flag is set, the page is in phys-
ical memory and address translation is carried out. When the flag is clear, the
page is not in memory and, if the processor attempts to access the page, it
generates a page-fault exception (#PF).

The processor does not set or clear this flag; it is up to the operating system or
executive to maintain the state of the flag.

If the processor generates a page-fault exception, the operating system gener-
ally needs to carry out the following operations:

1.

Copy the page from disk storage into physical memory.

2.

Load the page address into the page-table or page-directory entry and set
its present flag. Other flags, such as the dirty and accessed flags, may also
be set at this time.

Figure 3-15. Format of Page-Directory Entries for 4-MByte Pages and 32-Bit Addresses

31

Available for system programmer’s use
Global page
Page size (1 indicates 4 MBytes)
Dirty

12 11

9 8 7 6 5 4 3 2 1 0

P
S

P

C

A

D

Accessed
Cache disabled
Write-through
User/Supervisor
Read/Write
Present

D

P

P

W

T

U

/

S

R

/

W

G

Avail.

Page Base Address

Page-Directory Entry (4-MByte Page)

22 21

Reserved

Page Table Attribute Index

P

A
T

13