Intel 253668-032US User Manual

Page of 806
5-16   Vol. 3
PROTECTION
The RPL of the segment selector of the destination code segment.
The conforming (C) flag in the segment descriptor for the destination code 
segment, which determines whether the segment is a conforming (C flag is set) 
or nonconforming (C flag is clear) code segment. See Section 3.4.5.1, “Code- 
and Data-Segment Descriptor Types,”
 for more information about this flag.
The rules that the processor uses to check the CPL, RPL, and DPL depends on the 
setting of the C flag, as described in the following sections.
5.8.1.1  
Accessing Nonconforming Code Segments
When accessing nonconforming code segments, the CPL of the calling procedure 
must be equal to the DPL of the destination code segment; otherwise, the processor 
generates a general-protection exception (#GP). For example in Figure 5-7:
Code segment C is a nonconforming code segment. A procedure in code segment 
A can call a procedure in code segment C (using segment selector C1) because 
they are at the same privilege level (CPL of code segment A is equal to the DPL of 
code segment C). 
A procedure in code segment B cannot call a procedure in code segment C (using 
segment selector C2 or C1) because the two code segments are at different 
privilege levels.