From patchwork Fri Feb 13 21:17:35 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1859 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=1771017493; bh=QR/PMeprVl4xBefJNmmsNS5eww4BY3TnMUOdgnP8Me4=; 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=vRNDOIshbSvnRRH19X0dvNI1UWe0sihTlTBIgOzseZITDwa6AKTPlo1ljXg3sneBW 7YSwoJRb4BbLV5L/ZuWLpc7QYTKndKt2gik/+e670gPa4V5uDXMhIESJHoTHKBEQKj JuHtRCb0a5sYr2NzWZ6GjjQPj9UXO8rwAwjDz9iorngpjmkA1OAu5vGXq1SN2B3DN5 HBRTLfLVpuEaZDQb9T9nXXsxlZFcYKN0CAGjGIdr48y1AtzxsA/rhxPIlhDJD8Ws/h OgXBpcRsTOLaNW3OU9e7yyyTYKhOvnVF7cH8eA9KNPhdhnaRXJXeyoz4bZsa5o7G9X BCkePUigqs7tQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 05EB469B47 for ; Fri, 13 Feb 2026 14:18:13 -0700 (MST) 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 pzbW9UkDW0aE for ; Fri, 13 Feb 2026 14:18:12 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1771017492; bh=QR/PMeprVl4xBefJNmmsNS5eww4BY3TnMUOdgnP8Me4=; 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=G+4e9fUFO8tNRhyiAj5AO5D/5+ucx4uT2i69u+r3wvQ3VAWtmgiubxmtc40qgOQDf RSCx22vXS1jP6U/OkP81yC0wfhpcjmOXGnCVOHjeNvb9C4tVfNqiHZfO304axyDByg z8LfLiFoq895l5+/aW3pQnOjo1T0PnQY+mlDLeKP8ZWjl1mitOA54m9jc8lI/8KZtJ LwLXEeuXyG61wA3lr/44fwu15oghNL4Ha6XZDBg5icakVK6PD6cuUUiEGImVoM+tiN b+XlcSn/iaq2NIWyS2cG7s0XPy7ImPa67E3HUfT6Kifst5IhxGKA+l0fz5QJ7eGQaO 6N587zZSojUtQ== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id EA54569B3D for ; Fri, 13 Feb 2026 14:18:12 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1771017490; bh=0vwkdPKX+YqWBDXsjPK7arQnQTxj5MiQ2IA2p+/s2dU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MIWARd2dACCsYL3WN0ORwE8gmIxX5Pdj/xvL0TEPsWjEQMn60C2mTrkZWbrYfZ7f1 2ChExQb16zboSttqZgwOYcSr8Ss9HBfxhyIwu1TdgIdq03PnHZh5/7lcMrtquQnkvu yQlGJj1O0fIqDMeze9wThuxP1/xu9meY2on+jR4DpLYd/L1QipmoFwz8M3XSju4FJi l0SZD7jObd5T61gF2PhxqjHSrXYyId6tQsErAfWi5qe5QEcO86XipMuRxt36QZgsIf biz/h+11sgXD7WbAel9SsDAAruMWjYBf6StbPK6ofkU9gn+KBXJ+mU6ElukILqXpt+ yYzQGzGkO7tEA== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id ED71269B3D; Fri, 13 Feb 2026 14:18:10 -0700 (MST) 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 k7W8ZH4xUeli; Fri, 13 Feb 2026 14:18:10 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1771017486; bh=e78pkU8mvqDIRf/YqHbM8GZBf7U4Q6jIO7wXYOAaTFA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=p3+FnJ9QWG2EI/SbNiS9nnbWeO5c/ZRLozw0Omi6pYxQpw1X3R9YicwvFCm9syjp2 kIZPz1fE88zKkxftbY/yLjuxqNRlQrhUZKVwRbrwM8g2OlZss9SvcigGookYiabQiQ T4I7gHXO+C0V4Gn3x+jDwUYSLYaqChPkhz6Lyt391lgcKQi9kRMnSEzqfDt+3KHs0q 2kC+ri8i4EBhIoYdpiNxtLs8YB1PD8VpJQeai50fVGMtzKj+BP2lWuR2ZHwn8COE5m hamQJDodWoMb4qyr5wM7fYWkRShpklgS8Ak/5jAEbSYSHzYI7P+pkDKVvJl1ApZvfG hqwg3bzVCfC2w== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 0E3A369A62; Fri, 13 Feb 2026 14:18:06 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Fri, 13 Feb 2026 14:17:35 -0700 Message-ID: <20260213211739.381127-5-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260213211739.381127-1-sjg@u-boot.org> References: <20260213211739.381127-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: TEXPW5RGLFGJZIZNNL4PZAFU6EPQ3DQ6 X-Message-ID-Hash: TEXPW5RGLFGJZIZNNL4PZAFU6EPQ3DQ6 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: Simon Glass , "Claude Opus 4 . 6" X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 4/5] doc: bootstd: Add docs for EFI boot-manager bootmeth 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 The EFI boot-manager bootmeth is listed in the overview but has no dedicated page. Add one describing its global nature, BootOrder-based discovery and delegation to efi_bootmgr_run() for booting. Co-developed-by: Claude Opus 4.6 Signed-off-by: Simon Glass --- doc/develop/bootstd/efi_mgr.rst | 29 +++++++++++++++++++++++++++++ doc/develop/bootstd/index.rst | 1 + doc/develop/bootstd/overview.rst | 2 +- doc/develop/uefi/uefi.rst | 3 +++ 4 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 doc/develop/bootstd/efi_mgr.rst diff --git a/doc/develop/bootstd/efi_mgr.rst b/doc/develop/bootstd/efi_mgr.rst new file mode 100644 index 00000000000..c45840906d6 --- /dev/null +++ b/doc/develop/bootstd/efi_mgr.rst @@ -0,0 +1,29 @@ +.. SPDX-License-Identifier: GPL-2.0+: + +EFI Boot Manager Bootmeth +========================= + +The EFI boot-manager bootmeth delegates boot-device selection to the UEFI boot +manager. Rather than scanning filesystems for a specific binary, it checks +whether a ``BootOrder`` EFI variable exists and, if so, marks the bootflow as +ready. + +This is a global bootmeth: it is not tied to a particular bootdev but is +invoked once during each scan. The ``BOOTMETHF_GLOBAL`` flag is set at bind +time, and the global priority is ``BOOTDEVP_6_NET_BASE`` so that it runs just +before very slow devices, giving filesystem-based methods a chance to complete +first. + +During discovery, ``efi_mgr_read_bootflow()`` initialises the EFI object list +and looks up the ``BootOrder`` variable. If the variable is present the +bootflow is marked ready; otherwise the method is skipped. + +At boot time, ``efi_mgr_boot()`` calls ``efi_bootmgr_run()`` which walks the +``BootOrder`` list and launches the first viable EFI application. No file +loading is done by the bootmeth itself. + +The compatible string "u-boot,efi-bootmgr" is used for the driver. It is +present if `CONFIG_BOOTMETH_EFI_BOOTMGR` is enabled. + +See :doc:`/develop/uefi/uefi` for general UEFI implementation details and +:doc:`/usage/cmd/eficonfig` for configuring boot entries. diff --git a/doc/develop/bootstd/index.rst b/doc/develop/bootstd/index.rst index bbdcb154724..9f958da62de 100644 --- a/doc/develop/bootstd/index.rst +++ b/doc/develop/bootstd/index.rst @@ -11,6 +11,7 @@ Standard Boot pxelinux bls efi + efi_mgr pxe_api qfw android diff --git a/doc/develop/bootstd/overview.rst b/doc/develop/bootstd/overview.rst index 60ba247e005..0bcf988a458 100644 --- a/doc/develop/bootstd/overview.rst +++ b/doc/develop/bootstd/overview.rst @@ -441,7 +441,7 @@ Bootmeth drivers are provided for booting from various media: - :doc:`BLS ` Boot Loader Specification Type #1 entries - :doc:`ChromiumOS ` ChromiumOS boot from a disk - :doc:`EFI ` boot using bootefi from disk or network - - EFI boot using boot manager + - :doc:`EFI boot manager ` using UEFI BootOrder variables - :doc:`extlinux / syslinux ` boot from a storage device - :doc:`extlinux / syslinux ` boot from a network (PXE) - :doc:`sandbox ` used only for testing diff --git a/doc/develop/uefi/uefi.rst b/doc/develop/uefi/uefi.rst index a5131fa2d49..118b6411d05 100644 --- a/doc/develop/uefi/uefi.rst +++ b/doc/develop/uefi/uefi.rst @@ -666,6 +666,9 @@ UEFI variables. Booting according to these variables is possible via:: bootefi bootmgr [fdt address] +See :doc:`/develop/bootstd/efi_mgr` for how standard boot integrates the +EFI boot manager. + As of U-Boot v2020.10 UEFI variables cannot be set at runtime. The U-Boot command 'efidebug' can be used to set the variables.