background image

Vol. 3A 5-3

PROTECTION

Many different styles of protection schemes can be implemented with these fields and flags. When the operating 
system creates a descriptor, it places values in these fields and flags in keeping with the particular protection style 
chosen for an operating system or executive. Application programs do not generally access or modify these fields 
and flags. 
The following sections describe how the processor uses these fields and flags to perform the various categories of 
checks described in the introduction to this chapter.

5.2.1 

Code-Segment Descriptor in 64-bit Mode

Code segments continue to exist in 64-bit mode even though, for address calculations, the segment base is treated 
as zero. Some code-segment (CS) descriptor content (the base address and limit fields) is ignored; the remaining 
fields function normally (except for the readable bit in the type field). 
Code segment descriptors and selectors are needed in IA-32e mode to establish the processor’s operating mode 
and execution privilege-level. The usage is as follows:

Figure 5-1.  Descriptor Fields Used for Protection

Base 23:16

31

24 23 22 21 20 19

16 15

13

14

12 11

8 7

0

P

Base 31:24

G

D
P

L

Type

1

0

4

31

16 15

0

Base Address 15:00

Segment Limit 15:00

0

Base 23:16

A
V

L

Limit

19:16

B

A

W

E

0

Data-Segment Descriptor

31

24 23 22 21 20 19

16 15

13

14

12 11

8 7

0

P

Base 31:24

G

D
P

L

Type

1

0

4

31

16 15

0

Base Address 15:00

Segment Limit 15:00

0

Base 23:16

A
V

L

Limit

19:16

D

A

R

C

1

Code-Segment Descriptor

31

24 23 22 21 20 19

16 15

13

14

12 11

8 7

0

P

Base 31:24

G

D
P

L

Type

0

4

31

16 15

0

Base Address 15:00

Segment Limit 15:00

0

Limit

19:16

System-Segment Descriptor

A

B
C
D
DPL

Accessed

Big
Conforming
Default
Descriptor Privilege Level

Reserved

E
G
R
LIMIT
W
P

Expansion Direction
Granularity
Readable
Segment Limit
Writable
Present

0

AVL Available to Sys. Programmers