summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAda Christine <adachristine18@gmail.com>2025-02-01 20:49:58 +0000
committerAda Christine <adachristine18@gmail.com>2025-02-01 20:49:58 +0000
commitf76631c47b92b0778b1073bcab55dc1240422f20 (patch)
treeba44c92784705e1e0e0fced1428a17056537f711
parent9792d78c44ebddd128785a00358cbf38ac714d5d (diff)
fake syscall mechanism can return to user mode
-rw-r--r--boot/fake_syscall_entry.S7
-rw-r--r--boot/main.c3
2 files changed, 7 insertions, 3 deletions
diff --git a/boot/fake_syscall_entry.S b/boot/fake_syscall_entry.S
index 8a3f8c8..9daa0d5 100644
--- a/boot/fake_syscall_entry.S
+++ b/boot/fake_syscall_entry.S
@@ -11,6 +11,11 @@ fake_syscall_start:
jmp .L_fake_syscall_return
/*
+ Fake syscall mechanism
+
+ The Kjarna kernel runtime loader/linker is started by the Kjarna boot kernel and supported
+ by a subset of system calls in order to load files and place them in virtual memory.
+
SYSCALL STACK FRAME - FROM LOWER TO HIGHER ADDRESS
0 pad
@@ -53,7 +58,7 @@ fake_syscall_entry:
push %rbp
mov %rsp, %rbp
- add $64, %rsp
+ add $72, %rsp
popfq
mov %rbp, %rsp
pop %rbp
diff --git a/boot/main.c b/boot/main.c
index 12b411c..611c833 100644
--- a/boot/main.c
+++ b/boot/main.c
@@ -69,9 +69,8 @@ typedef int64_t (syscall_delegate)(syscall_delegate_parameters params);
//constexpr int NR_SYSCALLS = 10;
//static syscall_delegate *syscall_handler_delegates[NR_SYSCALLS];
-SYSV_ABI int64_t fake_syscall_handler(uint64_t syscall_index, struct syscall_context *context)
+SYSV_ABI int64_t fake_syscall_handler(struct syscall_context *context)
{
- (void)syscall_index;
(void)context;
return -1;
}