From patchwork Wed Aug 20 00:40:14 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 7 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=1755650448; bh=as4jPMUB9G/YUCSsf4g21UUlTqRKf90LV7Ml3AWaKSU=; h=From:To:Date:CC:Subject:List-Id:List-Archive:List-Help:List-Owner: List-Post:List-Subscribe:List-Unsubscribe:From; b=Npw3j+Jp3BEDfPcawNWKTsxyhLsW2ajj3z8k5Aj29Y4EedkebGMTcQfLgmKThjqXp u7HkG0NHr4CYvyi3puoPBaYTBqeOQYKTN7PELHOXFB1uvItN0Vn5F/uTX+HG75UQU+ UQEqjzpaY5iUGsARyouuJAc4jBjgOMkS/v8mHR7RLW+x8RNw3C7Zl2z8U5PUXMkLeC ruszuPZ1IyanYrMoF5SITPA4jClAznze0xUUCRymSOY9Yn8cXk3UKKknFNrfnfkGFV 800NAPaZrHmHhv8LRbFYEuKs3pSzBmJiU2hSGxi0C20ciAoq43LSOqlGODNTlesH04 Q+JENDUPs+3iQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 812836764E for ; Tue, 19 Aug 2025 18:40:48 -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 yEsMmPWoiPgv for ; Tue, 19 Aug 2025 18:40:48 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1755650448; bh=as4jPMUB9G/YUCSsf4g21UUlTqRKf90LV7Ml3AWaKSU=; h=From:To:Date:CC:Subject:List-Id:List-Archive:List-Help:List-Owner: List-Post:List-Subscribe:List-Unsubscribe:From; b=Npw3j+Jp3BEDfPcawNWKTsxyhLsW2ajj3z8k5Aj29Y4EedkebGMTcQfLgmKThjqXp u7HkG0NHr4CYvyi3puoPBaYTBqeOQYKTN7PELHOXFB1uvItN0Vn5F/uTX+HG75UQU+ UQEqjzpaY5iUGsARyouuJAc4jBjgOMkS/v8mHR7RLW+x8RNw3C7Zl2z8U5PUXMkLeC ruszuPZ1IyanYrMoF5SITPA4jClAznze0xUUCRymSOY9Yn8cXk3UKKknFNrfnfkGFV 800NAPaZrHmHhv8LRbFYEuKs3pSzBmJiU2hSGxi0C20ciAoq43LSOqlGODNTlesH04 Q+JENDUPs+3iQ== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 6DBBD675CA for ; Tue, 19 Aug 2025 18:40:48 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1755650446; bh=WPXmHj35b0jObksN4r0faEWbrAGZzlkhkccy+6Ij9g8=; h=From:To:Cc:Subject:Date:From; b=cbqhEG2mHsjI/Emwah7cDzLnSwpdRfupBuu4LBwj2k4vgMENJKKEGhFk3/cdDQgKa eLNITbkpZzwTPOkDp/cVfufWycuNGaAbiV6P7jlVgXOvBKtaf65vVy8iOX4O5KpvT7 Sb/u0rvUS+3veTtrnX+vb1pZNNBUe3l4eOTMyA2oGAmT0Zw0aEYOfMZG2MpfIPty2R pNFbCTU92AB3VFbs0tqVB75GN9H0ndHYl8cFtl2JSb28cncin7feb7UOur8BvPLsIQ 56rqFo6xBff6I4CZ4JYjDDLHYCM4dclE4C96suidItIrgh9bP+RImxxU4DLJ3RdKHw mrFaY60wmJpGw== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 85DD3675CA; Tue, 19 Aug 2025 18:40:46 -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 BpS6fT_THjQX; Tue, 19 Aug 2025 18:40:46 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1755650446; bh=erV6tc0JX8nFcFCVPXT1kVsWb1LjbUBHmUK/UtC8naQ=; h=From:To:Cc:Subject:Date:From; b=G+86jcWNmSssz0zxQcatG/qPc2G6vZLz2XG9RAbu4Jjkk+LmY2gdbQvWZmsRT8gZ5 bFiY1QaoQYz4//yR2cfiRAwSPFwNsa8i3V31U/Z31t/dKCUb6nCINcZ3jrIfP+Pgs4 evBIaY/z5VmNo+EMmhHZzOqz12L5nWBZzaFNub7gbt3kokvjGD0AXmJ5codLhrqbO5 NdseJ200ASXK+X+llMFTBPcNFTDvcA4q7VMjS1gxGlymHUYTzXWUmYW8OZCjYr9aHm 5hG49AzxnxsgIQ7rwIxcpCXdpO0FfGxwQyLwSvmEgLEFnYv3UT9pnmhwad0621zfsQ bV/rO05Gjp4nQ== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id E23896749C; Tue, 19 Aug 2025 18:40:45 -0600 (MDT) From: Simon Glass To: U-Boot Concept Date: Tue, 19 Aug 2025 18:40:14 -0600 Message-ID: <20250820004039.3920254-1-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Message-ID-Hash: N4DSWYJ234J5FJHYOU7ALLNVYZ2DX5LH X-Message-ID-Hash: N4DSWYJ234J5FJHYOU7ALLNVYZ2DX5LH 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 00/18] efi: Move towards the EFI app booting EFI applications 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 This series adds various new features to the EFI app, mostly by moving code over from the EFI loader implementation. In particular it adds support for the efidebug command (with only a subset of subcommands so far). The main approach is to make use of the system table (for both the app and the loader) instead of directly calling EFI-loader code. It also includes a few fixes, which likely have no effect but will help to avoid confusion in future. Simon Glass (18): efi: Add missing break statements in dp_size() efi: Add missing break to dp_fill() efi: Update path_uefi() to avoid allowed_unaligned() efi: app: Support the efidebug command efi: app: Support efidebug memmap efi: app: Support efidebug show tables efi: app: Provide easy access to runtime services efi: Move a few helper functions into the common efi/ dir efi: Move some load-options handling into the common dir efi: Move FDT and global-variable GUIDs to common files efi: app: Implement efidebug boot dump efi: app: Find the device-path-to-text protocol on startup efi: app: Implement %pD in the app efi: Move efi_string utilities to the common directory efi: app: Use the same efi_free_pool() signature as loader efi: Move efi_load_option_dp_join() to a common file efi: app: Support efidebug boot add, rm and order efi: doc: Add documentation for efidebug command in the app cmd/Kconfig | 5 +- cmd/efidebug.c | 43 +++++++-- doc/develop/uefi/u-boot_on_efi.rst | 21 +++++ include/efi.h | 20 +++++ include/efi_loader.h | 11 --- lib/efi/Kconfig | 12 ++- lib/efi/Makefile | 3 + lib/efi/device_path.c | 20 +++-- lib/efi/helper.c | 88 +++++++++++++++++++ .../efi_load_options.c => efi/load_options.c} | 0 lib/{efi_loader/efi_string.c => efi/string.c} | 0 lib/efi_client/efi.c | 24 ++++- lib/efi_client/efi_app.c | 9 ++ lib/efi_client/efi_vars.c | 23 +++-- lib/efi_loader/Kconfig | 7 -- lib/efi_loader/Makefile | 2 - lib/efi_loader/efi_boottime.c | 7 +- lib/efi_loader/efi_helper.c | 77 ---------------- 18 files changed, 249 insertions(+), 123 deletions(-) create mode 100644 lib/efi/helper.c rename lib/{efi_loader/efi_load_options.c => efi/load_options.c} (100%) rename lib/{efi_loader/efi_string.c => efi/string.c} (100%)