diff options
author | nwhitehorn <nwhitehorn@FreeBSD.org> | 2010-03-25 14:24:00 +0000 |
---|---|---|
committer | nwhitehorn <nwhitehorn@FreeBSD.org> | 2010-03-25 14:24:00 +0000 |
commit | d63c82a6ac162cf5ffe6c7e960eadbfd6cfeff71 (patch) | |
tree | 1b94b19913504191437503d3847784285efcec5f /sys/pc98 | |
parent | b60f1f5349665e80134bc9f0afab88b52539ab40 (diff) | |
download | FreeBSD-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/pc98')
-rw-r--r-- | sys/pc98/pc98/machdep.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/sys/pc98/pc98/machdep.c b/sys/pc98/pc98/machdep.c index f178748..f470b5e 100644 --- a/sys/pc98/pc98/machdep.c +++ b/sys/pc98/pc98/machdep.c @@ -1172,11 +1172,7 @@ void (*cpu_idle_hook)(void) = cpu_idle_default; * Reset registers to default values on exec. */ void -exec_setregs(td, entry, stack, ps_strings) - 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 *regs = td->td_frame; struct pcb *pcb = td->td_pcb; @@ -1192,7 +1188,7 @@ exec_setregs(td, entry, stack, ps_strings) mtx_unlock_spin(&dt_lock); bzero((char *)regs, sizeof(struct trapframe)); - regs->tf_eip = entry; + regs->tf_eip = imgp->entry_addr; regs->tf_esp = stack; regs->tf_eflags = PSL_USER | (regs->tf_eflags & PSL_T); regs->tf_ss = _udatasel; @@ -1202,7 +1198,7 @@ exec_setregs(td, entry, stack, ps_strings) regs->tf_cs = _ucodesel; /* PS_STRINGS value for BSD/OS binaries. It is 0 for non-BSD/OS. */ - regs->tf_ebx = ps_strings; + regs->tf_ebx = imgp->ps_strings; /* * Reset the hardware debug registers if they were in use. |