[boot] List the detected framebuffer in boot log

List information about the detected framebuffer device (or lack thereof)
in the bootloader log messages.
This commit is contained in:
Justin C. Miller
2021-01-06 23:29:31 -08:00
parent 63a5c2da00
commit 6d4a32b6e8

View File

@@ -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;
}