[boot] Virtualize memory in the bootloader

Finish updating the page tables, call UEFI's `set_virtual_address_map`
and jump to the kernel!
This commit is contained in:
Justin C. Miller
2020-05-21 23:49:49 -07:00
parent 6a538ad4f3
commit b491a09686
6 changed files with 89 additions and 74 deletions

View File

@@ -33,6 +33,11 @@ void allocate_tables(
kernel::args::header *args,
uefi::boot_services *bs);
/// Copy existing page table entries to a new page table. Does not do a deep
/// copy - the new PML4 is updated to point to the existing next-level page
/// tables in the current PML4.
void add_current_mappings(page_table *new_pml4);
/// Map a physical address to a virtual address in the given page tables.
/// \arg pml4 The root of the set of page tables to be updated
/// \arg args The kernel args header, used for the page table cache