From nobody Sat Sep 12 18:19:13 2026 X-Original-To: dev-commits-src-main@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 4hj06p0zWwz6sX6Y for ; Sat, 12 Sep 2026 18:19:14 +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 4hj06n6nn8z4qVv for ; Sat, 12 Sep 2026 18:19:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1789237154; 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=SMKYa5i1cCRb8/7sIZ02DjyTFJor/6gjoZGf40sWC4U=; b=sFyXd7AdAFyF9b1IY8YhPl5Eoaa0jTEbi5JsjVaZl5zk+UTvWl9dWPKoRbVh9OTdKR9k3Q MP/R2+UHbjctfKSUQ5vezud3aKhduqn5Aj/ZrEeHyT1GltntG0g/xqOr5JgkneIACV6udf NYM/frNq789TxlEtMHrjJrmsSWMfoGpXTWH+ATUPFqIkYaHV/ULFjtkQq55VHJ7/LCZ7G5 +iqZOwlS0OQaxnSDKn6mS1w+HhfGivxM73toQslr2ybhYrVRfXUyeoii42yBYPyKH1coHh W+61TVwjCVKW1xPNxOnSKQlYOOb1VGqkt9xIZKEg0YnBlDiTcWWdKUkCC+VPJQ== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1789237153; b=gIkWiU1N9tw3sKBW/011ZKtt6pzD9WQbfsx3ncA6CqakcAP7rCgg5Ian24R10AH/y3o3bd VcrpteGHUMpRBhNkPTDc0Dvtm8UoPKZHeCttudeRrJ4pCHzpwbVo/YVREdMqV17ubeWxz0 ThY5Zbojpnu3h1MCQuSoC7qRSWYffGkZZBOErHkrH+sLdvmBATU2Y7SvpUN9vUvrv9Td12 ESdM2ToP9KQ2zoXomNV8DWMxn3pEe/hwS1K0cYKe5FEVRrjjEQNK/LWEPU3d7kxXy5ZEwh 676SrCXfMMB4gtnIeUban+U3eLeLpmvXk4rrdFeYFxYxwkbUGTJZL9LtiZJHeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1789237153; 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=SMKYa5i1cCRb8/7sIZ02DjyTFJor/6gjoZGf40sWC4U=; b=jk+xi5eAt940QE+KsCaHPPQ64kLuAugZUDafzSn1JQSwPpaO5vRUbGdIlfBaqn9467dmhC HIJCpCfibEWWdFAsA+8F9KZk4JTjBpmIP9chLtZ57xIZOvUminHHheC9nYYL2EMuZyoN58 eu+LrjLJlPSelKf8/6ulo2ryHkAzFAL/jBaYhUFOUqADbrvrFyPmuFM7kiUodXTvP1KZdl BwkMZ13QrL3CMI5EXoJW3Y5tNBNC2IssTC2g1sv3KZKwgMz2XAZM6kNgRK6HZVZp3Jmx7Q RhA/rWTX2IEzurGs02B4N5Ld0GeZ76T0IUI5/4vf+lSfjOEbIojmFkDnKyinpg== 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 4hj06n5r6Fz1835 for ; Sat, 12 Sep 2026 18:19:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 45f6c by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 12 Sep 2026 18:19:13 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 197df29edb39 - main - loader.efi: Only try to download md if we're netbooting List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 197df29edb39782464276701f8fd9891793d4979 Auto-Submitted: auto-generated Date: Sat, 12 Sep 2026 18:19:13 +0000 Message-Id: <6aa597a1.45f6c.36a1aa09@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=197df29edb39782464276701f8fd9891793d4979 commit 197df29edb39782464276701f8fd9891793d4979 Author: Warner Losh AuthorDate: 2026-09-11 16:05:16 +0000 Commit: Warner Losh CommitDate: 2026-09-12 16:59:17 +0000 loader.efi: Only try to download md if we're netbooting The only possible time we could download the initmd that the dhcp server told us about is if we're netbooting. So only attempt to do that if the load device for loader.efi is a network. IF you are booting off disk and then need to snag an initmd off the network, that's a different path, and wouldn't need to necessarily do a dhcp exchange, except to get the IP address. Sponsored by: Netflix --- stand/efi/loader/main.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/stand/efi/loader/main.c b/stand/efi/loader/main.c index 95aa64191fe5..488e3eb1100b 100644 --- a/stand/efi/loader/main.c +++ b/stand/efi/loader/main.c @@ -1273,6 +1273,16 @@ set_boot_policy(void) policy, policy_map[boot_policy]); } +static bool +is_efi_netboot(void) +{ + EFI_DEVICE_PATH *devpath; + uint8_t mac[6]; + + devpath = efi_lookup_devpath(boot_img->DeviceHandle); + return (efi_devpath_get_mac(devpath, mac)); +} + EFI_STATUS main(int argc, CHAR16 *argv[]) { @@ -1360,7 +1370,12 @@ main(int argc, CHAR16 *argv[]) efiblk_memdisk_preload(); devinit(); - if (!has_ipxe) + + /* + * If we didn't find a ipxe image, and we're netbooting, try to + * download an initmd that the dhcp server tells us about. + */ + if (!has_ipxe && is_efi_netboot()) maybe_download_initmd(); /*