From nobody Wed Feb 07 00:13:08 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TV0v85JXCz5BF1H; Wed, 7 Feb 2024 00:13:08 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TV0v84lnNz41Hj; Wed, 7 Feb 2024 00:13:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707264788; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5d3a9hdrB7vIPw90BUI9+6pJj7bzGj88MSo90So3jzc=; b=CTsDYfFML6NbSgFkCcg1HzA5BOlUOew5SbimkteHc5239I94FBjoz8zDtuksX6cBLOXLV2 P5zBtAWT1A4PfdBr4JdcxvWf3IRyhBr/6KJZ8C215ubLgqVUC2kwKdIXbVKojc8yNXydJS CnsS638vUGqQDqwG0fN4ApYEeKOF26duP+5L0RoxNTDtPt0qJ+ry4649X+L9B99AAnRfRB 9Yn2RgC82lvewprVcOAPuglvxzDUGMw4MdUTvyFZ/UqpiVP1nhVHWnKnb+bsUWHxA7Nwc0 +PdzR0+CpGhujOvtWOy2wqoXCiY91LBRlb6HhbfhHtzW7k1p/djoKdsXIBczHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707264788; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5d3a9hdrB7vIPw90BUI9+6pJj7bzGj88MSo90So3jzc=; b=BOjQk6W2cbkT+tlhRJmkHl1OcQW9sXU4F5rQh0fe1NdlsyRHUJF3CcplEJLlnxRLKN+BE4 8jCQf2axvm8Yx2D3/icIWa5IGVGXw+UkQzrQNXGkwHHfQU+79rU2RIEzSjO8jV0fxFD1ZN Gv0f9e8AwQuzR9MqWPTglmeL5hMQ7KRaIeBDnuu6ncUn37KRqUNQlkycBbQ62KuFS99zIB NsWnWjF+VyK8W1LlD+l5vrlyJuLHkCny1qrJKB62v1p9RPaThXb+3svcFwaKoRJbRclZjG fo+g83y4l6XYCnbNpJJWA5P5zFdbTmDbmJ/nICw72eegmG1ZpjMfuGZcG3RNXA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707264788; a=rsa-sha256; cv=none; b=jyyBNqPcW8MpA5Tj5O2VCBr6fZv4DmqnKK2hr5KTs2m07XHFICdNh5AiTgXL8vfJx/PJRc WMOYrj/s/e7sicfGELED3r6Oot2fRbjAKi5gU9sHo5jGnO7SYQhwtCTRtIkBCxOhu6fdUU 3kdXfo/NgxoXDI8trTy97I4sDRRROjJIeZfndhkqG/URE0e8TzdIsqRipI9wGxLQEEYMj6 PGAX5XP1yJ5/2oSZt88Q+XGVIt/scWLfyGvGEY5sIWciAaY9BGoyXOZwv8W0dJKvbg1XEP Y4bnhMA3F2kmxCZ56wGeRvIG4EnRJMS0PoAMeG1nEexzK+fT+59QEqut0aHxDA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TV0v83qGGzlSK; Wed, 7 Feb 2024 00:13:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 4170D8pL055737; Wed, 7 Feb 2024 00:13:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4170D8fc055735; Wed, 7 Feb 2024 00:13:08 GMT (envelope-from git) Date: Wed, 7 Feb 2024 00:13:08 GMT Message-Id: <202402070013.4170D8fc055735@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: 20a6f4779ac6 - stable/14 - loader: For EFI, if we don't have ConOut, try ConIn List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 20a6f4779ac6108716a81d383a79a161ae41d48c Auto-Submitted: auto-generated The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=20a6f4779ac6108716a81d383a79a161ae41d48c commit 20a6f4779ac6108716a81d383a79a161ae41d48c Author: Warner Losh AuthorDate: 2024-02-04 21:09:48 +0000 Commit: Warner Losh CommitDate: 2024-02-07 00:09:46 +0000 loader: For EFI, if we don't have ConOut, try ConIn Try ConIn if we don't have a ConOut variable. ConIn will contain HID devices and/or serial devices. We currently just search for serial devices and will use them instead of video with the current code. While ConIn w/o ConOut is fairly common on laptops, is kinda rare on servers. Some refinement may be needed in the future if servers come to light. This is also minimal to allow possible integration into 13.3 release. MFC After: 1 week Sponsored by: Netflix Reviewed by: dab, tsoome Differential Revision: https://reviews.freebsd.org/D43714 (cherry picked from commit 064fa628ce375028f2510182f4edbafa7f469ecb) --- stand/efi/loader/main.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/stand/efi/loader/main.c b/stand/efi/loader/main.c index 39e32a56adc0..123410f83aa0 100644 --- a/stand/efi/loader/main.c +++ b/stand/efi/loader/main.c @@ -716,7 +716,10 @@ setenv_int(const char *key, int val) * Parse ConOut (the list of consoles active) and see if we can find a * serial port and/or a video port. It would be nice to also walk the * ACPI name space to map the UID for the serial port to a port. The - * latter is especially hard. + * latter is especially hard. Also check for ConIn as well. This will + * be enough to determine if we have serial, and if we don't, we default + * to video. If there's a dual-console situation with ConIn, this will + * currently fail. */ int parse_uefi_con_out(void) @@ -735,6 +738,8 @@ parse_uefi_con_out(void) rv = efi_global_getenv("ConOut", buf, &sz); if (rv != EFI_SUCCESS) rv = efi_global_getenv("ConOutDev", buf, &sz); + if (rv != EFI_SUCCESS) + rv = efi_global_getenv("ConIn", buf, &sz); if (rv != EFI_SUCCESS) { /* * If we don't have any ConOut default to both. If we have GOP