summaryrefslogtreecommitdiffstats
path: root/sys/sparc64/sparc64/machdep.c
diff options
context:
space:
mode:
authornwhitehorn <nwhitehorn@FreeBSD.org>2010-03-25 14:24:00 +0000
committernwhitehorn <nwhitehorn@FreeBSD.org>2010-03-25 14:24:00 +0000
commitd63c82a6ac162cf5ffe6c7e960eadbfd6cfeff71 (patch)
tree1b94b19913504191437503d3847784285efcec5f /sys/sparc64/sparc64/machdep.c
parentb60f1f5349665e80134bc9f0afab88b52539ab40 (diff)
downloadFreeBSD-src-d63c82a6ac162cf5ffe6c7e960eadbfd6cfeff71.zip
FreeBSD-src-d63c82a6ac162cf5ffe6c7e960eadbfd6cfeff71.tar.gz
Change the arguments of exec_setregs() so that it receives a pointer
to the image_params struct instead of several members of that struct individually. This makes it easier to expand its arguments in the future without touching all platforms. Reviewed by: jhb
Diffstat (limited to 'sys/sparc64/sparc64/machdep.c')
-rw-r--r--sys/sparc64/sparc64/machdep.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/sparc64/sparc64/machdep.c b/sys/sparc64/sparc64/machdep.c
index 9eab20f..a020fb8 100644
--- a/sys/sparc64/sparc64/machdep.c
+++ b/sys/sparc64/sparc64/machdep.c
@@ -969,7 +969,7 @@ ptrace_clear_single_step(struct thread *td)
}
void
-exec_setregs(struct thread *td, u_long entry, u_long stack, u_long ps_strings)
+exec_setregs(struct thread *td, struct image_params *imgp, u_long stack)
{
struct trapframe *tf;
struct pcb *pcb;
@@ -992,8 +992,8 @@ exec_setregs(struct thread *td, u_long entry, u_long stack, u_long ps_strings)
tf->tf_out[0] = stack;
tf->tf_out[3] = p->p_sysent->sv_psstrings;
tf->tf_out[6] = sp - SPOFF - sizeof(struct frame);
- tf->tf_tnpc = entry + 4;
- tf->tf_tpc = entry;
+ tf->tf_tnpc = imgp->entry_addr + 4;
+ tf->tf_tpc = imgp->entry_addr;
tf->tf_tstate = TSTATE_IE | TSTATE_PEF | TSTATE_MM_TSO;
td->td_retval[0] = tf->tf_out[0];
OpenPOWER on IntegriCloud