From: kaashoek Date: Fri, 8 Sep 2006 14:48:07 +0000 (+0000) Subject: use bootstrap processor as specified by MP table. typically 0, but not X-Git-Url: https://git.devinivas.org/?a=commitdiff_plain;h=5cb7877e0f1dd09a513859f018d3981a9c9d17ad;p=cs3210-lab1.git use bootstrap processor as specified by MP table. typically 0, but not guaranteed. --- diff --git a/main.c b/main.c index cd893d5..5781322 100644 --- a/main.c +++ b/main.c @@ -23,22 +23,24 @@ void main0(void) { int i; + int bcpu; struct proc *p; // clear BSS memset(edata, 0, end - edata); - // switch to bootstrap processor's stack - asm volatile("movl %0, %%esp" : : "r" (cpus[0].mpstack + MPSTACK - 32)); - asm volatile("movl %0, %%ebp" : : "r" (cpus[0].mpstack + MPSTACK)); - // Prevent release() from enabling interrupts. for(i=0; i