diff options
author | Liav A <liavalb@gmail.com> | 2022-03-15 22:04:12 +0200 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2022-03-18 09:22:10 +0000 |
commit | eca8f292a56f8a0000532c15081a753cc21878b1 (patch) | |
tree | a6adca58d7c3d6fc4f1420f3ba0af40591e05b7d /Kernel/init.cpp | |
parent | 0ef1137e8833fdcd7f859ec02cbf7b93f5f0c4f9 (diff) | |
download | serenity-eca8f292a56f8a0000532c15081a753cc21878b1.zip |
Kernel: Allow to disable early boot console
This aid debugging on bare metal when we suspect that the boot console
does something wrong that interferes with other kernel components.
Diffstat (limited to 'Kernel/init.cpp')
-rw-r--r-- | Kernel/init.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/Kernel/init.cpp b/Kernel/init.cpp index 3e11be2bf1..a89afa848e 100644 --- a/Kernel/init.cpp +++ b/Kernel/init.cpp @@ -195,10 +195,12 @@ extern "C" [[noreturn]] UNMAP_AFTER_INIT void init(BootInfo const& boot_info) // NOTE: If the bootloader provided a framebuffer, then set up an initial console. // If the bootloader didn't provide a framebuffer, then set up an initial text console. // We do so we can see the output on the screen as soon as possible. - if (!multiboot_framebuffer_addr.is_null()) { - g_boot_console = &try_make_ref_counted<Graphics::BootFramebufferConsole>(multiboot_framebuffer_addr, multiboot_framebuffer_width, multiboot_framebuffer_height, multiboot_framebuffer_pitch).value().leak_ref(); - } else { - g_boot_console = &Graphics::TextModeConsole::initialize().leak_ref(); + if (!kernel_command_line().is_early_boot_console_disabled()) { + if (!multiboot_framebuffer_addr.is_null()) { + g_boot_console = &try_make_ref_counted<Graphics::BootFramebufferConsole>(multiboot_framebuffer_addr, multiboot_framebuffer_width, multiboot_framebuffer_height, multiboot_framebuffer_pitch).value().leak_ref(); + } else { + g_boot_console = &Graphics::TextModeConsole::initialize().leak_ref(); + } } dmesgln("Starting SerenityOS..."); |