SYSENTER: Difference between revisions

No change in size ,  10 years ago
m
Fix typos
[unchecked revision][unchecked revision]
m (come on, guys, learn mediawiki at least a tiny bit before editing)
m (Fix typos)
Line 1:
==Introduction==
The SYSENTER/SYSEXIT instructions (and equvialentequivalent SYSCALL/SYSRET on AMD) enable fast entry to the kernel, avoiding interrupt overhead. This is the method used by Windows NT (XP/Vista/7/8) for its API. SYSCALL/SYSRET are covered here as well, but operate slightly differently.
 
==INTEL: SYSENTER/SYSEXIT==
Line 64:
The operation in 64 bit mode is the same, execpt that RIP is loaded from LSTAR, or CSTAR of in IA32-e submode (A.K.A. compatibility mode).
 
==CompatabilityCompatibility across Intel and AMD==
For a 32bit kernel, SYSENTER/SYSEXIT are the only compatible pair. For a 64bit kernel in Long mode only (not Long Compat mode), SYSCALL/SYSRET are the only compatible pair. For Intel 64bit, IA32_EFER.SCE must be set, or SYSCALL will result in a #UD exception. IA32_EFER is an MSR at 0xC0000080, and SCE (SYSCALL Enable) is its 0th bit.
 
Anonymous user