Intel 64 and IA-32 Architectures Software Developers Manual Volume 2B, Instruction Set Reference, N-Z

Vol. 2B 4-365
INSTRUCTION SET REFERENCE, N-Z
IA-32e Mode Operation
In IA-32e mode, SYSENTER executes a fast system calls from user code running at
privilege level 3 (in compatibility mode or 64-bit mode) to 64-bit executive proce-
dures running at privilege level 0. This instruction is a companion instruction to the
SYSEXIT instruction.
In IA-32e mode, the IA32_SYSENTER_EIP and IA32_SYSENTER_ESP MSRs hold
64-bit addresses and must be in canonical form; IA32_SYSENTER_CS must not
contain a NULL selector.
When SYSENTER transfers control, the following fields are generated and bits set:
Target code segment — Reads non-NULL selector from IA32_SYSENTER_CS.
New CS attributes — L-bit = 1 (go to 64-bit mode); CS base = 0, CS limit =
FFFFFFFFH.
Target instruction — Reads 64-bit canonical address from
IA32_SYSENTER_EIP.
Stack segment — Computed by adding 8 to the value from
IA32_SYSENTER_CS.
Stack pointer — Reads 64-bit canonical address from IA32_SYSENTER_ESP.
New SS attributes — SS base = 0, SS limit = FFFFFFFFH.
Flags Affected
VM, IF, RF (see Operation above)
Protected Mode Exceptions
#GP(0) If IA32_SYSENTER_CS[15:2] = 0.
Real-Address Mode Exceptions
#GP(0) If protected mode is not enabled.
Virtual-8086 Mode Exceptions
Same exceptions as in Protected Mode.
Compatibility Mode Exceptions
Same exceptions as in Protected Mode.
64-Bit Mode Exceptions
Same exceptions as in Protected Mode.