diff options
| author | Ada Christine <adachristine18@gmail.com> | 2021-12-31 16:06:26 +0000 |
|---|---|---|
| committer | Ada Christine <adachristine18@gmail.com> | 2021-12-31 16:06:26 +0000 |
| commit | d763064d58cea0479badc237221be0c1203e5db9 (patch) | |
| tree | b07a2e0d47b265d1d8c0aa46379cfb2fed149e63 /kc/boot | |
| parent | 9310e46afa3779aed0a3cb2340ec5d2531a0de90 (diff) | |
Revert "Revert "only map 64KiB past end of kernel. cleanup main_efi.c""
This reverts commit 9310e46afa3779aed0a3cb2340ec5d2531a0de90.
Diffstat (limited to 'kc/boot')
| -rw-r--r-- | kc/boot/kc_main.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/kc/boot/kc_main.c b/kc/boot/kc_main.c index 36aad0c..c469d40 100644 --- a/kc/boot/kc_main.c +++ b/kc/boot/kc_main.c @@ -344,7 +344,8 @@ static EFI_STATUS enter_kernel(Elf64_Ehdr *ehdr) set_page_map(system_page_map); k_boot_data = (struct kc_boot_data *)object_space_base; - k_boot_data->object_space.base = sizeof(*k_boot_data) + (char *)object_space_base; + k_boot_data->object_space.base = sizeof(*k_boot_data) + + (char *)object_space_base; k_boot_data->object_space.size = object_space_size; convert_memory_map(); @@ -401,9 +402,8 @@ EFI_STATUS kc_main(struct efi_loader_interface *interface) // 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. - uint64_t object_space_end = ((uintptr_t)object_space_base + - page_size(2) + page_size(1) * 16) & - ~(page_size(2) - 1); + uint64_t object_space_end = (uintptr_t)object_space_base + + page_size(1) * 16; object_space_size = object_space_end - (uintptr_t)object_space_base; |
