[boot] Scroll serial output before exit_boot_services

The last line of the boot output was always getting cut off by anything
else getting printed to the serial port. Adding two newlines to clear
the cursor of the previous output.
This commit is contained in:
Justin C. Miller
2022-01-15 09:08:46 -08:00
parent 5c82e5ba1b
commit 421fe33dc0
3 changed files with 13 additions and 0 deletions

View File

@@ -133,6 +133,8 @@ uefi_exit(bootproto::args *args, uefi::handle image, uefi::boot_services *bs)
args->frame_blocks = memory::build_frame_blocks(args->mem_map);
map.update(*bs);
status.do_blank();
try_or_raise(
bs->exit_boot_services(image, map.key),
L"Failed to exit boot services");

View File

@@ -147,6 +147,16 @@ status_line::do_fail(const wchar_t *message, uefi::status status)
out->output_string(L"\r\n");
}
void
status_line::do_blank()
{
auto out = console::get().m_out;
int row = out->mode->cursor_row;
out->set_cursor_position(0, row);
out->output_string(L"\r\n\r\n");
}
status_bar::status_bar(video::screen *screen) :

View File

@@ -75,6 +75,7 @@ public:
virtual void do_warn(const wchar_t *message, uefi::status status) override;
virtual void do_fail(const wchar_t *message, uefi::status status) override;
void do_blank();
private:
void print_status_tag();