[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

@@ -11,10 +11,10 @@ namespace memory {
static const size_t frame_size = 0x1000;
/// Start of kernel memory.
static const uintptr_t kernel_offset = 0xffffff0000000000;
static const uintptr_t kernel_offset = 0xffff800000000000;
/// Offset from physical where page tables are mapped.
static const uintptr_t page_offset = 0xffffff8000000000;
static const uintptr_t page_offset = 0xffffc00000000000;
/// Initial process thread's stack address
static const uintptr_t initial_stack = 0x0000800000000000;