diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2016-02-04 09:19:40 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2016-02-04 09:19:40 +0000 |
commit | ae79e009e86be3208ff30e2eb1e06e5ba68609a9 (patch) | |
tree | f6e00818051b54f16326c685cff59939c83d4ec7 | |
parent | 2ccdefd91eca641466c03ab9e72039803fea44b8 (diff) |
Some (buggy) UEFI implementations don't report the correct framebuffer
parameters unless SetMode() has been called, even if we don't actually
change the mode. Other (equally buggy) UEFI implementations report an
error if we call SetMode() but don't actually change the mode. Work around
these issues by always calling SetMode() (like we did before rev 1.10), but
don't report an error if the current mode is the same as the desired mode.
ok yasuoka@
-rw-r--r-- | sys/arch/amd64/stand/efiboot/efiboot.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/arch/amd64/stand/efiboot/efiboot.c b/sys/arch/amd64/stand/efiboot/efiboot.c index 04d50719c5f..0b78c6139c4 100644 --- a/sys/arch/amd64/stand/efiboot/efiboot.c +++ b/sys/arch/amd64/stand/efiboot/efiboot.c @@ -1,4 +1,4 @@ -/* $OpenBSD: efiboot.c,v 1.10 2015/11/26 20:26:20 yasuoka Exp $ */ +/* $OpenBSD: efiboot.c,v 1.11 2016/02/04 09:19:39 kettenis Exp $ */ /* * Copyright (c) 2015 YASUOKA Masahiko <yasuoka@yasuoka.net> @@ -526,9 +526,9 @@ efi_makebootargs(void) bestsiz = gopsiz; } } - if (bestmode >= 0 && conout->Mode->Mode != bestmode) { + if (bestmode >= 0) { status = EFI_CALL(gop->SetMode, gop, bestmode); - if (EFI_ERROR(status)) + if (EFI_ERROR(status) && gop->Mode->Mode != bestmode) printf("GOP setmode failed(%d)\n", status); } |