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? */
/* 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
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++)
{
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
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;
{
uint32_t *pd = palloc_get_page (0);
if (pd != NULL)
- memcpy (pd, base_page_dir, PGSIZE);
+ memcpy (pd, init_page_dir, PGSIZE);
return pd;
}
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)
{
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);
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