summaryrefslogtreecommitdiff
path: root/sys/arch/amd64
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2025-06-13 19:05:17 -0400
committerIan Moffett <ian@osmora.org>2025-06-13 19:13:11 -0400
commit6d267c90fcf3afad4216d859b1fe24740e0ec6cb (patch)
treef9e4fc108b8d4b7c9cad36c1b8c04ef8778483e5 /sys/arch/amd64
parent48b7c43ed1bad98200c3bdfed37d2b68ccf531ca (diff)
kernel/amd64: Return stack top after stack init
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys/arch/amd64')
-rw-r--r--sys/arch/amd64/amd64/proc_machdep.c3
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