diff options
author | Frans Kaashoek <[email protected]> | 2011-09-01 10:25:20 -0400 |
---|---|---|
committer | Frans Kaashoek <[email protected]> | 2011-09-01 10:25:20 -0400 |
commit | e25b74ca8069e340c3f2c267d09beed6d9328250 (patch) | |
tree | 81489f3133ad678a0ccd9ff4e0afcffd84cc6173 /main.c | |
parent | 15997d58497f4c716c227787acf9591439e5fe9c (diff) | |
download | xv6-labs-e25b74ca8069e340c3f2c267d09beed6d9328250.tar.gz xv6-labs-e25b74ca8069e340c3f2c267d09beed6d9328250.tar.bz2 xv6-labs-e25b74ca8069e340c3f2c267d09beed6d9328250.zip |
Fix layout issues for printed version
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 17 |
1 files changed, 9 insertions, 8 deletions
@@ -33,7 +33,7 @@ main(void) ideinit(); // disk if(!ismp) timerinit(); // uniprocessor timer - startothers(); // start other processors (must come before kinit; must use enter_alloc) + startothers(); // start other processors (must come before kinit) kinit(); // initialize memory allocator userinit(); // first user process (must come after kinit) // Finish setting up this processor in mpmain. @@ -81,13 +81,14 @@ startothers(void) if(c == cpus+cpunum()) // We've started already. continue; - // Tell entryother.S what stack to use, the address of mpenter and pgdir; - // We cannot use kpgdir yet, because the AP processor is running in low - // memory, so we use entrypgdir 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 entrypgdir, so we must allocate a stack using enter_alloc(); - // This introduces the constraint that xv6 cannot use kalloc until after these - // last enter_alloc invocations. + // Tell entryother.S what stack to use, where to enter, and what + // pgdir to use. We cannot use kpgdir yet, because the AP processor + // is running in low memory, so we use entrypgdir 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 + // entrypgdir, so we must allocate a stack using enter_alloc(); + // this introduces the constraint that xv6 cannot use kalloc until + // after these last enter_alloc invocations. stack = enter_alloc(); *(void**)(code-4) = stack + KSTACKSIZE; *(void**)(code-8) = mpenter; |