mirror of
https://github.com/hermitcore/libhermit.git
synced 2025-03-09 00:00:03 +01:00
create valid pseudo interrupt to set cs
This commit is contained in:
parent
e38722c7f4
commit
3b8e6791ee
1 changed files with 6 additions and 4 deletions
|
@ -273,11 +273,13 @@ gdt_flush:
|
|||
mov fs, eax
|
||||
mov gs, eax
|
||||
; create pseudo interrupt to set cs
|
||||
push 0x08
|
||||
push flush2
|
||||
push QWORD 0x10 ; SS
|
||||
push rsp ; RSP
|
||||
add QWORD [rsp], 0x08 ; => value of rsp before the creation of a pseudo interrupt
|
||||
pushfq ; RFLAGS
|
||||
push QWORD 0x08 ; CS
|
||||
push QWORD rollback ; RIP
|
||||
iretq
|
||||
flush2:
|
||||
ret
|
||||
|
||||
; The first 32 interrupt service routines (ISR) entries correspond to exceptions.
|
||||
; Some exceptions will push an error code onto the stack which is specific to
|
||||
|
|
Loading…
Add table
Reference in a new issue