瀏覽代碼

Kernel: Initialize serial debug after setting kernel command-line

Gunnar Beutner 4 年之前
父節點
當前提交
b4600f2996
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      Kernel/init.cpp

+ 2 - 1
Kernel/init.cpp

@@ -124,7 +124,6 @@ const char* kernel_cmdline;
 extern "C" [[noreturn]] UNMAP_AFTER_INIT void init(BootInfo const& boot_info)
 {
     g_in_early_boot = true;
-    setup_serial_debug();
 
     multiboot_info_ptr = boot_info.multiboot_info_ptr;
     start_of_prekernel_image = boot_info.start_of_prekernel_image;
@@ -141,6 +140,8 @@ extern "C" [[noreturn]] UNMAP_AFTER_INIT void init(BootInfo const& boot_info)
     boot_pd_kernel_pt1023 = boot_info.boot_pd_kernel_pt1023;
     kernel_cmdline = boot_info.kernel_cmdline;
 
+    setup_serial_debug();
+
     // We need to copy the command line before kmalloc is initialized,
     // as it may overwrite parts of multiboot!
     CommandLine::early_initialize(kernel_cmdline);