Do not unconditionally set a mode in efi_console_set_mode(), do so only if the currently set mode is not valid.
Signed-off-by: Roger Pau Monné <roger....@citrix.com> --- xen/common/efi/boot.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/xen/common/efi/boot.c b/xen/common/efi/boot.c index db0340c8e2..7e8a8b7857 100644 --- a/xen/common/efi/boot.c +++ b/xen/common/efi/boot.c @@ -799,6 +799,11 @@ static void __init efi_console_set_mode(void) UINTN cols, rows, size; unsigned int best, i; + /* Only set a mode if the current one is not valid. */ + if ( StdOut->QueryMode(StdOut, StdOut->Mode->Mode, &cols, &rows) == + EFI_SUCCESS ) + return; + for ( i = 0, size = 0, best = StdOut->Mode->Mode; i < StdOut->Mode->MaxMode; ++i ) { -- 2.37.3