Specifications

Intel
®
Quark SoC X1000 Core
October 2013 Developer’s Manual
Order Number: 329679-001US 85
Protected Mode Architecture—Intel
®
Quark Core
The IOPL also affects whether the IF (interrupts enable flag) bit can be changed by
loading a value into the EFLAGS register. When CPL IOPL, the IF bit can be changed
by loading a new value into the EFLAGS register. When CPL > IOPL, the IF bit cannot be
changed by a new value POPed into (or otherwise loaded into) the EFLAGS register; the
IF bit remains unchanged and no exception is generated.
6.3.3.4 Privilege Validation
The Intel
®
Quark SoC X1000 Core provides several instructions to speed pointer
testing and help maintain system integrity by verifying that the selector value refers to
an appropriate segment. Table 27 summarizes the selector validation procedures
available for the Intel
®
Quark SoC X1000 Core.
This pointer verification prevents this common problem: An application at PL = 3 calls
an operating systems routine at PL = 0, and then passes the operating system routine
a “bad” pointer that corrupts a data structure belonging to the operating system. This
problem can be avoided if the operating system routine uses the ARPL instruction to
ensure that the RPL of the selector has no greater privilege than that of the caller.
6.3.3.5 Descriptor Access
There are two types of segment accesses: those involving code segments such as
control transfers, and those involving data accesses. Determining the ability of a task
to access a segment requires determining the type of segment to be accessed, the
instruction used, the type of descriptor used, and CPL, RPL, and DPL, as described
above.
Figure 37. Sample I/O Permission Bit Map
I/O Ports Accessible: 2-9, 12, 13, 15, 20-24, 27, 33, 34, 40, 41, 48, 50, 52, 53, 58-60, 62, 63, 96-127
Table 27. Pointer Test Instructions
Instruction Operands Function
ARPL Selector, Register
Adjust Requested Privilege Level: adjusts the RPL of the selector to
the numeric maximum of current selector RPL value and the RPL value
in the register. Set zero flag if selector RPL was changed.
VERR Selector
VERify for Read: sets the zero flag if the segment referred to by the
selector can be read.
VERW Selector
VERify for Write: sets the zero flag if the segment referred to by the
selector can be written.
LSL Register, Selector
Load Segment Limit: reads the segment limit into the register if
privilege rules and descriptor type allow. Set zero flag if successful.
LAR Register, Selector
Load Access Rights: reads the descriptor access rights byte into the
register if privilege rules allow. Set zero flag if successful.