From owner-svn-src-head@freebsd.org Sat Aug 4 06:40:19 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B4309105FEF7; Sat, 4 Aug 2018 06:40:19 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 639A9883A2; Sat, 4 Aug 2018 06:40:19 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 40AB73E2E; Sat, 4 Aug 2018 06:40:19 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w746eJu0076446; Sat, 4 Aug 2018 06:40:19 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w746eJw4076445; Sat, 4 Aug 2018 06:40:19 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201808040640.w746eJw4076445@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Sat, 4 Aug 2018 06:40:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r337285 - head/stand/efi/loader X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/stand/efi/loader X-SVN-Commit-Revision: 337285 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Aug 2018 06:40:19 -0000 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 [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);