[boot] Fix several errors getting to kernel
* When using the non-allocating version of `get_uefi_mappings` the length was not getting set. Reworked this function. * Having `build_kernel_mem_map` from `bootloader_main_uefi` caused it to get an out of date map key. Moved this function into `efi_main` right before exiting boot services.
This commit is contained in:
@@ -62,11 +62,11 @@ load(
|
||||
console::print(L" Kernel section %d physical: 0x%lx\r\n", i, pages);
|
||||
console::print(L" Kernel section %d virtual: 0x%lx\r\n", i, pheader->vaddr);
|
||||
|
||||
// TODO: map these pages into kernel args' page tables
|
||||
// remember to set appropriate RWX permissions
|
||||
// TODO: set appropriate RWX permissions
|
||||
paging::map_pages(pml4, args, reinterpret_cast<uintptr_t>(pages), pheader->vaddr, pheader->mem_size);
|
||||
}
|
||||
|
||||
console::print(L" Kernel entrypoint: 0x%lx\r\n", header->entrypoint);
|
||||
return reinterpret_cast<kernel::entrypoint>(header->entrypoint);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user