Intel IA-32 User Manual

Page 4

Advertising
background image

CONTENTS

iv

Vol. 3A

PAGE

2.6.7

Reading and Writing Model-Specific Registers . . . . . . . . . . . . . . . . . . . . . . . . . . 2-29

2.6.7.1

Reading and Writing Model-Specific Registers in 64-Bit Mode . . . . . . . . . . . 2-29

CHAPTER 3
PROTECTED-MODE MEMORY MANAGEMENT
3.1

MEMORY MANAGEMENT OVERVIEW . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-1

3.2

USING SEGMENTS. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-3

3.2.1

Basic Flat Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-3

3.2.2

Protected Flat Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-3

3.2.3

Multi-Segment Model. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-5

3.2.4

Segmentation in IA-32e Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-6

3.2.5

Paging and Segmentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-6

3.3

PHYSICAL ADDRESS SPACE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-6

3.3.1

Physical Address Space for Processors with Intel

®

EM64T . . . . . . . . . . . . . . . . .3-7

3.4

LOGICAL AND LINEAR ADDRESSES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-7

3.4.1

Logical Address Translation in IA-32e Mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-8

3.4.2

Segment Selectors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-8

3.4.3

Segment Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-9

3.4.4

Segment Loading Instructions in IA-32e Mode . . . . . . . . . . . . . . . . . . . . . . . . . .3-11

3.4.5

Segment Descriptors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-12

3.4.5.1

Code- and Data-Segment Descriptor Types. . . . . . . . . . . . . . . . . . . . . . . . . . 3-15

3.5

SYSTEM DESCRIPTOR TYPES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-17

3.5.1

Segment Descriptor Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-18

3.5.2

Segment Descriptor Tables in IA-32e Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-20

3.6

PAGING (VIRTUAL MEMORY) OVERVIEW . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-20

3.6.1

Paging Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-21

3.6.2

Page Tables and Directories in the Absence of Intel EM64T . . . . . . . . . . . . . . . 3-22

3.7

PAGE TRANSLATION USING 32-BIT PHYSICAL ADDRESSING . . . . . . . . . . . . 3-22

3.7.1

Linear Address Translation (4-KByte Pages) . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-23

3.7.2

Linear Address Translation (4-MByte Pages) . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-24

3.7.3

Mixing 4-KByte and 4-MByte Pages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-25

3.7.4

Memory Aliasing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-25

3.7.5

Base Address of the Page Directory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-25

3.7.6

Page-Directory and Page-Table Entries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-26

3.7.7

Not Present Page-Directory and Page-Table Entries . . . . . . . . . . . . . . . . . . . . . 3-30

3.8

36-BIT PHYSICAL ADDRESSING USING THE PAE PAGING MECHANISM . . . 3-30

3.8.1

Enhanced Legacy PAE Paging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-31

3.8.2

Linear Address Translation With PAE Enabled (4-KByte Pages) . . . . . . . . . . . .3-31

3.8.3

Linear Address Translation With PAE Enabled (2-MByte Pages) . . . . . . . . . . . . 3-32

3.8.4

Accessing the Full Extended Physical Address Space With the
Extended Page-Table Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-33

3.8.5

Page-Directory and Page-Table Entries With Extended Addressing
Enabled . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-34

3.9

36-BIT PHYSICAL ADDRESSING USING THE PSE-36 PAGING
MECHANISM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-37

3.10

PAE-ENABLED PAGING IN IA-32E MODE. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-39

3.10.1

IA-32e Mode Linear Address Translation (4-KByte Pages). . . . . . . . . . . . . . . . . 3-39

3.10.2

IA-32e Mode Linear Address Translation (2-MByte Pages) . . . . . . . . . . . . . . . . 3-40

3.10.3

Enhanced Paging Data Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-41

3.10.3.1

Reserved Bit Checking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-43

3.11

MAPPING SEGMENTS TO PAGES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-45

3.12

TRANSLATION LOOKASIDE BUFFERS (TLBS) . . . . . . . . . . . . . . . . . . . . . . . . . 3-46

Advertising