From 5f682fd08de5fd5595d7ba718e5c7021b5a121b5 Mon Sep 17 00:00:00 2001 From: Augustin Cavalier Date: Fri, 22 Oct 2021 13:06:42 -0400 Subject: [PATCH] EFI: Add (disabled, partially broken) support for video_text_console usage. See inline comments. Change-Id: I7eaa5888b63aecaa582fe00f796b2f3f3c8be203 Reviewed-on: https://review.haiku-os.org/c/haiku/+/4644 Reviewed-by: waddlesplash --- src/system/boot/platform/efi/console.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/system/boot/platform/efi/console.cpp b/src/system/boot/platform/efi/console.cpp index 4c32405be4..e3030e7da8 100644 --- a/src/system/boot/platform/efi/console.cpp +++ b/src/system/boot/platform/efi/console.cpp @@ -14,6 +14,7 @@ #include #include +#include #include #include @@ -215,15 +216,24 @@ static void update_screen_size(void) status_t console_init(void) { +#if 1 gConsoleNode = &sConsole; update_screen_size(); console_hide_cursor(); console_clear_screen(); +#else + // FIXME: This does not work because we cannot initialize video before VFS, as it + // needs to read the driver settings before setting a mode; and also because the + // heap does not yet exist. + platform_init_video(); + platform_switch_to_logo(); + gConsoleNode = video_text_console_init(gKernelArgs.frame_buffer.physical_buffer.start); +#endif // enable stdio functionality - stdin = (FILE *)&sConsole; - stdout = stderr = (FILE *)&sConsole; + stdin = (FILE *)gConsoleNode; + stdout = stderr = (FILE *)gConsoleNode; return B_OK; }