From owner-svn-src-all@freebsd.org Fri Nov 8 20:08:45 2019 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 84C1815E342; Fri, 8 Nov 2019 20:08:45 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 478rv12vg2z3Mkm; Fri, 8 Nov 2019 20:08:45 +0000 (UTC) (envelope-from manu@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 42D0036CB; Fri, 8 Nov 2019 20:08:45 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id xA8K8jn2033597; Fri, 8 Nov 2019 20:08:45 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xA8K8j7C033596; Fri, 8 Nov 2019 20:08:45 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201911082008.xA8K8j7C033596@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Fri, 8 Nov 2019 20:08:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r354559 - head/stand/efi/loader X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head/stand/efi/loader X-SVN-Commit-Revision: 354559 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Nov 2019 20:08:45 -0000 Author: manu Date: Fri Nov 8 20:08:44 2019 New Revision: 354559 URL: https://svnweb.freebsd.org/changeset/base/354559 Log: loader.efi: Default to serial if we don't have a ConOut variable In the EFI implementation in U-Boot no ConOut efi variable is created, this cause loader to fallback to TERM_EMU implementation which is very very very slow (and uses the ConOut device in the system table anyway). The UEFI spec aren't clear as if this variable needs to exists or not. Reviewed by: imp, kevans Modified: head/stand/efi/loader/main.c Modified: head/stand/efi/loader/main.c ============================================================================== --- head/stand/efi/loader/main.c Fri Nov 8 19:29:14 2019 (r354558) +++ head/stand/efi/loader/main.c Fri Nov 8 20:08:44 2019 (r354559) @@ -703,8 +703,11 @@ parse_uefi_con_out(void) how = 0; sz = sizeof(buf); rv = efi_global_getenv("ConOut", buf, &sz); - if (rv != EFI_SUCCESS) + if (rv != EFI_SUCCESS) { + /* If we don't have any ConOut default to serial */ + how = RB_SERIAL; goto out; + } ep = buf + sz; node = (EFI_DEVICE_PATH *)buf; while ((char *)node < ep) {