mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 05:39:11 +00:00
Kernel: Parse boot modules from Multiboot specification
This commit is contained in:
parent
3cbe805486
commit
ec056f3bd1
Notes:
sideshowbarker
2024-07-18 22:57:48 +09:00
Author: https://github.com/boricj
Commit: ec056f3bd1
Pull-request: https://github.com/SerenityOS/serenity/pull/5028
Reviewed-by: https://github.com/awesomekling
4 changed files with 68 additions and 15 deletions
|
@ -79,6 +79,9 @@ extern ctor_func_t end_ctors;
|
|||
extern u32 __stack_chk_guard;
|
||||
u32 __stack_chk_guard;
|
||||
|
||||
multiboot_module_entry_t multiboot_copy_boot_modules_array[16];
|
||||
size_t multiboot_copy_boot_modules_count;
|
||||
|
||||
namespace Kernel {
|
||||
|
||||
[[noreturn]] static void init_stage2(void*);
|
||||
|
@ -111,7 +114,8 @@ extern "C" [[noreturn]] void init()
|
|||
// We need to copy the command line before kmalloc is initialized,
|
||||
// as it may overwrite parts of multiboot!
|
||||
CommandLine::early_initialize(reinterpret_cast<const char*>(low_physical_to_virtual(multiboot_info_ptr->cmdline)));
|
||||
|
||||
memcpy(multiboot_copy_boot_modules_array, (u8*)low_physical_to_virtual(multiboot_info_ptr->mods_addr), multiboot_info_ptr->mods_count * sizeof(multiboot_module_entry_t));
|
||||
multiboot_copy_boot_modules_count = multiboot_info_ptr->mods_count;
|
||||
s_bsp_processor.early_initialize(0);
|
||||
|
||||
// Invoke the constructors needed for the kernel heap
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue