Module Name: src Committed By: jmcneill Date: Sat Feb 22 09:34:26 UTC 2020
Modified Files: src/sys/arch/i386/stand/efiboot: eficons.c Log Message: If the default GOP mode is unavailable, fallback to the first mode defined. PR# port-amd64/55000 To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/arch/i386/stand/efiboot/eficons.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/i386/stand/efiboot/eficons.c diff -u src/sys/arch/i386/stand/efiboot/eficons.c:1.9 src/sys/arch/i386/stand/efiboot/eficons.c:1.10 --- src/sys/arch/i386/stand/efiboot/eficons.c:1.9 Tue Feb 11 11:01:10 2020 +++ src/sys/arch/i386/stand/efiboot/eficons.c Sat Feb 22 09:34:26 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: eficons.c,v 1.9 2020/02/11 11:01:10 jmcneill Exp $ */ +/* $NetBSD: eficons.c,v 1.10 2020/02/22 09:34:26 jmcneill Exp $ */ /*- * Copyright (c) 2016 Kimihiro Nonaka <non...@netbsd.org> @@ -37,6 +37,7 @@ #ifndef DEFAULT_GOP_MODE #define DEFAULT_GOP_MODE "1024x768" #endif +#define FALLBACK_GOP_MODE 0 extern struct x86_boot_params boot_params; @@ -431,6 +432,8 @@ bi_framebuffer(void) } else { /* If a mode has not been selected, choose a default */ bestmode = efi_find_gop_mode(DEFAULT_GOP_MODE); + if (bestmode == -1) + bestmode = FALLBACK_GOP_MODE; } if (bestmode == -1) goto nofb;