Changeset View
Changeset View
Standalone View
Standalone View
sys/arm64/arm64/machdep.c
Show First 20 Lines • Show All 555 Lines • ▼ Show 20 Lines | exec_setregs(struct thread *td, struct image_params *imgp, uintptr_t stack) | ||||
memset(tf, 0, sizeof(struct trapframe)); | memset(tf, 0, sizeof(struct trapframe)); | ||||
tf->tf_x[0] = stack; | tf->tf_x[0] = stack; | ||||
tf->tf_sp = STACKALIGN(stack); | tf->tf_sp = STACKALIGN(stack); | ||||
tf->tf_lr = imgp->entry_addr; | tf->tf_lr = imgp->entry_addr; | ||||
tf->tf_elr = imgp->entry_addr; | tf->tf_elr = imgp->entry_addr; | ||||
td->td_pcb->pcb_tpidr_el0 = 0; | |||||
td->td_pcb->pcb_tpidrro_el0 = 0; | |||||
WRITE_SPECIALREG(tpidrro_el0, 0); | |||||
WRITE_SPECIALREG(tpidr_el0, 0); | |||||
andrew: Does `td == curthread` always hold here? | |||||
Done Inline ActionsYes. jhb: Yes. | |||||
#ifdef VFP | #ifdef VFP | ||||
vfp_reset_state(td, pcb); | vfp_reset_state(td, pcb); | ||||
#endif | #endif | ||||
/* TODO: Shouldn't we also reset pcb_dbg_regs? */ | /* TODO: Shouldn't we also reset pcb_dbg_regs? */ | ||||
} | } | ||||
/* Sanity check these are the same size, they will be memcpy'd to and fro */ | /* Sanity check these are the same size, they will be memcpy'd to and fro */ | ||||
▲ Show 20 Lines • Show All 897 Lines • Show Last 20 Lines |
Does td == curthread always hold here?