Change assembly from AT&T to Intel syntax.
[pintos-anon] / src / threads / init.c
index 741f0e42e4339b8824f16646aae237de0f365dc0..c17316aa59efec1951ad48eed5c8e4522a3e0381 100644 (file)
@@ -105,6 +105,7 @@ main (void)
   /* Start thread scheduler and enable interrupts. */
   thread_start ();
   serial_init_queue ();
+  timer_calibrate ();
 
 #ifdef FILESYS
   /* Initialize filesystem. */
@@ -189,7 +190,11 @@ paging_init (void)
       pt[pte_idx] = pte_create_kernel (vaddr, true);
     }
 
-  asm volatile ("movl %0,%%cr3" :: "r" (vtop (base_page_dir)));
+  /* Store the physical address of the page directory into CR3
+     aka PDBR (page directory base register).  This activates our
+     new page tables immediately.  See [IA32-v2a] "MOV--Move
+     to/from Control Registers" and [IA32-v3] 3.7.5. */
+  asm volatile ("mov %%cr3, %0" :: "r" (vtop (base_page_dir)));
 }
 
 /* Parses the command line. */