Add back x86_32 support #5

Merged
Bananymous merged 46 commits from x86_32 into main 2024-04-03 02:36:29 +03:00
3 changed files with 20 additions and 1 deletions
Showing only changes of commit 45cea14165 - Show all commits

View File

@ -83,7 +83,6 @@ set(KERNEL_SOURCES
kernel/Storage/Partition.cpp
kernel/Storage/StorageDevice.cpp
kernel/Syscall.cpp
kernel/Syscall.S
kernel/Terminal/FramebufferTerminal.cpp
kernel/Terminal/Serial.cpp
kernel/Terminal/TTY.cpp
@ -111,6 +110,7 @@ if("${BANAN_ARCH}" STREQUAL "x86_64")
arch/x86_64/interrupts.S
arch/x86_64/PageTable.cpp
arch/x86_64/Signal.S
arch/x86_64/Syscall.S
arch/x86_64/Thread.S
)
elseif("${BANAN_ARCH}" STREQUAL "i386")
@ -118,6 +118,7 @@ elseif("${BANAN_ARCH}" STREQUAL "i386")
${KERNEL_SOURCES}
arch/i386/boot.S
arch/i386/SpinLock.S
arch/i386/Syscall.S
arch/i386/Thread.S
)
else()

View File

@ -0,0 +1,18 @@
.global sys_fork_trampoline
sys_fork_trampoline:
subl $4, %esp
pushl %ebx
pushl %ebp
call read_rip
testl %eax, %eax
je .done
subl $8, %esp
pushl %eax
pushl %esp
call sys_fork
addl $16, %esp
.done:
popl %ebp
popl %ebx
addl $4, %esp
ret