proc: enter into userspace

Signed-off-by: Michael Shaw <m@michaelsshaw.com>
This commit is contained in:
Michael Shaw 2026-07-19 19:25:38 -04:00
commit cd916f624b
12 changed files with 138 additions and 29 deletions

View file

@ -51,7 +51,7 @@ void arch_init()
idt_init();
wrmsr(IA32_STAR, ((u64)GDT_SEGMENT_CODE_RING0 << 48) | ((u64)GDT_SEGMENT_CODE_RING3 << 32));
wrmsr(IA32_LSTAR, (u64)_syscall_enter);
wrmsr(IA32_FMASK, RFLAGS_IF);
wrmsr(IA32_FMASK, 0x3F7FD5);
}
void arch_ap_startup()
@ -60,6 +60,4 @@ void arch_ap_startup()
struct cpu_local *this_local = &cpu_local_arr[id];
wrmsr(IA32_GS_BASE, (u64)this_local);
yield();
}