summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
64e74e3)
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.
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? */
/* 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
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++)
{
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
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;
{
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);
- 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)
{
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);
pagedir_activate (uint32_t *pd)
{
if (pd == NULL)
pagedir_activate (uint32_t *pd)
{
if (pd == NULL)
/* 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