From nobody Sat Oct 24 01:18:26 2026 X-Original-To: dev-commits-src-branches@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 4jBMTb04rVz6wqdW for ; Sat, 24 Oct 2026 01:18:27 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jBMTZ1XDkz4LJh for ; Sat, 24 Oct 2026 01:18:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1792804706; 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=u7iPI90td8CCd8FiMMVzR8luFDFyJs7XbYxVXFncwNQ=; b=CQSAg0V3LfJT4rY91sZVI+rPU1fBp3HVqpvqSrMST+GM/6ANSWEAr0UGgSbqR9USH5GGd9 UWj3xB1TBRB8LjDynMIT7ITi0vYXSzzVLCdJ/tl3sTXbwO4hUzQavv5T2iDKMHc1491pe7 2PX9x1OHHUq7BRUoWLpKjSdinba2ymcb6VMIdlctkbsv/f9npNe3ozcvZ6oP0p9GjpahFm gctgvJ4wURntQfLPdJ9U6r8hXr5Rb8K985SyrbsgCL4Ih2WiXET2FfLJ6/v7bFbO84mIcd 2dgAYtJ04cp5odapf8Z5FbRZ70cb6prOIr6u+0Pap32PVt0VfMQ7DzHX9Se/wQ== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1792804706; b=juyqyal392H+DhmPm5fVRf3pGEF52jqB4HZrwtYp0pkjNu34hqiPypoe8//y/6D63F3mdW A/ZpGNgL4aXGsh+079SqLEoc2Evo/bgvNFBnB77Y62g2oQrOE5ViVBVJEPsGqOV0io6Rhm wf3YkRMzT22XgVKBAZLdVMp7iFoIqm/Gl9tjCYRqmcPIBOs2K11BWY8n/eVO7iYYjlpT2f Kt0J7Oot5tTQHTzUBJxBNfnd5GbjhoQ/SQPcvntn2QG+r99oiNhTfXbt55U8kiH59xKFpk 0Lm1xExxZdEMjNHan/0FDhVg9ow0HHLl4XTWa0SrPX2K/gBBPuHuOJGQ4/Ua5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1792804706; 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=u7iPI90td8CCd8FiMMVzR8luFDFyJs7XbYxVXFncwNQ=; b=dlWj38SGaTU0+5LZuPYzsrYWKvsjM6yGIsWxF+g0xFna+pI8/IsTTRZXivLv4wh3Z24uBu 8mPoV8FqkIk+ljHUnVxR9quGN9f1tv7PVk1+YZafjRbOCwFIg8w9NDq4eU6/Zfc+mr71PS dHH61Jk4ECi66QwisWKihp5Pkyos+w6bHG4vmrHuKic5QJFhHxim+YVZ7r0KCMO72UhT6E UCdcs8lxn+QOhqKd6LNA7ITkNmCy+Lg/prQV3aKvDJeoDRLTu8YZ/H+OrTBk3klD5KilGJ w5t8/LqU0aymxlNri24+d5HGS796ywYs7rgRDXmZmm9xT1RmAd6ncs0CKzYYdA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jBMTZ0dZczvSD for ; Sat, 24 Oct 2026 01:18:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 232b7 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 24 Oct 2026 01:18:26 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: 34e8a548786b - stable/14 - loader.efi: devinit() just after parsing args instead List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: Commits to the stable branches of the FreeBSD src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 34e8a548786b1c23a247d6d18d98a585ccee45e1 Auto-Submitted: auto-generated Date: Sat, 24 Oct 2026 01:18:26 +0000 Message-Id: <6adc0762.232b7.df2981@gitrepo.freebsd.org> The branch stable/14 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=34e8a548786b1c23a247d6d18d98a585ccee45e1 commit 34e8a548786b1c23a247d6d18d98a585ccee45e1 Author: Kyle Evans AuthorDate: 2026-10-08 02:16:28 +0000 Commit: Kyle Evans CommitDate: 2026-10-23 02:56:49 +0000 loader.efi: devinit() just after parsing args instead c4640126f1160 ("loader.efi: Apply command-line DHCP overrides earlier") was really good, but moving it just one statement earlier is even better. polarian on Libera describes a GELI setup on a system that doesn't advertise a serial console via ConOut. They don't have serial input at the point that they would get prompted for the GELI passphrase, but if we parse args just before devinit() then he can override the console with `efibootmgr -e`. This gives UEFI one advantage over BIOS loader, as /boot.config isn't available to provide that kind of override if your impediment is GELI. We also considered reading loader.env earlier, but we have a chicken/egg problem in that we must have probed for the ESP to be able to open() it. We would instead need a devinit_early() and devinit_late() scheme that allows GELI probing to be deferred until the later pass, after reading loader.env to pick up the console override. That's an idea I'd still like to discuss because it's more robust than hoping that firmware won't wipe out our efibootmgr(8) entries. Tested by: polarian on Libera Reviewed by: imp (cherry picked from commit 78887369c47fda5707ef72ef46a1c903df5b7cae) --- stand/efi/loader/main.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/stand/efi/loader/main.c b/stand/efi/loader/main.c index 46ce7467f531..d22929d67f07 100644 --- a/stand/efi/loader/main.c +++ b/stand/efi/loader/main.c @@ -1056,8 +1056,6 @@ main(int argc, CHAR16 *argv[]) "failures\n", i); } - devinit(); - /* * Detect console settings two different ways: one via the command * args (eg -h) or via the UEFI ConOut variable. @@ -1068,6 +1066,12 @@ main(int argc, CHAR16 *argv[]) howto |= RB_SERIAL | RB_MULTIPLE; howto &= ~RB_PROBE; + /* + * We want to initialize after giving loader args a chance to elect a + * different console than what we autodetect. + */ + devinit(); + /* * Read additional environment variables from the boot device's * "LoaderEnv" file. Any boot loader environment variable may be set