From nobody Fri Jun 26 14:59: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 4gmzN76HQhz6jctj for ; Fri, 26 Jun 2026 14:59:19 +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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gmzN72w6Hz3dQq for ; Fri, 26 Jun 2026 14:59:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1782485959; 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=nbAv577cdNxoaBSJQ/AviBwmuai/vK/iRTKnTTTv+uc=; b=s9g/vDRik8Him2h1HrjpTqWsr1+yOtPFixf8Hh6RtkU58sYSuu41O7+q3r8FNxUAAI02T8 MQHhAaXhN8IWFw7rWwVgbVhpYUH4BWt8BrdAJC0N3rSL56h+y1rl2CgklmRah/bGpPRtNW AvngU1bLY7z1e/4hjcCkMRMTSvxbzPeQ//HPQLhg4NpOxD/H/KQpkOwVZk24s5N7QcDjkl uxAQdgnF2w1H9aGYxGn7NEpgbOewgepM0kxhD6suUOK8gmxdiLKyzSDiuPA/YNnwiFtZ6k /1gDphTTZ9RDDDaOOor3XVXJoxhy3lQuyc6tz920CS+c0ri+k/m5vWdkulE5BA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1782485959; a=rsa-sha256; cv=none; b=qkRIWHFzQVI4yv9RGOY7KpSmX89CwHnlO/pIoNLmhPYExDtGTKwRXFy7dQFbY2FRCZ9Pug CkkCdDCaOlq65M47VXtfjjHMT7u9JXfJRl371sd4eKuDFD4358/mYU8gNTKzKycwXqGpT4 +xBcqaZwdRs24Ry/utzrIKRzrbhDqpwoJqkxFAY0RJ3VvNQOpJeuYXiEZLwBGLtP0PQ+UU CXc1aU5f9U5G+JTCvzkHVav2KzUfQX59ivU/e5N80C1l6YckJOx19m3Ve5Hwj+J1pLDluF 4PZ2YMHpKPF4mU9rMirqJLhFemHt47AoBZHL1M/vNT8UJbjiLb6Ivv27N3MAiQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1782485959; 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=nbAv577cdNxoaBSJQ/AviBwmuai/vK/iRTKnTTTv+uc=; b=uOoCyIOAcUhVwjC1KYsAJroihT6Hz0M7rstg041i8sf/03QNHmWCxFrk7E6RdMFeKFfZTt eYn+q1fhqqKuIp4Ho9em1Su5xJicAXB8rnrmuI5hHf6VhEsSC0hIfDc8tRQH4FvVM2t7+Y 62cNJ69u6wYK9GOABpk7gUnPDvQslTDEl05zI6RwbD0XIRH7cD8GDc6UyaggWtQ3rS7W/v LjjAS8Zx2jbHOLSPBR91KI3Q4objZH4sAPpjOS6QX31QRiQ/cS0MXB/OW1Hogq21TVVafQ Irknf6zKhhsGcblvdQhzC77Vxxyaq9wyPv8vhQk/SsQdsJ8WTkZRiVQzICSwWA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gmzN71yJszhy0 for ; Fri, 26 Jun 2026 14:59:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 216ee by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 26 Jun 2026 14:59:13 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 1e49aa7a984e - main - loader.efi: Add comments describing the boot protocol 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: 1e49aa7a984e0d4381538aa6cf16d37b20b000b9 Auto-Submitted: auto-generated Date: Fri, 26 Jun 2026 14:59:13 +0000 Message-Id: <6a3e93c1.216ee.6ad1e87f@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=1e49aa7a984e0d4381538aa6cf16d37b20b000b9 commit 1e49aa7a984e0d4381538aa6cf16d37b20b000b9 Author: Warner Losh AuthorDate: 2026-06-26 14:45:31 +0000 Commit: Warner Losh CommitDate: 2026-06-26 14:54:35 +0000 loader.efi: Add comments describing the boot protocol Add some comments about the boot protocol. Need to do a deeper dive into the networking code since it's the last set of code used here. Signed-off-by: Warner Losh Differential Revision: https://reviews.freebsd.org/D57800 --- stand/efi/loader/main.c | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/stand/efi/loader/main.c b/stand/efi/loader/main.c index 1444b1eee17d..1d91c8dd26ac 100644 --- a/stand/efi/loader/main.c +++ b/stand/efi/loader/main.c @@ -641,17 +641,24 @@ find_currdev(bool do_bootmgr, char *boot_info, size_t boot_info_sz) #ifdef MD_IMAGE_SIZE /* - * If there is an embedded MD, try to use that. + * Forth choice: If there is an embedded MD, try to use that. */ printf("Trying MD\n"); if (probe_md_currdev()) return (0); #endif /* MD_IMAGE_SIZE */ + /* + * Fifth choice: try all the partitions on the boot device. + */ if (try_boot_device_partitions() == 0) return (0); #ifdef EFI_ZFS_BOOT + /* + * Sixth Choice: Probe the boot disk for ZFS and then probe the non-boot + * disk if we have a relaxed boot poluicy. + */ { zfsinfo_list_t *zfsinfo = efizfs_get_zfsinfo_list(); zfsinfo_t *zi; @@ -686,8 +693,8 @@ find_currdev(bool do_bootmgr, char *boot_info, size_t boot_info_sz) #endif /* EFI_ZFS_BOOT */ /* - * Try the device handle from our loaded image first. If that - * fails, use the device path from the loaded image and see if + * Seventh choice: Try the device handle from our loaded image first. + * If that fails, use the device path from the loaded image and see if * any of the nodes in that path match one of the enumerated * handles. Currently, this handle list is only for netboot. */ @@ -697,6 +704,12 @@ find_currdev(bool do_bootmgr, char *boot_info, size_t boot_info_sz) return (0); } + /* + * Eighth choice: look up the device handle... This loops through the + * entries to find the device handle. The network protocols have long + * strings of device nodes in the device path, and this may make + * something work. + */ copy = NULL; devpath = efi_lookup_image_devpath(IH); while (devpath != NULL) { @@ -1256,7 +1269,7 @@ main(int argc, CHAR16 *argv[]) #endif /* Get our loaded image protocol interface structure. */ - (void) OpenProtocolByHandle(IH, &imgid, (void **)&boot_img); + (void)OpenProtocolByHandle(IH, &imgid, (void **)&boot_img); /* Report the RSDP early. */ acpi_detect();