mapping in kernel virtual address space
git-svn-id: svn://anubis/hos/trunk@39 5b3e749e-e535-0410-8002-a9bb6afbdfca
This commit is contained in:
parent
edb1a6426d
commit
e55f2cdfc4
@ -114,18 +114,25 @@ void mm_bootstrap()
|
||||
page_directory[i] = 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* now map all of RAM into the virtual address space
|
||||
* starting at address 0x0
|
||||
/*
|
||||
* map all of RAM into the virtual address space
|
||||
* starting at address 0x0 (except the null page)
|
||||
*/
|
||||
for (u32_t page_base = 0;
|
||||
for (u32_t page_base = PAGE_SIZE;
|
||||
page_base < max_ram_address;
|
||||
page_base += PAGE_SIZE)
|
||||
{
|
||||
mm_map(page_base, page_base, 0, 1);
|
||||
}
|
||||
|
||||
/* TODO: map kernel memory to KERNEL_OFFSET virtual region */
|
||||
/* now map the kernel's virtual address space into RAM */
|
||||
for (u32_t page_base = KERNEL_VIRTUAL_ADDRESS;
|
||||
page_base < KERNEL_VIRTUAL_ADDRESS + KERNEL_SIZE;
|
||||
page_base += PAGE_SIZE)
|
||||
{
|
||||
/* map page_base to page_base - KERNEL_OFFSET */
|
||||
mm_map(page_base, page_base - KERNEL_OFFSET, 0, 1);
|
||||
}
|
||||
|
||||
mm_use_virtual_offset = false;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user