Fix user apps randomly crashing (APIC, GDT layout, syscall entry)
All checks were successful
Build documentation / build-and-deploy (push) Successful in 23s

This commit is contained in:
2026-01-14 19:51:18 +01:00
parent 0d8f9e565f
commit d1d772cb42
23 changed files with 276 additions and 204 deletions

View File

@@ -12,19 +12,19 @@
#include <syscall/syscall.h>
#define DEFINE_SYSCALL(name) \
int name (struct proc* proc, uintptr_t UNUSED a1, uintptr_t UNUSED a2, uintptr_t UNUSED a3, \
uintptr_t UNUSED a4, uintptr_t UNUSED a5, uintptr_t UNUSED a6)
int name (struct proc* proc, void* UNUSED regs, uintptr_t UNUSED a1, uintptr_t UNUSED a2, \
uintptr_t UNUSED a3, uintptr_t UNUSED a4, uintptr_t UNUSED a5, uintptr_t UNUSED a6)
/* int proc_quit (void) */
DEFINE_SYSCALL (sys_proc_quit) {
proc_kill (proc);
proc_sched ();
proc_kill (proc, regs);
return SR_OK;
}
/* int proc_test (void) */
DEFINE_SYSCALL (sys_proc_test) {
DEBUG ("test syscall message!\n");
char c = (char)a1;
DEBUG ("test syscall! %c\n", c);
return SR_OK;
}