#include "mp.h"
+extern void _stts(void);
+
static void
squidboy(Apic* apic)
{
mmuinit();
cpuidentify();
cpuidprint();
+ syncclock();
+ active.machs[m->machno] = 1;
apic->online = 1;
- coherence();
-
lapicinit(apic);
lapiconline();
- syncclock();
timersinit();
-
- lock(&active);
- active.machs |= 1<<m->machno;
- unlock(&active);
-
- while(!active.thunderbirdsarego)
- microdelay(100);
-
+ _stts();
schedinit();
}
apbootp[1] = (uintptr)PADDR(pml4);
apbootp[2] = (uintptr)apic;
apbootp[3] = (uintptr)mach;
+ apbootp[4] |= (uintptr)m->havenx<<11; /* EFER */
/*
* Universal Startup Algorithm.
nvramwrite(0x0F, 0x0A); /* shutdown code: warm reset upon init ipi */
lapicstartap(apic, PADDR(APBOOTSTRAP));
- for(i = 0; i < 1000; i++){
+ for(i = 0; i < 100000; i++){
+ if(arch->fastclock == tscticks)
+ cycles(&m->tscticks); /* for ap's syncclock(); */
if(apic->online)
break;
- delay(10);
+ delay(1);
}
nvramwrite(0x0F, 0x00);
}