]> Devi Nivas Git - cs3210-lab0.git/commitdiff
main comments
authorRobert Morris <rtm@csail.mit.edu>
Thu, 11 Aug 2016 17:55:13 +0000 (13:55 -0400)
committerRobert Morris <rtm@csail.mit.edu>
Thu, 11 Aug 2016 17:55:13 +0000 (13:55 -0400)
main.c

diff --git a/main.c b/main.c
index 732901548ddbfe23e3e768b033f91b4bdba87620..84a7c526cada6b315c6705102334dad0a3f21dd9 100644 (file)
--- a/main.c
+++ b/main.c
@@ -19,13 +19,13 @@ main(void)
 {
   kinit1(end, P2V(4*1024*1024)); // phys page allocator
   kvmalloc();      // kernel page table
-  mpinit();        // collect info about this machine
-  lapicinit();
-  seginit();       // set up segments
+  mpinit();        // detect other processors
+  lapicinit();     // interrupt controller
+  seginit();       // segment descriptors
   cprintf("\ncpu%d: starting xv6\n\n", cpu->id);
-  picinit();       // interrupt controller
+  picinit();       // another interrupt controller
   ioapicinit();    // another interrupt controller
-  consoleinit();   // I/O devices & their interrupts
+  consoleinit();   // console hardware
   uartinit();      // serial port
   pinit();         // process table
   tvinit();        // trap vectors
@@ -37,8 +37,7 @@ main(void)
   startothers();   // start other processors
   kinit2(P2V(4*1024*1024), P2V(PHYSTOP)); // must come after startothers()
   userinit();      // first user process
-  // Finish setting up this processor in mpmain.
-  mpmain();
+  mpmain();        // finish this processor's setup
 }
 
 // Other CPUs jump here from entryother.S.