summaryrefslogtreecommitdiffstats
path: root/sys/powerpc
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/powerpc
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/powerpc')
-rw-r--r--sys/powerpc/aim/machdep.c4
-rw-r--r--sys/powerpc/booke/machdep.c4
2 files changed, 4 insertions, 4 deletions
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;
}
OpenPOWER on IntegriCloud