port esp0-patch to x86_64
This commit is contained in:
parent
3c1b270160
commit
1c4c51ae50
1 changed files with 8 additions and 2 deletions
|
@ -1146,8 +1146,14 @@ common_switch:
|
||||||
xor rax, rax
|
xor rax, rax
|
||||||
%endif
|
%endif
|
||||||
add rax, task_state_segments
|
add rax, task_state_segments
|
||||||
; set rsp0 in TSS
|
|
||||||
mov [rax+4], rsp
|
; determine and set esp0 in TSS
|
||||||
|
mov rbx, rsp
|
||||||
|
mov rcx, KERNEL_STACK_SIZE-1
|
||||||
|
not rcx
|
||||||
|
and rbx, rcx
|
||||||
|
add rbx, KERNEL_STACK_SIZE-16
|
||||||
|
mov [rax+4], rbx
|
||||||
|
|
||||||
; call cleanup code
|
; call cleanup code
|
||||||
call finish_task_switch
|
call finish_task_switch
|
||||||
|
|
Loading…
Add table
Reference in a new issue