From patchwork Tue Sep 30 00:51:30 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 450 Return-Path: X-Original-To: u-boot-concept@u-boot.org Delivered-To: u-boot-concept@u-boot.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1759193558; bh=jp5yni8uEDuBk2Efu0gWtS9RRrE7QsRFN596F3COZZQ=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=e+TR1NxSgTLTLy3JY+sb7AQOmuBf2xLGiKo2IeREYOO/zwOdE9IJ3w5D44h+HoOyL mju2nPCRJI0F3fJSfB+fyYox+VJyo7npOVCP+FMkLGmrTjwGW2B2Efe6tdizLni88u noZU+2vRLGxHueCBoirbzLBi1Kxlm9M3fZT7aIi/1lVLml9oO6vh+tD8LsJdEZNXHp 8kYBd2DZNFegq4zgPJ1CbqLWggIel3Jiss7D2QbTesa5cMnHmIX5Jj8AswkU9DTUo5 MR5Cpgrpfcg/V+74O8ZP98RkHeY36XoSlTAL2gr2eBfGPNJrPcCRsj1LEgAQRVzCiK maJ0E2Tvcfm0g== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id B8B4967E57 for ; Mon, 29 Sep 2025 18:52:38 -0600 (MDT) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id 4LjPfiqhppwU for ; Mon, 29 Sep 2025 18:52:38 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1759193558; bh=jp5yni8uEDuBk2Efu0gWtS9RRrE7QsRFN596F3COZZQ=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=e+TR1NxSgTLTLy3JY+sb7AQOmuBf2xLGiKo2IeREYOO/zwOdE9IJ3w5D44h+HoOyL mju2nPCRJI0F3fJSfB+fyYox+VJyo7npOVCP+FMkLGmrTjwGW2B2Efe6tdizLni88u noZU+2vRLGxHueCBoirbzLBi1Kxlm9M3fZT7aIi/1lVLml9oO6vh+tD8LsJdEZNXHp 8kYBd2DZNFegq4zgPJ1CbqLWggIel3Jiss7D2QbTesa5cMnHmIX5Jj8AswkU9DTUo5 MR5Cpgrpfcg/V+74O8ZP98RkHeY36XoSlTAL2gr2eBfGPNJrPcCRsj1LEgAQRVzCiK maJ0E2Tvcfm0g== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id A899B67B49 for ; Mon, 29 Sep 2025 18:52:38 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1759193556; bh=kDZmp1WMxsV7qfVNuG2Vdz5HB5X0GRcekAfG3ziJj6E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RNlk3R+kLJSjsdVGKU09lvbfLx2F4VF7sAtQSkBbW8sPaNxd0n4wzkvmcKT0XI6Nl J+DlBpdcPyOL8c5bQ+o8EfP9oTlzBGuWUEGqM2kUS4C3N6h7URjAB+uU8yHeLZUpL6 vA6MbEkc84W+V7bR6U98xj2aBIQ1dvGYsdJwzz9oTPSGo5CXUuSpYRXpdwJGFK+stz Br+2FTemi2vkDVGE1kqZdE/mr2mO4RwqiCY3xRB3vrL328cx4LG7CfybUZsFXsNAFe jpbA3p5nRtKv3Sa9ZJvMPtQb8qU4H+leeqCLFb0ukpkALVJUezEiu/RHncLaFpmphR ozM94YBkyb+QA== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 6848E67B49; Mon, 29 Sep 2025 18:52:36 -0600 (MDT) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10026) with ESMTP id xUAYF7PEe4mX; Mon, 29 Sep 2025 18:52:36 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1759193554; bh=xwwA5HqJBpNleDrNUsQprIEwIlNSzjq7H6cGyW7SIMc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TON9tXM4KpDxnmuj76uSxqQoSYPqfFa1Us4az1yGza1SDVF0tCTJ5mHYcZsT2oNw1 myAfpBnCXsE1nqJVu2GeRzy1UPOE4TjMUeGLqR7W29q+u/bdZx1CLGB62wOKx4zfa/ tMSf3BLq4MFIYNafrtRu8kaZ+zNENJLuPP0ZQYP8gGvrcY/XRa6zr0Su0kKWWIEIRk 5ESD7naFxPmLIC6hT5Kc/bO2yLnhAz+MRSXLpTkklbYvORluGucB0aeAlJX7/P+UAr cqTkQsv6Y7Goq7VwGwU1rjkwoGAonWVymDSy3mc4FnZyrWYf5TDylT6bJVFebmTgEt 9aihJ1MgTYTuA== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id A444C5FE1A; Mon, 29 Sep 2025 18:52:34 -0600 (MDT) From: Simon Glass To: U-Boot Concept Date: Mon, 29 Sep 2025 18:51:30 -0600 Message-ID: <20250930005137.3650600-15-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250930005137.3650600-1-sjg@u-boot.org> References: <20250930005137.3650600-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: 24XLNNWZEQHZHMLAMEYZKACQZAOCIN3U X-Message-ID-Hash: 24XLNNWZEQHZHMLAMEYZKACQZAOCIN3U X-MailFrom: sjg@u-boot.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Heinrich Schuchardt , Simon Glass X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 14/15] boot: Run the EFI bootmgr just before network devices List-Id: Discussion and patches related to U-Boot Concept Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Simon Glass At present the EFI bootmgr scans all devices in the system before deciding which one to boot. Ideally it would use the bootstd iterator for this, but in the meantime, give it a lower priority, so it runs just before the network devices. Signed-off-by: Simon Glass --- boot/bootmeth_efi_mgr.c | 1 + test/boot/bootflow.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/boot/bootmeth_efi_mgr.c b/boot/bootmeth_efi_mgr.c index 5e83d1da103..917cec2fe64 100644 --- a/boot/bootmeth_efi_mgr.c +++ b/boot/bootmeth_efi_mgr.c @@ -98,6 +98,7 @@ static int bootmeth_efi_mgr_bind(struct udevice *dev) plat->desc = "EFI bootmgr flow"; plat->flags = BOOTMETHF_GLOBAL; + plat->glob_prio = BOOTDEVP_6_NET_BASE; return 0; } diff --git a/test/boot/bootflow.c b/test/boot/bootflow.c index ceab3c453c4..65e2b5b5c9d 100644 --- a/test/boot/bootflow.c +++ b/test/boot/bootflow.c @@ -495,11 +495,11 @@ static int bootflow_system(struct unit_test_state *uts) ut_assertok(device_probe(dev)); sandbox_set_fake_efi_mgr_dev(dev, true); - /* We should get a single 'bootmgr' method at the start */ + /* We should get a single 'bootmgr' method at the end */ bootstd_clear_glob(); ut_assertok(run_command("bootflow scan -lH", 0)); ut_assert_skip_to_line( - " 0 efi_mgr ready (none) 0 "); + " 1 efi_mgr ready (none) 0 "); ut_assert_skip_to_line("No more bootdevs"); ut_assert_skip_to_line("(2 bootflows, 2 valid)"); ut_assert_console_end();