diff options
author | rsc <rsc> | 2007-09-27 20:32:45 +0000 |
---|---|---|
committer | rsc <rsc> | 2007-09-27 20:32:45 +0000 |
commit | 4f74de0edc243ffdae0233eb5c84d09c44677ccf (patch) | |
tree | a06bec65e5b6ad8db480963ffc6646a176baa8da /main.c | |
parent | ce2e7515552adca3a60e349de2931112736d17bf (diff) | |
download | xv6-labs-4f74de0edc243ffdae0233eb5c84d09c44677ccf.tar.gz xv6-labs-4f74de0edc243ffdae0233eb5c84d09c44677ccf.tar.bz2 xv6-labs-4f74de0edc243ffdae0233eb5c84d09c44677ccf.zip |
okay, that was long enough - revert
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -42,14 +42,12 @@ main(void) userinit(); // first user process // Allocate scheduler stacks and boot the other CPUs. - for(i=0; i<ncpu; i++){ + for(i=0; i<ncpu; i++) cpus[i].stack = kalloc(KSTACKSIZE); - *(void**)(cpus[i].stack + KSTACKTOP) = 0; - } bootothers(); // Switch to our scheduler stack and continue with mpmain. - asm volatile("movl %0, %%esp" : : "r" (cpus[bcpu].stack+KSTACKTOP)); + asm volatile("movl %0, %%esp" : : "r" (cpus[bcpu].stack+KSTACKSIZE)); mpmain(); } @@ -86,7 +84,7 @@ bootothers(void) continue; // Fill in %esp, %eip and start code on cpu. - *(void**)(code-4) = c->stack + KSTACKTOP; + *(void**)(code-4) = c->stack + KSTACKSIZE; *(void**)(code-8) = mpmain; lapic_startap(c->apicid, (uint)code); |