Преглед изворни кода

Kernel: Perform DeviceManagement initialization after MM is initialized

There's no need to perform it this early, and until the MemoryManager
is initialized we have very limited kmalloc capacity, so let's try and
keep anything that's not required to be there out of there.
Idan Horowitz пре 3 година
родитељ
комит
c9d026d7bc
1 измењених фајлова са 5 додато и 4 уклоњено
  1. 5 4
      Kernel/init.cpp

+ 5 - 4
Kernel/init.cpp

@@ -182,15 +182,16 @@ extern "C" [[noreturn]] UNMAP_AFTER_INIT void init(BootInfo const& boot_info)
 
 
     load_kernel_symbol_table();
     load_kernel_symbol_table();
 
 
+    s_bsp_processor.initialize(0);
+
+    CommandLine::initialize();
+    Memory::MemoryManager::initialize(0);
+
     DeviceManagement::initialize();
     DeviceManagement::initialize();
     SysFSComponentRegistry::initialize();
     SysFSComponentRegistry::initialize();
     DeviceManagement::the().attach_null_device(*NullDevice::must_initialize());
     DeviceManagement::the().attach_null_device(*NullDevice::must_initialize());
     DeviceManagement::the().attach_console_device(*ConsoleDevice::must_create());
     DeviceManagement::the().attach_console_device(*ConsoleDevice::must_create());
     DeviceManagement::the().attach_device_control_device(*DeviceControlDevice::must_create());
     DeviceManagement::the().attach_device_control_device(*DeviceControlDevice::must_create());
-    s_bsp_processor.initialize(0);
-
-    CommandLine::initialize();
-    Memory::MemoryManager::initialize(0);
 
 
     MM.unmap_prekernel();
     MM.unmap_prekernel();