From patchwork Wed Aug 20 00:40:20 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 44 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=1755650481; bh=1m9k+/9Ie5/9rec7yiElOt4DWF+CHaGZlsjgx0Fx8qw=; 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=UaRKqk4MUjW0sKsI/XyaKgKGehoSaHiqFqv1p+zT8Ye6CeOGL1gBhgcha9OfWiwra vZbTx2a/w28d5x6A9V/UZCuPkzAA0C72kfPC4SQa/mUm42waih85nhfaeKKrPIVaoW VP4gnzZITl7JYHBaUbtlU8FkuBQSfSbQIumfZkvtF1OKZmgGGx3b9nEmnf6vKHE3q7 0/ZNapoEZ8NTNl2s8VZ1g96/gwYJ0NA3fR/tsWF0leLykw94H+TVc12iBJ+H3k0YIa HP4xH7w41/4WRxNXlh6wAjNqWu4wxdhj+XTIsOpxVtWkCN5X0eDarp6YGFOMRYlDxG /bluEClLM0vgw== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 56B726765F for ; Tue, 19 Aug 2025 18:41:21 -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 VTJ2ONx7hY2T for ; Tue, 19 Aug 2025 18:41:21 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1755650481; bh=1m9k+/9Ie5/9rec7yiElOt4DWF+CHaGZlsjgx0Fx8qw=; 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=UaRKqk4MUjW0sKsI/XyaKgKGehoSaHiqFqv1p+zT8Ye6CeOGL1gBhgcha9OfWiwra vZbTx2a/w28d5x6A9V/UZCuPkzAA0C72kfPC4SQa/mUm42waih85nhfaeKKrPIVaoW VP4gnzZITl7JYHBaUbtlU8FkuBQSfSbQIumfZkvtF1OKZmgGGx3b9nEmnf6vKHE3q7 0/ZNapoEZ8NTNl2s8VZ1g96/gwYJ0NA3fR/tsWF0leLykw94H+TVc12iBJ+H3k0YIa HP4xH7w41/4WRxNXlh6wAjNqWu4wxdhj+XTIsOpxVtWkCN5X0eDarp6YGFOMRYlDxG /bluEClLM0vgw== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 151F3675F5 for ; Tue, 19 Aug 2025 18:41:21 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1755650478; bh=RvvZx7OrHkjaLZ0WyDjG7Wb7wOh/Y66KxUZGh+hRFKY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=miK/yubfFJ8+y70A8YH8MVGUgbluL4ZcJiTZd8908j4OO3KWKFJ8Le4lNUiDfocYN xYjrPUeJHUwHlkFJCx4/9dRGWeoZGmkwV8DgISUpRuDMm43Crq+PGCovPP98Pm6kAw pZgEeB1U3bBDr+/q87JOH0yKAWzAuIfFOZVu37KtZ7PKr5b3P24KrexL1K/iQXiHSu 9EwBWadAvvj4p/B4QniYXdHcTm16IF6Sh8zaq/Iazda/w104nADfmlL8DIxYKaDOpG rX1Ini5g6R7ysAYxY0zXNv6W6O3twX1DbYiPmrMle1mk8uFyQiTvC011yvBqaLhaU4 PCLtFoSN6HOpQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id A10546765E; Tue, 19 Aug 2025 18:41:18 -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 0gcLpLrwCqYT; Tue, 19 Aug 2025 18:41:18 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1755650476; bh=PxZn6AhTpaCsDwiDM1O8ECLxctZr8F+/umzGpdyoUSE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RENaaWH2kRVPed+YzYOlWTBesp1BcYpWZX2RTD/A78W6TS2xv+twBPp1jgJo1qmW5 878QG6Ip7omh4XeFRMsSodabB7gwwccFe7KQ5ZVaezd+J8snn8g9+wkLECCtTLJdvl 1qolL3KIQmj2Eb0gKDG88BTguHtQQCcRXojQ0rDgPly4SsUZ6mzRAXZCCUFE8a6OOI ELo8QJNyOqScI+JMB5kyk3TugIhW5zYBOMsziJgIjFzAkn76grQNAXkYC0G4fF9ufe nNpqAw+FC05dZLFZjoLdOY7s+diMiyrmupkLmCGaF0SsHVkjaJXx80WePlvGEs3en3 3e5P7C5EhjZdQ== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 5A8E9675DE; Tue, 19 Aug 2025 18:41:16 -0600 (MDT) From: Simon Glass To: U-Boot Concept Date: Tue, 19 Aug 2025 18:40:20 -0600 Message-ID: <20250820004039.3920254-7-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250820004039.3920254-1-sjg@u-boot.org> References: <20250820004039.3920254-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: NLZLKGJ6QR5K64AXX4H5QEWYNZZEHO7Y X-Message-ID-Hash: NLZLKGJ6QR5K64AXX4H5QEWYNZZEHO7Y 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 06/18] efi: app: Support efidebug show tables 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 It is useful to be able to see the available tables in the app, so enable this subcommand. Provide an implementation of efi_get_sys_table() that works for the EFI loader. Signed-off-by: Simon Glass --- cmd/efidebug.c | 5 +---- lib/efi_loader/efi_boottime.c | 5 +++++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/cmd/efidebug.c b/cmd/efidebug.c index d93fa43b779..2f1fecf494a 100644 --- a/cmd/efidebug.c +++ b/cmd/efidebug.c @@ -727,10 +727,7 @@ static int do_efi_show_memmap(struct cmd_tbl *cmdtp, int flag, static int do_efi_show_tables(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { - if (app_not_supported("show tables")) - return CMD_RET_FAILURE; - - efi_show_tables(&systab); + efi_show_tables(efi_get_sys_table()); return CMD_RET_SUCCESS; } diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c index cc711a5c52f..8ba42ec4544 100644 --- a/lib/efi_loader/efi_boottime.c +++ b/lib/efi_loader/efi_boottime.c @@ -4026,3 +4026,8 @@ efi_status_t efi_initialize_system_table(void) return ret; } + +struct efi_system_table *efi_get_sys_table(void) +{ + return &systab; +}