Kernel: Fix 32 bit target

Rewrite some assembly and add some required casts
This commit is contained in:
2025-11-11 05:08:22 +02:00
parent 46f9a9053f
commit 09175d1799
7 changed files with 61 additions and 59 deletions

View File

@@ -31,8 +31,6 @@ start_kernel_thread:
subl $12, %esp
pushl %edi
call *%esi
addl $16, %esp
.global start_userspace_thread
start_userspace_thread:
@@ -41,14 +39,11 @@ start_userspace_thread:
call get_thread_start_sp
movl %eax, %esp
# ds, es = user data
movw $(0x20 | 3), %bx
movw %bx, %ds
movw %bx, %es
# fs
movw $(0x30 | 3), %bx
movw %bx, %fs
# gs
movw $(0x38 | 3), %bx
movw %bx, %gs