Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/i386/stand/efiboot If the default GOP mode is unava...



details:   https://anonhg.NetBSD.org/src/rev/3049eff5e479
branches:  trunk
changeset: 745058:3049eff5e479
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Sat Feb 22 09:34:26 2020 +0000

description:
If the default GOP mode is unavailable, fallback to the first mode defined.
PR# port-amd64/55000

diffstat:

 sys/arch/i386/stand/efiboot/eficons.c |  5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diffs (26 lines):

diff -r 0bb543e55e11 -r 3049eff5e479 sys/arch/i386/stand/efiboot/eficons.c
--- a/sys/arch/i386/stand/efiboot/eficons.c     Sat Feb 22 09:30:42 2020 +0000
+++ b/sys/arch/i386/stand/efiboot/eficons.c     Sat Feb 22 09:34:26 2020 +0000
@@ -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 <nonaka%netbsd.org@localhost>
@@ -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 @@
        } 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;



Home | Main Index | Thread Index | Old Index