diff options
| author | Ada Christine <adachristine18@gmail.com> | 2022-01-02 15:31:16 +0000 |
|---|---|---|
| committer | Ada Christine <adachristine18@gmail.com> | 2022-01-02 15:31:16 +0000 |
| commit | 88551ff4da1db1c82adb56cc04e0c872a8e7fd18 (patch) | |
| tree | e6551124b1e82df46d8bc37cd930f4808815c2f1 /kc/boot/kc_main.c | |
| parent | 6fee34f34c046617245fb33943be552c1c5a4b82 (diff) | |
bug in vm_tree.c; adjustments to boot data object space
Diffstat (limited to 'kc/boot/kc_main.c')
| -rw-r--r-- | kc/boot/kc_main.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/kc/boot/kc_main.c b/kc/boot/kc_main.c index c469d40..84609ed 100644 --- a/kc/boot/kc_main.c +++ b/kc/boot/kc_main.c @@ -337,7 +337,7 @@ static EFI_STATUS enter_kernel(Elf64_Ehdr *ehdr) if (EFI_ERROR(status)) { - plog(L"failed exiting boot services\r\n"); + plog(L"failed exiting boot services:\r\n"); debug(); } @@ -392,16 +392,11 @@ EFI_STATUS kc_main(struct efi_loader_interface *interface) plog(L"mapping kernel pages\r\n"); create_kernel_maps(ehdr, (void *)KERNEL_SPACE_LOWER); - object_space_base = (void *)(kernel_image.buffer_size + - (char *)KERNEL_SPACE_LOWER); + object_space_base = + (void *)(page_align(kernel_image.buffer_size,1) + + (char *)KERNEL_SPACE_LOWER); - // map pages up to the nearest 2MB - // unless there aren't at least 16 4KiB pages remaining - // until the boundary. this will ensure there is at least - // 64KiB and at most 2MiB. - // it is not necessary to know the actual size of this object - // as it will be overlaid with a virtual address space - // upon kernel initialization. + // add a tail of 64KiB to the kernel image uint64_t object_space_end = (uintptr_t)object_space_base + page_size(1) * 16; |
