Specifications

Intel
®
Quark Core—Protected Mode Architecture
Intel
®
Quark SoC X1000 Core
Developer’s Manual October 2013
86 Order Number: 329679-001US
Any time an instruction loads data segment registers (DS, ES, FS, GS) the Intel
®
Quark
SoC X1000 Core makes protection validation checks. Selectors loaded in the DS, ES,
FS, GS registers must refer only to data segments or readable code segments. (The
data access rules are specified in Section 6.3.2. The only exception to those rules is
readable conforming code segments, that can be accessed at any privilege level.)
Finally, the privilege validation checks are performed. The CPL is compared to the EPL,
and if the EPL is more privileged than the CPL, an exception 13 (general protection
fault) is generated.
The rules for the stack segment are slightly different than those for data segments.
Instructions that load selectors into the SS must refer to data segment descriptors for
writeable data segments. The DPL and RPL must equal the CPL. All other descriptor
types and privilege level violations cause exception 13. A stack not present fault causes
exception 12. Note that an exception 11 is used for a not-present code or data
segment.
6.3.4 Privilege Level Transfers
Inter-segment control transfers occur when a selector is loaded in the CS register. In a
typical system, most of these transfers are the result of a call or a jump to another
routine. There are five types of control transfers, which are summarized in Table 28.
Many of these transfers result in a privilege level transfer. Changing privilege levels is
done only via control transfers, by using gates, task switches, and interrupt or trap
gates.
Control transfers can only occur if the operation that loaded the selector references the
correct descriptor type. Any violation of these descriptor usage rules causes an
exception 13 (e.g., JMP through a call gate, or IRET from a normal subroutine call).
To provide further system security, all control transfers are also subject to the privilege
rules.
Table 28. Descriptor Types Used for Control Transfer
Control Transfer Types Operation Types
Descriptor
Referenced
Descriptor
Table
Intersegment within the same privilege
level
JMP, CALL, RET, IRET Code Segment GDT/LDT
Intersegment to the same or higher
privilege level
CALL Call Gate GDT/LDT
Interrupt within task may change CPL
Interrupt Instruction,
Exception, External
Interrupt
Trap or Interrupt
Gate
IDT
Intersegment to a lower privilege level
(changes task CPL)
RET, IRET(1) Code Segment GDT/LDT
CALL, JMP
Task State
Segment
GDT
Task Switch
CALL, JMP Task Gate GDT/LDT
IRET(2)
Interrupt Instruction,
Exception, External
Interrupt
Task Gate IDT
Notes:
1. NT (Nested Task bit of flag register) = 0
2. NT (Nested Task bit of flag register) = 1