1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 11:48:10 +00:00

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.
This commit is contained in:
Liav A 2022-03-15 22:04:12 +02:00 committed by Linus Groh
parent 0ef1137e88
commit eca8f292a5
4 changed files with 23 additions and 4 deletions

View file

@ -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...");