Add an explicit end of call stack for x86_64
This commit is contained in:
parent
920ec7f521
commit
aeaf103166
|
|
@ -31,6 +31,8 @@ first_context_switch: # (nxt: *const TaskContext)
|
|||
mov r13, [rdi + 32]
|
||||
mov r14, [rdi + 40]
|
||||
mov r15, [rdi + 48]
|
||||
mov rax, [rdi + 56] # restore return address
|
||||
mov [rsp], rax # for stack balance, must use mov instead of push
|
||||
mov rax, [rdi + 56]
|
||||
# for stack balance, we have to use mov instead of push here
|
||||
mov qword ptr [rsp + 8], 0 # kernel_task_entry's return address
|
||||
mov [rsp], rax # first_context_switch's return address
|
||||
ret
|
||||
|
|
|
|||
Loading…
Reference in New Issue