syscall: add basic syscall entry

Signed-off-by: Michael Shaw <m@michaelsshaw.com>
This commit is contained in:
Michael Shaw 2026-07-15 16:36:38 -04:00
commit c01b1d7eee
12 changed files with 154 additions and 15 deletions

View file

@ -4,6 +4,8 @@
#include <kernel/types.h>
#define IA32_GS_BASE 0xC0000101
u64 rdmsr(u32 msr);
void wrmsr(u32 msr, u64 val);

31
amd64/include/arch/proc.h Normal file
View file

@ -0,0 +1,31 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#ifndef _ARCH_PROC_H_
#define _ARCH_PROC_H_
#include <kernel/proc.h>
struct proc;
struct cpu_local {
struct proc *current_proc;
vaddr_t kernel_rsp;
vaddr_t user_rsp;
u32 cpu_id;
} PACKED;
struct pt_regs {
u64 rax;
u64 rbx;
u64 rdx;
u64 rdi;
u64 rsi;
u64 r8;
u64 r9;
u64 r10;
u64 r11;
u64 r12;
u64 r13;
u64 r14;
u64 r15;
} PACKED;
#endif /* _ARCH_PROC_H_ */