svn commit: r337285 - head/stand/efi/loader

Kyle Evans kevans at FreeBSD.org
Sat Aug 4 06:40:19 UTC 2018


Author: kevans
Date: Sat Aug  4 06:40:18 2018
New Revision: 337285
URL: https://svnweb.freebsd.org/changeset/base/337285

Log:
  efi-autoresizecons: Don't fail the boot w/o GOP or UGA
  
  efi-autoresizecons is currently executed for every boot. If it fails, we
  risk failing the boot, and we really shouldn't do that unless we absolutely
  must.
  
  Not being able to locate GOP or UGA is not a significant enough failure to
  kill the boot. We always have the option to fall back to resizing ConOut to
  a higher text mode resolution (if available), so do that.
  
  This was detected by Doug [1] while attempting a bhyve + UEFI + PXE boot.
  This patch was effectively also submitted by Doug, but I expanded the
  comment he had originally sent me a little bit to indicate why this is an OK
  idea.
  
  Reported by:	Doug Ambrisko <ambrisko at ambrisko.com> [1]

Modified:
  head/stand/efi/loader/framebuffer.c

Modified: head/stand/efi/loader/framebuffer.c
==============================================================================
--- head/stand/efi/loader/framebuffer.c	Sat Aug  4 06:29:46 2018	(r337284)
+++ head/stand/efi/loader/framebuffer.c	Sat Aug  4 06:40:18 2018	(r337285)
@@ -648,7 +648,14 @@ command_autoresize(int argc, char *argv[])
 	snprintf(command_errbuf, sizeof(command_errbuf),
 	    "%s: Neither Graphics Output Protocol nor Universal Graphics Adapter present",
 	    argv[0]);
-	return (CMD_ERROR);
+
+	/*
+	 * Default to text_autoresize if we have neither GOP or UGA.  This won't
+	 * give us the most ideal resolution, but it will at least leave us
+	 * functional rather than failing the boot for an objectively bad
+	 * reason.
+	 */
+	return (text_autoresize());
 }
 
 COMMAND_SET(gop, "gop", "graphics output protocol", command_gop);


More information about the svn-src-head mailing list