Changeset View
Changeset View
Standalone View
Standalone View
head/sys/arm64/arm64/mp_machdep.c
Show First 20 Lines • Show All 223 Lines • ▼ Show 20 Lines | init_secondary(uint64_t cpu) | ||||
while (!aps_ready) | while (!aps_ready) | ||||
__asm __volatile("wfe"); | __asm __volatile("wfe"); | ||||
/* Initialize curthread */ | /* Initialize curthread */ | ||||
KASSERT(PCPU_GET(idlethread) != NULL, ("no idle thread")); | KASSERT(PCPU_GET(idlethread) != NULL, ("no idle thread")); | ||||
pcpup->pc_curthread = pcpup->pc_idlethread; | pcpup->pc_curthread = pcpup->pc_idlethread; | ||||
pcpup->pc_curpcb = pcpup->pc_idlethread->td_pcb; | pcpup->pc_curpcb = pcpup->pc_idlethread->td_pcb; | ||||
/* | |||||
* Identify current CPU. This is necessary to setup | |||||
* affinity registers and to provide support for | |||||
* runtime chip identification. | |||||
*/ | |||||
identify_cpu(); | |||||
/* Configure the interrupt controller */ | /* Configure the interrupt controller */ | ||||
arm_init_secondary(); | arm_init_secondary(); | ||||
for (i = 0; i < COUNT_IPI; i++) | for (i = 0; i < COUNT_IPI; i++) | ||||
arm_unmask_ipi(i); | arm_unmask_ipi(i); | ||||
/* Start per-CPU event timers. */ | /* Start per-CPU event timers. */ | ||||
cpu_initclocks_ap(); | cpu_initclocks_ap(); | ||||
▲ Show 20 Lines • Show All 194 Lines • Show Last 20 Lines |