mirror of
https://github.com/justinian/jsix.git
synced 2025-12-10 00:14:32 -08:00
[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:
@@ -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++];
|
kernel::args::module &module = args->modules[args->num_modules++];
|
||||||
module.location = reinterpret_cast<void*>(kernel_map);
|
module.location = reinterpret_cast<void*>(kernel_map);
|
||||||
module.size = map_size;
|
module.size = map_size;
|
||||||
|
|||||||
@@ -80,6 +80,9 @@ struct header {
|
|||||||
uint32_t num_modules;
|
uint32_t num_modules;
|
||||||
module *modules;
|
module *modules;
|
||||||
|
|
||||||
|
mem_entry *mem_map;
|
||||||
|
size_t num_map_entries;
|
||||||
|
|
||||||
void *runtime_services;
|
void *runtime_services;
|
||||||
void *acpi_table;
|
void *acpi_table;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user