diff options
Diffstat (limited to 'Kernel/Arch/init.cpp')
-rw-r--r-- | Kernel/Arch/init.cpp | 13 |
1 files changed, 7 insertions, 6 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); |