From 6d267c90fcf3afad4216d859b1fe24740e0ec6cb Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Fri, 13 Jun 2025 19:05:17 -0400 Subject: kernel/amd64: Return stack top after stack init Signed-off-by: Ian Moffett --- sys/arch/amd64/amd64/proc_machdep.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sys/arch') 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 #include -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 -- cgit v1.2.3