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

@@ -1,6 +1,6 @@
.macro maybe_load_kernel_segments, n
cmpb $0x08, \n(%esp)
je 1f
testb $3, \n(%esp)
jz 1f; jnp 1f
movw $0x10, %ax
movw %ax, %ds
@@ -13,8 +13,8 @@
.endm
.macro maybe_load_userspace_segments, n
cmpb $0x08, \n(%esp)
je 1f
testb $3, \n(%esp)
jz 1f; jnp 1f
movw $(0x20 | 3), %bx
movw %bx, %ds