Changeset View
Changeset View
Standalone View
Standalone View
head/sys/powerpc/powerpc/exec_machdep.c
Show First 20 Lines • Show All 533 Lines • ▼ Show 20 Lines | cleanup_power_extras(struct thread *td) | ||||
if (pcb_flags & PCB_CDSCR) | if (pcb_flags & PCB_CDSCR) | ||||
mtspr(SPR_DSCRP, 0); | mtspr(SPR_DSCRP, 0); | ||||
} | } | ||||
/* | /* | ||||
* Set set up registers on exec. | * Set set up registers on exec. | ||||
*/ | */ | ||||
void | void | ||||
exec_setregs(struct thread *td, struct image_params *imgp, u_long stack) | exec_setregs(struct thread *td, struct image_params *imgp, uintptr_t stack) | ||||
{ | { | ||||
struct trapframe *tf; | struct trapframe *tf; | ||||
register_t argc; | register_t argc; | ||||
tf = trapframe(td); | tf = trapframe(td); | ||||
bzero(tf, sizeof *tf); | bzero(tf, sizeof *tf); | ||||
#ifdef __powerpc64__ | #ifdef __powerpc64__ | ||||
tf->fixreg[1] = -roundup(-stack + 48, 16); | tf->fixreg[1] = -roundup(-stack + 48, 16); | ||||
Show All 29 Lines | exec_setregs(struct thread *td, struct image_params *imgp, uintptr_t stack) | ||||
#endif | #endif | ||||
tf->srr1 = psl_userset | PSL_FE_DFLT; | tf->srr1 = psl_userset | PSL_FE_DFLT; | ||||
cleanup_power_extras(td); | cleanup_power_extras(td); | ||||
td->td_pcb->pcb_flags = 0; | td->td_pcb->pcb_flags = 0; | ||||
} | } | ||||
#ifdef COMPAT_FREEBSD32 | #ifdef COMPAT_FREEBSD32 | ||||
void | void | ||||
ppc32_setregs(struct thread *td, struct image_params *imgp, u_long stack) | ppc32_setregs(struct thread *td, struct image_params *imgp, uintptr_t stack) | ||||
{ | { | ||||
struct trapframe *tf; | struct trapframe *tf; | ||||
uint32_t argc; | uint32_t argc; | ||||
tf = trapframe(td); | tf = trapframe(td); | ||||
bzero(tf, sizeof *tf); | bzero(tf, sizeof *tf); | ||||
tf->fixreg[1] = -roundup(-stack + 8, 16); | tf->fixreg[1] = -roundup(-stack + 8, 16); | ||||
▲ Show 20 Lines • Show All 577 Lines • Show Last 20 Lines |