[boot] Set up initial page tables
Set up initial page tables for both the offset-mapped area and the loaded kernel code and data. * Got rid of the `loaded_elf` struct - the loader now runs after the initial PML4 is created and maps the ELF sections itself. * Copied in the `page_table` and `page_table_indices` from the kernel, still need to clean this up and extract it into shared code. * Added `page_table_cache` to the kernel args to pass along free pages that can be used for initial page tables. Tags: paging
This commit is contained in:
@@ -22,6 +22,7 @@ enum class mod_type : uint32_t {
|
||||
initrd,
|
||||
|
||||
memory_map,
|
||||
page_tables,
|
||||
framebuffer,
|
||||
|
||||
max
|
||||
@@ -72,7 +73,10 @@ struct header {
|
||||
|
||||
uint8_t _reserved0;
|
||||
|
||||
uint32_t _reserved1;
|
||||
void *pml4;
|
||||
void *page_table_cache;
|
||||
uint32_t num_free_tables;
|
||||
|
||||
uint32_t num_modules;
|
||||
module *modules;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user