diff options
author | Frans Kaashoek <[email protected]> | 2011-08-12 07:31:52 -0400 |
---|---|---|
committer | Frans Kaashoek <[email protected]> | 2011-08-12 07:31:52 -0400 |
commit | e577a62f0dc5a1b22ac5687204ec720bb4d8a367 (patch) | |
tree | 6789c5ab729c1e50c81bc67c181603b35389c946 /main.c | |
parent | bd71a45046eb13797284216c43353b9b6c92f18c (diff) | |
download | xv6-labs-e577a62f0dc5a1b22ac5687204ec720bb4d8a367.tar.gz xv6-labs-e577a62f0dc5a1b22ac5687204ec720bb4d8a367.tar.bz2 xv6-labs-e577a62f0dc5a1b22ac5687204ec720bb4d8a367.zip |
Some comments
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -82,7 +82,13 @@ bootothers(void) continue; // Tell bootother.S what stack to use, the address of mpboot and pgdir; - stack = boot_alloc(); // We need a stack below 4Mbyte with bootpgdir + // We cannot use kpgdir yet, because the AP processor is running in low + // memory, so we use bootpgdir for the APs too. kalloc can return addresses + // above 4Mbyte (the machine may have much more physical memory than 4Mbyte), which + // aren't mapped by bootpgdir, so we must allocate a stack using boot_alloc(); + // This introduces the constraint that xv6 cannot invoke until after these last boot_alloc + // invocations. + stack = boot_alloc(); *(void**)(code-4) = stack + KSTACKSIZE; *(void**)(code-8) = mpboot; *(int**)(code-12) = (void *) v2p(bootpgdir); |