[fb] Output klog to fb if video exists

If there's no video, do as we did before, otherwise route logs to the fb
driver instead. (Need to clean this up to just have a log consumer
general interface?) Also added a "scrollback" class to fb driver and
updated the system_get_log syscall.
This commit is contained in:
Justin C. Miller
2021-01-03 18:13:41 -08:00
parent 4c41205e73
commit 972ef39295
12 changed files with 181 additions and 29 deletions

View File

@@ -83,9 +83,14 @@ console::pick_mode(uefi::boot_services *bs)
uefi::protos::graphics_output *gfx_out_proto;
uefi::guid guid = uefi::protos::graphics_output::guid;
try_or_raise(
bs->locate_protocol(&guid, nullptr, (void **)&gfx_out_proto),
L"Failed to find a Graphics Output Protocol handle");
m_fb.type = kernel::args::fb_type::none;
uefi::status has_gop = bs->locate_protocol(&guid, nullptr,
(void **)&gfx_out_proto);
if (has_gop != uefi::status::success)
// No video output found, skip it
return;
const uint32_t modes = gfx_out_proto->mode->max_mode;
uint32_t best = gfx_out_proto->mode->mode;