How are the model specific registers used in the system call mechanism?
To perform syscall
the CPU:
- Loads cs from
STAR
; - Changes
rflags
with regards toSFMASK
; - Saves
rip
intorcx
; and - Initializes rip with
LSTAR
value and takes newcs
andss
fromSTAR
.