diff options
| author | Ian Moffett <ian@osmora.org> | 2025-11-19 22:55:11 -0500 |
|---|---|---|
| committer | Ian Moffett <ian@osmora.org> | 2025-11-19 22:55:11 -0500 |
| commit | 76974be4fe63929ca58e485a05bfa5279881f745 (patch) | |
| tree | 4a9d50d624c7768f0d4b2a5ef0f2150d39b6bc9b | |
| parent | a7e738f1c7d7a0eb183bc25db2e1a573706bb565 (diff) | |
kern/amd64: proc: Put stack on higher half if kernel
Signed-off-by: Ian Moffett <ian@osmora.org>
| -rw-r--r-- | sys/arch/amd64/os/os_process.c | 3 |
1 files changed, 3 insertions, 0 deletions
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; } |
