From 76974be4fe63929ca58e485a05bfa5279881f745 Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Wed, 19 Nov 2025 22:55:11 -0500 Subject: kern/amd64: proc: Put stack on higher half if kernel Signed-off-by: Ian Moffett --- sys/arch/amd64/os/os_process.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/arch/amd64/os/os_process.c b/sys/arch/amd64/os/os_process.c index 40b1026..21bdd86 100644 --- a/sys/arch/amd64/os/os_process.c +++ b/sys/arch/amd64/os/os_process.c @@ -95,5 +95,8 @@ mu_process_init(struct process *process, uintptr_t ip, int flags) } tf->rsp = ALIGN_DOWN(STACK_TOP + (PAGESIZE - 1), 16); + if (ISSET(flags, PROC_KERN)) { + tf->rsp += KERN_BASE; + } return 0; } -- cgit v1.2.3