[boot] Add explicit memory map pointer to args

The bootloader was previously just passing the memory map as a module,
but the memory map is important enough to want a direct pointer, instead
of having to search the modules.
This commit is contained in:
Justin C. Miller
2020-05-23 12:37:39 -07:00
parent ce0bcbd3b6
commit 75641a4394
2 changed files with 8 additions and 0 deletions

View File

@@ -231,6 +231,11 @@ build_kernel_mem_map(kernel::args::header *args, uefi::boot_services *bs)
}
}
// Give just the actually-set entries in the header
args->mem_map = kernel_map;
args->num_map_entries = i;
// But pass the entire allocated area in a module as well
kernel::args::module &module = args->modules[args->num_modules++];
module.location = reinterpret_cast<void*>(kernel_map);
module.size = map_size;