SYSENTER: Difference between revisions
Jump to navigation
Jump to search
[unchecked revision] | [unchecked revision] |
Content deleted Content added
m add link to German wiki |
m Explicitly note that SS is still loaded from STAR 63:48 + 8. Thanks AMD |
||
Line 64: | Line 64: | ||
====64 bit mode==== |
====64 bit mode==== |
||
The operation in 64 bit mode is the same, except that RIP is loaded from LSTAR, or CSTAR of in IA32-e submode (A.K.A. compatibility mode). It also respectively saves and loads RFLAGS to and from R11. |
The operation in 64 bit mode is the same, except that RIP is loaded from LSTAR, or CSTAR of in IA32-e submode (A.K.A. compatibility mode). It also respectively saves and loads RFLAGS to and from R11. |
||
As well, in Long Mode, userland CS will be loaded from STAR 63:48 + 16 on SYSRET. Therefore, you might need to setup your GDT accordingly. |
As well, in Long Mode, userland CS will be loaded from STAR 63:48 + 16 and userland SS from STAR 63:48 + 8 on SYSRET. Therefore, you might need to setup your GDT accordingly. |
||
Moreover, SYSRET will return to compatibility mode if the operand size is set to 32 bits, which is, for instance, nasm's default. To explicitly request a return into long mode, set the operand size to 64 bits (e.g. "o64 sysret" with nasm). |
Moreover, SYSRET will return to compatibility mode if the operand size is set to 32 bits, which is, for instance, nasm's default. To explicitly request a return into long mode, set the operand size to 64 bits (e.g. "o64 sysret" with nasm). |
||
Line 77: | Line 77: | ||
[[Category:X86 CPU]] |
[[Category:X86 CPU]] |
||
[[de:Syscall/sysret]] |
[[de:Syscall/sysret]] |
||
==See also== |
|||
===External Links=== |
|||
*https://cdrdv2.intel.com/v1/dl/getContent/671200 Page 1882 for SYSRET |