Changeset View
Changeset View
Standalone View
Standalone View
sys/arm64/arm64/vm_machdep.c
Show First 20 Lines • Show All 108 Lines • ▼ Show 20 Lines | #endif | ||||
td2->td_pcb->pcb_x[9] = (uintptr_t)td2; | td2->td_pcb->pcb_x[9] = (uintptr_t)td2; | ||||
td2->td_pcb->pcb_lr = (uintptr_t)fork_trampoline; | td2->td_pcb->pcb_lr = (uintptr_t)fork_trampoline; | ||||
td2->td_pcb->pcb_sp = (uintptr_t)td2->td_frame; | td2->td_pcb->pcb_sp = (uintptr_t)td2->td_frame; | ||||
td2->td_pcb->pcb_fpusaved = &td2->td_pcb->pcb_fpustate; | td2->td_pcb->pcb_fpusaved = &td2->td_pcb->pcb_fpustate; | ||||
td2->td_pcb->pcb_vfpcpu = UINT_MAX; | td2->td_pcb->pcb_vfpcpu = UINT_MAX; | ||||
/* Setup to release spin count in fork_exit(). */ | /* Setup to release spin count in fork_exit(). */ | ||||
td2->td_md.md_spinlock_count = 1; | td2->td_md.md_spinlock_count = 1; | ||||
td2->td_md.md_saved_daif = td1->td_md.md_saved_daif & ~DAIF_I_MASKED; | td2->td_md.md_saved_daif = PSR_DAIF_DEFAULT; | ||||
} | } | ||||
void | void | ||||
cpu_reset(void) | cpu_reset(void) | ||||
{ | { | ||||
psci_reset(); | psci_reset(); | ||||
▲ Show 20 Lines • Show All 57 Lines • ▼ Show 20 Lines | cpu_copy_thread(struct thread *td, struct thread *td0) | ||||
td->td_pcb->pcb_lr = (uintptr_t)fork_trampoline; | td->td_pcb->pcb_lr = (uintptr_t)fork_trampoline; | ||||
td->td_pcb->pcb_sp = (uintptr_t)td->td_frame; | td->td_pcb->pcb_sp = (uintptr_t)td->td_frame; | ||||
td->td_pcb->pcb_fpflags &= ~(PCB_FP_STARTED | PCB_FP_KERN | PCB_FP_NOSAVE); | td->td_pcb->pcb_fpflags &= ~(PCB_FP_STARTED | PCB_FP_KERN | PCB_FP_NOSAVE); | ||||
td->td_pcb->pcb_fpusaved = &td->td_pcb->pcb_fpustate; | td->td_pcb->pcb_fpusaved = &td->td_pcb->pcb_fpustate; | ||||
td->td_pcb->pcb_vfpcpu = UINT_MAX; | td->td_pcb->pcb_vfpcpu = UINT_MAX; | ||||
/* Setup to release spin count in fork_exit(). */ | /* Setup to release spin count in fork_exit(). */ | ||||
td->td_md.md_spinlock_count = 1; | td->td_md.md_spinlock_count = 1; | ||||
td->td_md.md_saved_daif = td0->td_md.md_saved_daif & ~DAIF_I_MASKED; | td->td_md.md_saved_daif = PSR_DAIF_DEFAULT; | ||||
/* Generate new pointer authentication keys. */ | /* Generate new pointer authentication keys. */ | ||||
ptrauth_copy_thread(td, td0); | ptrauth_copy_thread(td, td0); | ||||
} | } | ||||
/* | /* | ||||
* Set that machine state for performing an upcall that starts | * Set that machine state for performing an upcall that starts | ||||
* the entry function with the given argument. | * the entry function with the given argument. | ||||
▲ Show 20 Lines • Show All 109 Lines • Show Last 20 Lines |