Kernel: Use syscall/sysret for syscalls in x86_64

This commit is contained in:
2026-01-09 15:15:46 +02:00
parent 94bd74d0bb
commit a9ceab0415
19 changed files with 178 additions and 149 deletions

View File

@@ -15,9 +15,7 @@ asm_syscall_handler:
andl $-16, %esp
# push arguments
subl $4, %esp
pushl %ebp
addl $24, (%esp)
subl $8, %esp
pushl %edi
pushl %esi
pushl %edx
@@ -65,7 +63,7 @@ sys_fork_trampoline:
call read_ip
testl %eax, %eax
jz .reload_stack
jz .done
movl %esp, %ebx
@@ -81,9 +79,3 @@ sys_fork_trampoline:
popl %ebx
popl %ebp
ret
.reload_stack:
call get_thread_start_sp
movl %eax, %esp
xorl %eax, %eax
jmp .done