mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 09:48:11 +00:00
Kernel/x86: Bake the Prekernel and the Kernel into one image
The new baked image is a Prekernel and a Kernel baked together now, so essentially we no longer need to pass the Prekernel as -kernel and the actual kernel image as -initrd to QEMU, leaving the option to pass an actual initrd or initramfs module later on with multiboot.
This commit is contained in:
parent
2a1e58f8cc
commit
897c4e5145
10 changed files with 81 additions and 50 deletions
|
@ -38,9 +38,6 @@ extern u8 end_of_unmap_after_init[];
|
|||
extern u8 start_of_kernel_ksyms[];
|
||||
extern u8 end_of_kernel_ksyms[];
|
||||
|
||||
extern multiboot_module_entry_t multiboot_copy_boot_modules_array[16];
|
||||
extern size_t multiboot_copy_boot_modules_count;
|
||||
|
||||
namespace Kernel::Memory {
|
||||
|
||||
ErrorOr<FlatPtr> page_round_up(FlatPtr x)
|
||||
|
@ -271,15 +268,6 @@ UNMAP_AFTER_INIT void MemoryManager::parse_memory_map()
|
|||
#endif
|
||||
global_data.used_memory_ranges.append(UsedMemoryRange { UsedMemoryRangeType::Kernel, PhysicalAddress(virtual_to_low_physical((FlatPtr)start_of_kernel_image)), PhysicalAddress(page_round_up(virtual_to_low_physical((FlatPtr)end_of_kernel_image)).release_value_but_fixme_should_propagate_errors()) });
|
||||
|
||||
if (multiboot_flags & 0x4) {
|
||||
auto* bootmods_start = multiboot_copy_boot_modules_array;
|
||||
auto* bootmods_end = bootmods_start + multiboot_copy_boot_modules_count;
|
||||
|
||||
for (auto* bootmod = bootmods_start; bootmod < bootmods_end; bootmod++) {
|
||||
global_data.used_memory_ranges.append(UsedMemoryRange { UsedMemoryRangeType::BootModule, PhysicalAddress(bootmod->start), PhysicalAddress(bootmod->end) });
|
||||
}
|
||||
}
|
||||
|
||||
auto* mmap_begin = multiboot_memory_map;
|
||||
auto* mmap_end = multiboot_memory_map + multiboot_memory_map_count;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue