From d63c82a6ac162cf5ffe6c7e960eadbfd6cfeff71 Mon Sep 17 00:00:00 2001 From: nwhitehorn Date: Thu, 25 Mar 2010 14:24:00 +0000 Subject: 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 --- sys/powerpc/aim/machdep.c | 4 ++-- sys/powerpc/booke/machdep.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'sys/powerpc') diff --git a/sys/powerpc/aim/machdep.c b/sys/powerpc/aim/machdep.c index a9cf051..49aae27 100644 --- a/sys/powerpc/aim/machdep.c +++ b/sys/powerpc/aim/machdep.c @@ -951,7 +951,7 @@ cpu_idle_wakeup(int cpu) * Set set up registers on exec. */ 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 ps_strings arginfo; @@ -995,7 +995,7 @@ exec_setregs(struct thread *td, u_long entry, u_long stack, u_long ps_strings) tf->fixreg[7] = 0; /* termination vector */ tf->fixreg[8] = (register_t)PS_STRINGS; /* NetBSD extension */ - tf->srr0 = entry; + tf->srr0 = imgp->entry_addr; tf->srr1 = PSL_MBO | PSL_USERSET | PSL_FE_DFLT; td->td_pcb->pcb_flags = 0; } diff --git a/sys/powerpc/booke/machdep.c b/sys/powerpc/booke/machdep.c index e9a0099..8a53b73 100644 --- a/sys/powerpc/booke/machdep.c +++ b/sys/powerpc/booke/machdep.c @@ -509,7 +509,7 @@ cpu_pcpu_init(struct pcpu *pcpu, int cpuid, size_t sz) /* Set set up registers on exec. */ 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 ps_strings arginfo; @@ -553,7 +553,7 @@ exec_setregs(struct thread *td, u_long entry, u_long stack, u_long ps_strings) tf->fixreg[7] = 0; /* termination vector */ tf->fixreg[8] = (register_t)PS_STRINGS; /* NetBSD extension */ - tf->srr0 = entry; + tf->srr0 = imgp->entry_addr; tf->srr1 = PSL_USERSET; td->td_pcb->pcb_flags = 0; } -- cgit v1.1