void cpu_start_secondary(struct cpu_info *ci) { struct pcb *pcb; int i; pcb = ci->ci_idle_pcb; ci->ci_flags |= CPUF_AP; CPU_STARTUP(ci); /* * wait for it to become ready */ for (i = 100000; (!(ci->ci_flags & CPUF_PRESENT)) && i>0;i--) { delay(10); } if (! (ci->ci_flags & CPUF_PRESENT)) { printf("%s: failed to become ready\n", ci->ci_dev->dv_xname); #if defined(MPDEBUG) && defined(DDB) printf("dropping into debugger; continue from here to resume boot\n"); Debugger(); #endif } CPU_START_CLEANUP(ci); }
void cpu_boot_secondary(struct cpu_info *ci) { struct pcb *pcb; int i; struct pmap *kpm = pmap_kernel(); if (mp_verbose) printf("%s: starting", ci->ci_dev.dv_xname); /* XXX move elsewhere, not per CPU. */ mp_pdirpa = kpm->pm_pdirpa; pcb = ci->ci_idle_pcb; if (mp_verbose) printf(", init idle stack ptr is 0x%x\n", pcb->pcb_esp); CPU_STARTUP(ci); /* * wait for it to become ready */ for (i = 100000; (!(ci->ci_flags & CPUF_RUNNING)) && i > 0; i--) { delay(10); } if (!(ci->ci_flags & CPUF_RUNNING)) { printf("%s failed to become ready\n", ci->ci_dev.dv_xname); #ifdef DDB Debugger(); #endif } CPU_START_CLEANUP(ci); }
void cpu_start_secondary(struct cpu_info *ci) { int i; ci->ci_flags |= CPUF_AP; CPU_STARTUP(ci); /* * wait for it to become ready */ for (i = 100000; (!(ci->ci_flags & CPUF_PRESENT)) && i>0;i--) { delay(10); } if (! (ci->ci_flags & CPUF_PRESENT)) { printf("%s: failed to become ready\n", ci->ci_dev->dv_xname); #if defined(MPDEBUG) && defined(DDB) printf("dropping into debugger; continue from here to resume boot\n"); Debugger(); #endif } if ((ci->ci_flags & CPUF_IDENTIFIED) == 0) { atomic_setbits_int(&ci->ci_flags, CPUF_IDENTIFY); /* wait for it to identify */ for (i = 100000; (ci->ci_flags & CPUF_IDENTIFY) && i > 0; i--) delay(10); if (ci->ci_flags & CPUF_IDENTIFY) printf("%s: failed to identify\n", ci->ci_dev->dv_xname); } CPU_START_CLEANUP(ci); }