Kernel: Rework scheduler/processor stacks.

This commit is contained in:
2024-04-02 12:34:42 +03:00
parent 5050047cef
commit 2106a9e373
7 changed files with 94 additions and 64 deletions

View File

@@ -4,9 +4,12 @@ read_ip:
popq %rax
jmp *%rax
# void start_thread()
# void start_kernel_thread()
.global start_kernel_thread
start_kernel_thread:
call get_start_kernel_thread_sp
movq %rax, %rsp
# STACK LAYOUT
# on_exit arg
# on_exit func
@@ -15,6 +18,7 @@ start_kernel_thread:
movq 8(%rsp), %rdi
movq 0(%rsp), %rsi
sti
call *%rsi
movq 24(%rsp), %rdi