diff options
author | Ian Moffett <ian@osmora.org> | 2025-06-13 19:05:17 -0400 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2025-06-13 19:13:11 -0400 |
commit | 6d267c90fcf3afad4216d859b1fe24740e0ec6cb (patch) | |
tree | f9e4fc108b8d4b7c9cad36c1b8c04ef8778483e5 /sys/arch | |
parent | 48b7c43ed1bad98200c3bdfed37d2b68ccf531ca (diff) |
kernel/amd64: Return stack top after stack init
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/amd64/amd64/proc_machdep.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/arch/amd64/amd64/proc_machdep.c b/sys/arch/amd64/amd64/proc_machdep.c index 407adb1..aa8847a 100644 --- a/sys/arch/amd64/amd64/proc_machdep.c +++ b/sys/arch/amd64/amd64/proc_machdep.c @@ -40,7 +40,7 @@ #include <vm/map.h> #include <string.h> -void +uintptr_t md_td_stackinit(struct proc *td, void *stack_top, struct exec_prog *prog) { uintptr_t *sp = stack_top; @@ -97,6 +97,7 @@ md_td_stackinit(struct proc *td, void *stack_top, struct exec_prog *prog) STACK_PUSH(sp, argc); tfp = &td->tf; tfp->rsp = (uintptr_t)sp - VM_HIGHER_HALF; + return tfp->rsp; } void |