First Hello world syscall
All checks were successful
Build documentation / build-and-deploy (push) Successful in 26s

This commit is contained in:
2026-01-03 02:04:09 +01:00
parent 1341dc00d9
commit e52268cd8e
26 changed files with 228 additions and 140 deletions

View File

@@ -1,4 +1,14 @@
#include <amd64/msr-index.h>
#include <amd64/msr.h>
#include <amd64/sched.h>
#include <libk/std.h>
#include <proc/proc.h>
#include <sys/mm.h>
#include <sys/smp.h>
void do_sched (void* regs, struct pd* pd) { amd64_do_sched (regs, (void*)pd->cr3_paddr); }
void do_sched (struct proc* proc) {
thiscpu->tss.rsp0 = proc->pdata.kernel_stack;
thiscpu->syscall_kernel_stack = proc->pdata.kernel_stack;
amd64_wrmsr (MSR_GS_BASE, proc->pdata.gs_base);
amd64_do_sched ((void*)&proc->pdata.regs, (void*)proc->pd.cr3_paddr);
}