4-10 Vol. 3A
PROTECTION
Nonconforming code segment (without using a call gate) — The DPL indicates the
privilege level that a program or task must be at to access the segment. For example, if
the DPL of a nonconforming code segment is 0, only programs running at a CPL of 0
can access the segment.
Call gate — The DPL indicates the numerically highest privilege level that the
currently executing program or task can be at and still be able to access the call gate.
(This is the same access rule as for a data segment.)
Conforming code segment and nonconforming code segment accessed through a
call gate — The DPL indicates the numerically lowest privilege level that a program
or task can have to be allowed to access the segment. For example, if the DPL of a
conforming code segment is 2, programs running at a CPL of 0 or 1 cannot access the
segment.
TSS — The DPL indicates the numerically highest privilege level that the currently
executing program or task can be at and still be able to access the TSS. (This is the
same access rule as for a data segment.)
Requested privilege level (RPL) — The RPL is an override privilege level that is
assigned to segment selectors. It is stored in bits 0 and 1 of the segment selector. The
processor checks the RPL along with the CPL to determine if access to a segment is
allowed. Even if the program or task requesting access to a segment has sufficient privilege
to access the segment, access is denied if the RPL is not of sufficient privilege level. That
is, if the RPL of a segment selector is numerically greater than the CPL, the RPL overrides
the CPL, and vice versa. The RPL can be used to insure that privileged code does not
access a segment on behalf of an application program unless the program itself has access
privileges for that segment. See Section 4.10.4, “Checking Caller Access Privileges
(ARPL Instruction),” for a detailed description of the purpose and typical use of the RPL.
Privilege levels are checked when the segment selector of a segment descriptor is loaded into a
segment register. The checks used for data access differ from those used for transfers of program
control among code segments; therefore, the two kinds of accesses are considered separately in
the following sections.