diff options
author | Tim Schumacher <timschumi@gmx.de> | 2023-04-28 17:27:24 +0200 |
---|---|---|
committer | Jelle Raaijmakers <jelle@gmta.nl> | 2023-04-28 23:24:19 +0200 |
commit | 9ab598af4984c0590358123af630e0e65e310b72 (patch) | |
tree | a639e1f19e8da87bd42bbe151d9e954dd98e194b /Kernel/Arch | |
parent | a8d08357c9e9eaa6f23a0179a26b8bf0cf52fc02 (diff) | |
download | serenity-9ab598af4984c0590358123af630e0e65e310b72.zip |
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 897c4e5145474d55b247a4a3b5e6bf5420279e2f.
Diffstat (limited to 'Kernel/Arch')
-rw-r--r-- | Kernel/Arch/init.cpp | 13 | ||||
-rw-r--r-- | Kernel/Arch/x86_64/linker.ld | 5 |
2 files changed, 10 insertions, 8 deletions
diff --git a/Kernel/Arch/init.cpp b/Kernel/Arch/init.cpp index 6b2d785af1..8f7cf5381b 100644 --- a/Kernel/Arch/init.cpp +++ b/Kernel/Arch/init.cpp @@ -84,6 +84,9 @@ extern "C" u8 end_of_safemem_atomic_text[]; extern "C" u8 end_of_kernel_image[]; +multiboot_module_entry_t multiboot_copy_boot_modules_array[16]; +size_t multiboot_copy_boot_modules_count; + READONLY_AFTER_INIT bool g_in_early_boot; namespace Kernel { @@ -134,10 +137,8 @@ READONLY_AFTER_INIT char const* kernel_cmdline; READONLY_AFTER_INIT u32 multiboot_flags; READONLY_AFTER_INIT multiboot_memory_map_t* multiboot_memory_map; READONLY_AFTER_INIT size_t multiboot_memory_map_count; +READONLY_AFTER_INIT multiboot_module_entry_t* multiboot_modules; READONLY_AFTER_INIT size_t multiboot_modules_count; -READONLY_AFTER_INIT PhysicalAddress multiboot_module_ramdisk_physical_start; -READONLY_AFTER_INIT PhysicalAddress multiboot_module_ramdisk_physical_end; -READONLY_AFTER_INIT PhysicalAddress multiboot_module_ramdisk_physical_string_addr; READONLY_AFTER_INIT PhysicalAddress multiboot_framebuffer_addr; READONLY_AFTER_INIT u32 multiboot_framebuffer_pitch; READONLY_AFTER_INIT u32 multiboot_framebuffer_width; @@ -169,10 +170,8 @@ extern "C" [[noreturn]] UNMAP_AFTER_INIT void init([[maybe_unused]] BootInfo con multiboot_flags = boot_info.multiboot_flags; multiboot_memory_map = (multiboot_memory_map_t*)boot_info.multiboot_memory_map; multiboot_memory_map_count = boot_info.multiboot_memory_map_count; + multiboot_modules = (multiboot_module_entry_t*)boot_info.multiboot_modules; multiboot_modules_count = boot_info.multiboot_modules_count; - multiboot_module_ramdisk_physical_start = PhysicalAddress { boot_info.multiboot_module_ramdisk_physical_start }; - multiboot_module_ramdisk_physical_end = PhysicalAddress { boot_info.multiboot_module_ramdisk_physical_end }; - multiboot_module_ramdisk_physical_string_addr = PhysicalAddress { boot_info.multiboot_module_ramdisk_physical_string_addr }; multiboot_framebuffer_addr = PhysicalAddress { boot_info.multiboot_framebuffer_addr }; multiboot_framebuffer_pitch = boot_info.multiboot_framebuffer_pitch; multiboot_framebuffer_width = boot_info.multiboot_framebuffer_width; @@ -201,6 +200,8 @@ extern "C" [[noreturn]] UNMAP_AFTER_INIT void init([[maybe_unused]] BootInfo con // We need to copy the command line before kmalloc is initialized, // as it may overwrite parts of multiboot! CommandLine::early_initialize(kernel_cmdline); + memcpy(multiboot_copy_boot_modules_array, multiboot_modules, multiboot_modules_count * sizeof(multiboot_module_entry_t)); + multiboot_copy_boot_modules_count = multiboot_modules_count; new (&bsp_processor()) Processor(); bsp_processor().early_initialize(0); diff --git a/Kernel/Arch/x86_64/linker.ld b/Kernel/Arch/x86_64/linker.ld index e9b7a870f1..e11648fe13 100644 --- a/Kernel/Arch/x86_64/linker.ld +++ b/Kernel/Arch/x86_64/linker.ld @@ -69,8 +69,6 @@ SECTIONS start_of_kernel_data = .; *(.data*) end_of_kernel_data = .; - . = ALIGN(4K); - *(.heap) } :data .ro_after_init ALIGN(4K) : AT(ADDR(.ro_after_init)) @@ -87,6 +85,9 @@ SECTIONS *(COMMON) *(.bss*) end_of_kernel_bss = .; + + . = ALIGN(4K); + *(.heap) } :bss .dynamic ALIGN(4K) : AT (ADDR(.dynamic)) |