diff options
author | Tom Rini <trini@konsulko.com> | 2023-01-20 14:23:20 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2023-01-20 14:23:20 -0500 |
commit | dd31cd58b02729807934cb699b164b1f8736620f (patch) | |
tree | 58d933861545e5950932f2911109610b98397a8e /lib/efi_loader/efi_console.c | |
parent | 0b9b01517f0b1398ec27dbb47faf3645b719e02c (diff) | |
parent | e10fffe8b56f4430e0e242977bfa67ab589b8235 (diff) |
Merge tag 'efi-2023-04-rc1-2' of https://source.denx.de/u-boot/custodians/u-boot-efi
Pull request for efi-2023-04-rc1-2
Documentation
* man-pages for source, blkcache, bdinfo
* fix references to distro documentation
UEFI:
* allow clear screen by scrolling
* ensure that file ubootefi.var is created
* fix CapsuleMax variable reporting
Others:
* reduce verbosity of fat_read_file()
Diffstat (limited to 'lib/efi_loader/efi_console.c')
-rw-r--r-- | lib/efi_loader/efi_console.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/lib/efi_loader/efi_console.c b/lib/efi_loader/efi_console.c index 4d08dd3763a..1ed8c7aa36e 100644 --- a/lib/efi_loader/efi_console.c +++ b/lib/efi_loader/efi_console.c @@ -461,10 +461,21 @@ static efi_status_t EFIAPI efi_cout_set_attribute( } /** - * efi_cout_clear_screen() - clear screen + * efi_clear_screen() - clear screen */ static void efi_clear_screen(void) { + if (CONFIG_IS_ENABLED(EFI_SCROLL_ON_CLEAR_SCREEN)) { + unsigned int row, screen_rows, screen_columns; + + /* Avoid overwriting previous outputs on streaming consoles */ + screen_rows = efi_cout_modes[efi_con_mode.mode].rows; + screen_columns = efi_cout_modes[efi_con_mode.mode].columns; + printf(ESC "[%u;%uH", screen_rows, screen_columns); + for (row = 1; row < screen_rows; row++) + printf("\n"); + } + /* * The Linux console wants both a clear and a home command. The video * uclass does not support <ESC>[H without coordinates, yet. @@ -489,6 +500,12 @@ static efi_status_t EFIAPI efi_cout_clear_screen( { EFI_ENTRY("%p", this); + /* Set default colors if not done yet */ + if (efi_con_mode.attribute == 0) { + efi_con_mode.attribute = 0x07; + printf(ESC "[0;37;40m"); + } + efi_clear_screen(); return EFI_EXIT(EFI_SUCCESS); |