Rename base_page_dir to init_page_dir.
authorBen Pfaff <blp@cs.stanford.edu>
Fri, 7 Nov 2008 05:19:34 +0000 (21:19 -0800)
committerBen Pfaff <blp@cs.stanford.edu>
Fri, 7 Nov 2008 05:55:39 +0000 (21:55 -0800)
This makes its name fit the convention that the file name is used as
a prefix for global symbol names.

Found by Godmar with his process-linker-map.pl script.

src/threads/init.c
src/threads/init.h
src/userprog/pagedir.c

index a831a80b31a3bcdcdb9699334837203cad8f888a..60d6c46c4a98c3a5a7992f69e8422bf28f96cbd9 100644 (file)
@@ -40,7 +40,7 @@
 size_t ram_pages;
 
 /* Page directory with kernel mappings only. */
 size_t ram_pages;
 
 /* Page directory with kernel mappings only. */
-uint32_t *base_page_dir;
+uint32_t *init_page_dir;
 
 #ifdef FILESYS
 /* -f: Format the file system? */
 
 #ifdef FILESYS
 /* -f: Format the file system? */
@@ -152,7 +152,7 @@ ram_init (void)
 
 /* Populates the base page directory and page table with the
    kernel virtual mapping, and then sets up the CPU to use the
 
 /* Populates the base page directory and page table with the
    kernel virtual mapping, and then sets up the CPU to use the
-   new page directory.  Points base_page_dir to the page
+   new page directory.  Points init_page_dir to the page
    directory it creates.
 
    At the time this function is called, the active page table
    directory it creates.
 
    At the time this function is called, the active page table
@@ -166,7 +166,7 @@ paging_init (void)
   size_t page;
   extern char _start, _end_kernel_text;
 
   size_t page;
   extern char _start, _end_kernel_text;
 
-  pd = base_page_dir = palloc_get_page (PAL_ASSERT | PAL_ZERO);
+  pd = init_page_dir = palloc_get_page (PAL_ASSERT | PAL_ZERO);
   pt = NULL;
   for (page = 0; page < ram_pages; page++) 
     {
   pt = NULL;
   for (page = 0; page < ram_pages; page++) 
     {
@@ -190,7 +190,7 @@ paging_init (void)
      new page tables immediately.  See [IA32-v2a] "MOV--Move
      to/from Control Registers" and [IA32-v3a] 3.7.5 "Base Address
      of the Page Directory". */
      new page tables immediately.  See [IA32-v2a] "MOV--Move
      to/from Control Registers" and [IA32-v3a] 3.7.5 "Base Address
      of the Page Directory". */
-  asm volatile ("movl %0, %%cr3" : : "r" (vtop (base_page_dir)));
+  asm volatile ("movl %0, %%cr3" : : "r" (vtop (init_page_dir)));
 }
 
 /* Breaks the kernel command line into words and returns them as
 }
 
 /* Breaks the kernel command line into words and returns them as
index 963cbd617d58a4e3e297a27ca17b55c6c0911a2e..f28303cffbf9731086b57c3c08373c58067d3114 100644 (file)
@@ -10,7 +10,7 @@
 extern size_t ram_pages;
 
 /* Page directory with kernel mappings only. */
 extern size_t ram_pages;
 
 /* Page directory with kernel mappings only. */
-extern uint32_t *base_page_dir;
+extern uint32_t *init_page_dir;
 
 /* -q: Power off when kernel tasks complete? */
 extern bool power_off_when_done;
 
 /* -q: Power off when kernel tasks complete? */
 extern bool power_off_when_done;
index 30bdfe263b67f58ee9787b413036de6984c7628b..1442d4076067043f9ff35a516c999f2addff0cc3 100644 (file)
@@ -18,7 +18,7 @@ pagedir_create (void)
 {
   uint32_t *pd = palloc_get_page (0);
   if (pd != NULL)
 {
   uint32_t *pd = palloc_get_page (0);
   if (pd != NULL)
-    memcpy (pd, base_page_dir, PGSIZE);
+    memcpy (pd, init_page_dir, PGSIZE);
   return pd;
 }
 
   return pd;
 }
 
@@ -32,7 +32,7 @@ pagedir_destroy (uint32_t *pd)
   if (pd == NULL)
     return;
 
   if (pd == NULL)
     return;
 
-  ASSERT (pd != base_page_dir);
+  ASSERT (pd != init_page_dir);
   for (pde = pd; pde < pd + pd_no (PHYS_BASE); pde++)
     if (*pde & PTE_P) 
       {
   for (pde = pd; pde < pd + pd_no (PHYS_BASE); pde++)
     if (*pde & PTE_P) 
       {
@@ -104,7 +104,7 @@ pagedir_set_page (uint32_t *pd, void *upage, void *kpage, bool writable)
   ASSERT (pg_ofs (kpage) == 0);
   ASSERT (is_user_vaddr (upage));
   ASSERT (vtop (kpage) >> PTSHIFT < ram_pages);
   ASSERT (pg_ofs (kpage) == 0);
   ASSERT (is_user_vaddr (upage));
   ASSERT (vtop (kpage) >> PTSHIFT < ram_pages);
-  ASSERT (pd != base_page_dir);
+  ASSERT (pd != init_page_dir);
 
   pte = lookup_page (pd, upage, true);
 
 
   pte = lookup_page (pd, upage, true);
 
@@ -220,7 +220,7 @@ void
 pagedir_activate (uint32_t *pd) 
 {
   if (pd == NULL)
 pagedir_activate (uint32_t *pd) 
 {
   if (pd == NULL)
-    pd = base_page_dir;
+    pd = init_page_dir;
 
   /* Store the physical address of the page directory into CR3
      aka PDBR (page directory base register).  This activates our
 
   /* Store the physical address of the page directory into CR3
      aka PDBR (page directory base register).  This activates our