From 1ba44c99d16f205b93cd1d8f96248062dc429af0 Mon Sep 17 00:00:00 2001 From: "Justin C. Miller" Date: Wed, 6 Jan 2021 23:29:31 -0800 Subject: [PATCH] [boot] List the detected framebuffer in boot log List information about the detected framebuffer device (or lack thereof) in the bootloader log messages. --- src/boot/console.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/boot/console.cpp b/src/boot/console.cpp index a9179ae..c4ad4cd 100644 --- a/src/boot/console.cpp +++ b/src/boot/console.cpp @@ -73,6 +73,25 @@ console::console(uefi::boot_services *bs, uefi::protos::simple_text_output *out) m_out->set_attribute(uefi::attribute::light_gray); m_out->output_string(L" booting...\r\n\n"); + if (m_fb.type != kernel::args::fb_type::none) { + wchar_t const * type = nullptr; + switch (m_fb.type) { + case kernel::args::fb_type::rgb8: + type = L"rgb8"; + break; + case kernel::args::fb_type::bgr8: + type = L"bgr8"; + break; + default: + type = L"unknown"; + } + + printf(L"Found framebuffer: %dx%d type %s @0x%x\r\n", + m_fb.horizontal, m_fb.vertical, type, m_fb.phys_addr); + } else { + printf(L"No framebuffer found.\r\n"); + } + s_console = this; }