Comments.
[pintos-anon] / src / threads / init.c
index 1135ae7ccecc79ad1593671c7e3bbd906c31caa1..cf7a896222a5e2370b8f03827fda4fbaf9c8d4c1 100644 (file)
@@ -190,6 +190,10 @@ paging_init (void)
       pt[pte_idx] = pte_create_kernel (vaddr, true);
     }
 
+  /* 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 ("movl %0,%%cr3" :: "r" (vtop (base_page_dir)));
 }