diff options
| -rw-r--r-- | sys/src/9/pc/devarch.c | 1 | ||||
| -rw-r--r-- | sys/src/9/pc/mp.c | 15 | ||||
| -rw-r--r-- | sys/src/9/pc/squidboy.c | 2 | ||||
| -rw-r--r-- | sys/src/9/pc64/mem.h | 2 | ||||
| -rw-r--r-- | sys/src/9/pc64/squidboy.c | 3 |
5 files changed, 16 insertions, 7 deletions
diff --git a/sys/src/9/pc/devarch.c b/sys/src/9/pc/devarch.c index d3ead0cac..f3be061cb 100644 --- a/sys/src/9/pc/devarch.c +++ b/sys/src/9/pc/devarch.c @@ -783,7 +783,6 @@ cpuidentify(void) wrmsr(0x10, 0); } - /* * use i8253 to guess our cpu speed */ diff --git a/sys/src/9/pc/mp.c b/sys/src/9/pc/mp.c index e937c9391..ba341c5ca 100644 --- a/sys/src/9/pc/mp.c +++ b/sys/src/9/pc/mp.c @@ -196,9 +196,7 @@ mpinit(void) ncpu = MAXMACH; memmove((void*)APBOOTSTRAP, apbootstrap, sizeof(apbootstrap)); for(i=0; i<nelem(mpapic); i++){ - if((apic = mpapic[i]) == nil) - continue; - if(apic->machno >= MAXMACH) + if((apic = mpapic[i]) == nil || apic->machno == 0 || apic->machno >= MAXMACH) continue; if(ncpu <= 1) break; @@ -206,6 +204,17 @@ mpinit(void) mpstartap(apic); conf.nmach++; ncpu--; + + if(!apic->online){ + print("LAPIC%d: cpu%d did not startup\n", i, apic->machno); + continue; + } + + /* update tscticks for ap's syncclock() */ + while(!active.machs[apic->machno]){ + if(arch->fastclock == tscticks) + cycles(&m->tscticks); + } } } diff --git a/sys/src/9/pc/squidboy.c b/sys/src/9/pc/squidboy.c index 85c3992d1..5b10ea211 100644 --- a/sys/src/9/pc/squidboy.c +++ b/sys/src/9/pc/squidboy.c @@ -34,7 +34,7 @@ squidboy(Apic* apic) unlock(&active); while(!active.thunderbirdsarego) - microdelay(100); + idlehands(); schedinit(); } diff --git a/sys/src/9/pc64/mem.h b/sys/src/9/pc64/mem.h index fa0a03a10..e7d815e7d 100644 --- a/sys/src/9/pc64/mem.h +++ b/sys/src/9/pc64/mem.h @@ -28,7 +28,7 @@ #define BLOCKALIGN 8 #define FPalign 16 -#define MAXMACH 64 /* max # cpus system can run */ +#define MAXMACH 128 /* max # cpus system can run */ #define KSTACK (16*KiB) /* Size of Proc kernel stack */ diff --git a/sys/src/9/pc64/squidboy.c b/sys/src/9/pc64/squidboy.c index 218f4971a..2646626b7 100644 --- a/sys/src/9/pc64/squidboy.c +++ b/sys/src/9/pc64/squidboy.c @@ -15,6 +15,7 @@ squidboy(Apic* apic) mmuinit(); cpuidentify(); cpuidprint(); + apic->online = 1; coherence(); @@ -28,7 +29,7 @@ squidboy(Apic* apic) unlock(&active); while(!active.thunderbirdsarego) - microdelay(100); + idlehands(); schedinit(); } |
