diff options
author | rsc <rsc> | 2007-08-08 09:10:16 +0000 |
---|---|---|
committer | rsc <rsc> | 2007-08-08 09:10:16 +0000 |
commit | 5d0fe3445bbe19b85c32ed066b134d7e6ad8cc9d (patch) | |
tree | 775f34135f9f0e4d10187100ce2c405f24b45fdc | |
parent | 5f0c20ec14dc1c97519e0843d715fd91b430e77c (diff) | |
download | xv6-labs-5d0fe3445bbe19b85c32ed066b134d7e6ad8cc9d.tar.gz xv6-labs-5d0fe3445bbe19b85c32ed066b134d7e6ad8cc9d.tar.bz2 xv6-labs-5d0fe3445bbe19b85c32ed066b134d7e6ad8cc9d.zip |
more bugs
-rw-r--r-- | BUGS | 7 | ||||
-rw-r--r-- | main.c | 6 |
2 files changed, 3 insertions, 10 deletions
@@ -4,13 +4,6 @@ index: mmu.h: funny \ alignment in mmu.h -main.c: - should use static int bcpu to avoid having live - stack variable across the asm volatile that - changes %esp and %ebp. - - cpus[0] -> cpus[bcpu] - proc.c: as a consequence of the implementation of proc_kill, any loop calling sleep should check for p->killed @@ -23,7 +23,7 @@ void main0(void) { int i; - int bcpu; + static int bcpu; // cannot be on stack struct proc *p; // clear BSS @@ -37,8 +37,8 @@ main0(void) bcpu = mp_bcpu(); // 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)); + asm volatile("movl %0, %%esp" : : "r" (cpus[bcpu].mpstack + MPSTACK - 32)); + asm volatile("movl %0, %%ebp" : : "r" (cpus[bcpu].mpstack + MPSTACK)); lapic_init(bcpu); |