diff options
author | rsc <rsc> | 2007-08-24 19:36:52 +0000 |
---|---|---|
committer | rsc <rsc> | 2007-08-24 19:36:52 +0000 |
commit | 124f32ae38260ff32ddd176d37ebb98d19675178 (patch) | |
tree | 2a510acfc685d4c6cef761bbf14a407d8e6cbd11 | |
parent | 902b13f5d6bab19f7a218acc655421cdb63f4313 (diff) | |
download | xv6-labs-124f32ae38260ff32ddd176d37ebb98d19675178.tar.gz xv6-labs-124f32ae38260ff32ddd176d37ebb98d19675178.tar.bz2 xv6-labs-124f32ae38260ff32ddd176d37ebb98d19675178.zip |
tweak
-rw-r--r-- | main.c | 10 |
1 files changed, 3 insertions, 7 deletions
@@ -20,7 +20,7 @@ void main0(void) { int i; - static int bcpu; // cannot be on stack + static volatile int bcpu; // cannot be on stack // clear BSS memset(edata, 0, end - edata); @@ -32,7 +32,7 @@ main0(void) mp_init(); // collect info about this machine bcpu = mp_bcpu(); - // switch to bootstrap processor's stack + // Switch to bootstrap processor's stack asm volatile("movl %0, %%esp" : : "r" (cpus[bcpu].mpstack+MPSTACK-32)); asm volatile("movl %0, %%ebp" : : "r" (cpus[bcpu].mpstack+MPSTACK)); @@ -72,14 +72,10 @@ void mpmain(void) { cprintf("cpu%d: starting\n", cpu()); - idtinit(); // CPU's idt - if(cpu() == 0) - panic("mpmain on cpu 0"); + idtinit(); lapic_init(cpu()); lapic_timerinit(); lapic_enableintr(); - - // make sure there's a TSS setupsegs(0); cpuid(0, 0, 0, 0, 0); // memory barrier |