1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-28 19:45:10 +00:00

Revert "Kernel/x86: Bake the Prekernel and the Kernel into one image"

Some hardware/software configurations crash KVM as soon as we try to
start Serenity. The exact cause is currently unknown, so just fully
revert it for now.

This reverts commit 897c4e5145.
This commit is contained in:
Tim Schumacher 2023-04-28 17:27:24 +02:00 committed by Jelle Raaijmakers
parent a8d08357c9
commit 9ab598af49
10 changed files with 50 additions and 81 deletions

View file

@ -38,6 +38,9 @@ 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)
@ -268,6 +271,15 @@ 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;