From nobody Fri Sep 11 05:04:20 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 4hh2X46Vxfz6rbGm for ; Fri, 11 Sep 2026 05:04:20 +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 4hh2X446xBz4BKq for ; Fri, 11 Sep 2026 05:04:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1789103060; 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=IV3gXPwQRJztoiLyyoWcErsHLlRNZju/SEPFlz14eQE=; b=kwQNeKFdFLAIhmbLqa/TbqfA2s/M6raOD4K6kP2nyOboRf122iuHOpcBf5/vSYc1/PNpsL Exx3kDlr42ZqhLhtRQF3SY4QwFp6QVi65PYOJX/ItwCtZlG1sdEY6GOyURebwbrktqqTeh HSpzXC6/J6VYcZyCNwgT4z/GiBOxdtQY0WP4rh5IuK4c1iiqxkHFgMaD3WvIKrLyfRqHgt oh9qDYMQgKGcin6NWGN9dDCJzntQw95ZKorq7MWV7H0Rvao2L1lX8AymfYmzOS/hLPyFYm OLtozwGbxvAEZulgsLaMOC09RW3Z+MCD6nXqQri5GHKf4CRNTPFFwgodtqxwgw== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1789103060; b=y1vaoPYjsuic/zzPDj8Pu0YMAS3l9TZsNGtFwOLskDC1RCve9owMS68E9FxygRfBW5Goob 15e1hlpXIXACEE5pH4JAGfjQMRn0HmP7H7U+exFGwxyigmkS0uVCrsGHVdPGR6pCNa72hJ DHVun595DC1KYnLHth2XePNbMc86S2j6vffvFu27A9Y8J9ZMNuqhikwVF+j/nb8gD3cBWC d8OxNSfGwuQp2GViA52TmUysqCw0S6rV9pn7dsPgx81Ndr+OPiqQDJl13CnPC/RY2j2X6a ev0HY+age/YH/P8oQhFvyAWXn+AG1+/8+mfUYh+/tDMz7B+RtbU9Tg3WMr6GGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1789103060; 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=IV3gXPwQRJztoiLyyoWcErsHLlRNZju/SEPFlz14eQE=; b=PyYoSAwWSER9BiPlq5T+J2OFVhmRF/08vAPir4xl7sLYqBgeuxL/NxedW3rDmTUPp2mdFF QzHAbJJKedfDAzx5scI0z8bLwrLld9NDxIl4ZJ/olLaBHyreYWCLgUVqjtnClTKo7U+Aw9 Kb+xKPb95AikrhcLLq/mfG6gZEj1eRtMuvdrbWhYAkNCUHGj9ZAInRHyj1Jwwj21/pKKdj tyq5gG594RVV5m0/E+9pWfXADFx7nBxbyh0pi+eM3R6Hfc6KuiIMK11xlQ77WmiQVSpJqd v1f8a9FdbH3qR4v65TEQugMJAD9Q0uAiD1N8zXYUrWfUCDYZWTzAuAsLjvG10w== 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 4hh2X41Bb4z10TM for ; Fri, 11 Sep 2026 05:04:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3b162 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 11 Sep 2026 05:04:20 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 69d1595ded95 - main - loader.efi: Move probing the md up to before doing bootmgr 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: 69d1595ded957137ee103a385ca4056cc1d30d5a Auto-Submitted: auto-generated Date: Fri, 11 Sep 2026 05:04:20 +0000 Message-Id: <6aa38bd4.3b162.347fed4d@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=69d1595ded957137ee103a385ca4056cc1d30d5a commit 69d1595ded957137ee103a385ca4056cc1d30d5a Author: Warner Losh AuthorDate: 2026-09-11 04:13:19 +0000 Commit: Warner Losh CommitDate: 2026-09-11 04:15:27 +0000 loader.efi: Move probing the md up to before doing bootmgr When someone has loaded a ram disk, that's a stronger hint about what to boot than the UEFI boot manager. Prefer it and rework a little the #ifdefs to reduce their number. Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D59419 --- stand/efi/loader/conf.c | 6 +----- stand/efi/loader/main.c | 25 +++++++++++-------------- 2 files changed, 12 insertions(+), 19 deletions(-) diff --git a/stand/efi/loader/conf.c b/stand/efi/loader/conf.c index 30d9b95739e8..f0183c9861f1 100644 --- a/stand/efi/loader/conf.c +++ b/stand/efi/loader/conf.c @@ -32,10 +32,6 @@ extern struct devsw vdisk_dev; -#ifdef MD_IMAGE_SIZE -extern struct devsw md_dev; -#endif - struct devsw *devsw[] = { &efipart_fddev, &efipart_cddev, @@ -48,7 +44,7 @@ struct devsw *devsw[] = { #ifdef EFI_ZFS_BOOT &zfs_dev, #endif -#ifdef MD_IMAGE_SIZE +#if defined(LOADER_MD_SUPPORT) &md_dev, #endif NULL diff --git a/stand/efi/loader/main.c b/stand/efi/loader/main.c index 891ae198a13f..fa551e6fb742 100644 --- a/stand/efi/loader/main.c +++ b/stand/efi/loader/main.c @@ -324,12 +324,10 @@ probe_zfs_currdev(uint64_t guid) } #endif -#ifdef MD_IMAGE_SIZE -extern struct devsw md_dev; - static bool probe_md_currdev(void) { +#ifdef LOADER_MD_SUPPORT bool rv; set_currdev_devsw(&md_dev, 0); @@ -337,8 +335,10 @@ probe_md_currdev(void) if (!rv) printf("MD not present\n"); return (rv); -} +#else + return (false); #endif +} /* * Try the passed in partition or entire disk to see if we can find a bootable @@ -646,7 +646,13 @@ find_currdev(bool do_bootmgr, char *boot_info, size_t boot_info_sz) } while (0); /* - * Third choice: If we can find out image boot_info, and there's + * Third choice: If there is an MD device, try to use that. + */ + if (probe_md_currdev()) + return (0); + + /* + * Forth choice: If we can find out image boot_info, and there's * a follow-on boot image in that boot_info, use that. In this * case root will be the partition specified in that image and * we'll load the kernel specified by the file path. Should there @@ -664,15 +670,6 @@ find_currdev(bool do_bootmgr, char *boot_info, size_t boot_info_sz) } /* Nothing specified, try normal match */ } -#ifdef MD_IMAGE_SIZE - /* - * Forth choice: If there is an embedded MD, try to use that. - */ - printf("Trying configured MD\n"); - if (probe_md_currdev()) - return (0); -#endif /* MD_IMAGE_SIZE */ - /* * Fifth choice: try all the partitions on the boot device. */