From a9d632eedef359afbbc2da3338bd3f9c3d2ede0b Mon Sep 17 00:00:00 2001 From: jake Date: Sun, 31 Aug 2003 22:58:56 +0000 Subject: [PATCH] Implement cpu_set_upcall_kse. May need tweaking. --- sys/sparc64/sparc64/vm_machdep.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/sys/sparc64/sparc64/vm_machdep.c b/sys/sparc64/sparc64/vm_machdep.c index 2abca7aa3d88..2672be0ceda0 100644 --- a/sys/sparc64/sparc64/vm_machdep.c +++ b/sys/sparc64/sparc64/vm_machdep.c @@ -195,6 +195,18 @@ cpu_set_upcall(struct thread *td, struct thread *td0) void cpu_set_upcall_kse(struct thread *td, struct kse_upcall *ku) { + struct trapframe *tf; + uint64_t sp; + + tf = td->td_frame; + sp = (uint64_t)ku->ku_stack.ss_sp + ku->ku_stack.ss_size; + tf->tf_out[0] = (uint64_t)ku->ku_mailbox; + tf->tf_out[6] = sp - SPOFF - sizeof(struct frame); + tf->tf_tpc = (uint64_t)ku->ku_func; + tf->tf_tnpc = tf->tf_tpc + 4; + + td->td_retval[0] = tf->tf_out[0]; + td->td_retval[1] = tf->tf_out[1]; } /*