From nobody Sat Sep 12 18:19:13 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 4hj06p0zXMz6sXF8 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 4hj06n6prgz4qhf 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=1789237154; b=YFVvJt4QODvmGkkEgkPPvSGgxPN/kL+xIPBcn9RG+P+C2qKhsTxYfgqQ83UHVmZBHq0rjW zeJ0V9bzdlwdY5MACfyvBy1HPqlqNVpVJ2BAGJgkgkBJBRUL25HLGlSIv5Bf0vdENTZpsQ GGqe/Nz2YnMOQvaqylDwhgXFEplj0A15gOl2aS2P6pndMnHr0aTC3Mh0gwQ2OVWrbhgzE+ yJZz3pW0T14SVMfHedDVoQcIPBkLld1rUWdMNbCvzrlhsnJlCMOcr9ojeN6M34FGpT5lkt XBJL+c8g8mMwf6vQJzETdpqJqEZUBI8KBnC0GjtNKTbeNcSc56Vm736oIImEAw== ARC-Message-Signature: i=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=DD481kzgxFhrv+LgV1QQFHy1YxZBIhfhXf5QXG+lYATI9Z/es1cUoId9OAwoLNDOJvvZjb 6r6+K1GbyKHYU/9CCEvr6OnUB7mT7TdejqsStCRboN+A2meXYH2tL+uOhqwQ9dSSnRCLsU XQHl6grFocdRnhNnefj7oy0o7o0urnGFtir01xpKxXeuaf+p8Xy9yWskmjibYDXtbz2CrR oTzPYlNUK2obCh/Z3XcHFM51vLscFUb+ouNsjYKVcXC/Zb0o1OG7yWDbg8kpe9KKGDaJ5U 0MCZbiurNukUO4N5Y9cBogM6Pl9Ym4OkMHQ9pPiKZ6EXCxkIWz0ftfIuQuU5SQ== 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 4hj06n5r7Zz17fp 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 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: 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(); /*