From nobody Thu Oct 08 02:16:38 2026 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 4j0YXC4XtCz6jsdp for ; Thu, 08 Oct 2026 02:16:43 +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 "YR2" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4j0YXC42mGz4LPc for ; Thu, 08 Oct 2026 02:16:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1791425803; 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=qTffhfdSd77DIxmHxOOFLxN//IDaH0mw8ktqtEwEZL4=; b=g6YxAtT0ZrqPID+IiMqpq0azkJQNuQ5EHvQMONdm4Wr3d+fnf4AefT9CsLQzkbhmbq+Qt6 noZDnIGmeY4eHR88TafJJBgfYsN+WZyWplVVxOC8M7Nh4cv1A1kenZ+hoUPMoHaN7BF64j eLRiuCbSRM+mB6gGdv+XfBRsQt/GmF/SwtcZgR2lsnhQikP58X3B4OFn+klr6PCrHyH9zW Hx7K1frnh968WBCXbMU/QxUk8Dli7w0Y+zdy9KQkGTVKO3RKVL2RltvoAVlWbQUaj8f9y6 5kgNvQwySelysmn58iZRiSfX0waU8Gl+Qz/XPD+FCWg/jbsICNTNG9lX2b6eDA== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1791425803; b=UgREE7BqlS+CJM7WMnlnhvIm7MKQ9pWgujMtv2MNVBIcMmlnwq+RCog25oZyDMD0UzRXBn eaNu+chAXE6O3OZfaASXiP0J8i/YVmySh9qyJt7s/8UK6044Ws/MpUuXJ6iLz2AihHtsa5 cdaE+kDNI4PizRPahThdSt6XWIFhpLqvpmKgFlw5zkwO4fVwTimggO6SSX+smWiOUpqwqH 7Zp3OMhogj3O8/8tgzYQChqOHglMbRUWsHVGsSGxfhv5HCBzQfIja4xEgAK4ROdAm0fOHl az7stzNAefoGS+RjzTujxQFKPM8I1tUKXos2CZ0iWlsnq+4+yF2T3VbBVnhfyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1791425803; 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=qTffhfdSd77DIxmHxOOFLxN//IDaH0mw8ktqtEwEZL4=; b=ZPz/r8S338bPv6Qg8GQEwpQ6IYC6nd3lI8BiJ1HN38jVBKsTDG7EuxzuK8V7gU4rDu+NSj z0AWwdW9rVjZTtAwt9VZG/CILBHKRlRko+BTcDN/sOYvYCoZE/T3UZph9WN1keMMSiQnjK n3qb1HSKlZ9NqtyE7Qkl/ZUCc7xtXdOiGvoh4qWiG0wWBUVqA0ic0+f9wruhA4rZynXZ8A W6DK6R0PJoQb7LA8BucmiduV/HXpxy8gvE2Um3X1jYJdgB+YZQ4XCEEsYmtIozWICSaJ9C paZsGdaZWYNYzyLxB80Tsx4JFRwkJn4weTanjzFo5jAzR/jtNPIQfduurAHy7w== 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 4j0YXC2qfzzJdg for ; Thu, 08 Oct 2026 02:16:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2115c by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 08 Oct 2026 02:16:38 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: 78887369c47f - main - loader.efi: devinit() just after parsing args instead 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: 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/main X-Git-Reftype: branch X-Git-Commit: 78887369c47fda5707ef72ef46a1c903df5b7cae Auto-Submitted: auto-generated Date: Thu, 08 Oct 2026 02:16:38 +0000 Message-Id: <6ac6fd06.2115c.4b1f8d58@gitrepo.freebsd.org> The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=78887369c47fda5707ef72ef46a1c903df5b7cae commit 78887369c47fda5707ef72ef46a1c903df5b7cae Author: Kyle Evans AuthorDate: 2026-10-08 02:16:28 +0000 Commit: Kyle Evans CommitDate: 2026-10-08 02:16:28 +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 Differential Revision: https://reviews.freebsd.org/D60449 --- stand/efi/loader/main.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/stand/efi/loader/main.c b/stand/efi/loader/main.c index bfb221ee80f5..bac8cab552f5 100644 --- a/stand/efi/loader/main.c +++ b/stand/efi/loader/main.c @@ -1380,14 +1380,20 @@ main(int argc, CHAR16 *argv[]) */ efiblk_memdisk_preload(); - devinit(); - /* * Parse command line arguments before any operation that may configure * the network so DHCP overrides are available on the first attempt. */ howto = parse_args(argc, argv); + /* + * We want to initialize after giving loader args a chance to elect a + * different console than what we autodetect, but we need efinet to + * have initialized before netbooting an initmd has any chance of + * working. + */ + devinit(); + /* * If we didn't find a ipxe image, and we're netbooting, try to * download an initmd that the dhcp server tells us about.