From patchwork Wed Aug 20 14:46:07 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 83 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=1755701218; bh=W89LOPRu+YTAd2xiZWBApprB+GvDKfdTiMpAHeSrpKY=; 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=Eq26cxNkp9H21SQxjNVkAk1yK3IF4wDycOooxeOBkL/7lo0AUvRI/AP46LlpLPDJA nl7KWmWsDzVWG9+kG3bRAMQInatayDD+ZMvoaATbwCBZrp4ar+apNb/ks5jD2xi3Ic cqTv3hTx4L3N1sf0Mr1dCOUPEGTbKVQ1HrSVmrVKRfQ6ROSSmAP9plPa4iWeCTdiLa 7HVA+Rw0pKz3sFzNyoM1eX4nLUJdZbEzV2fPjobOuC0iXjhVei7V8wI3zWKqnS7Gxx lNBAUoJQj60DP7J2QW1dLkJiukhUKlTAud1gQw+YEh+ickVInIX9/z+4CYVGZW/bMC DQ3igSkEuqXhg== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id CA31B6768B for ; Wed, 20 Aug 2025 08:46:58 -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 ldP8Z8o_-5h2 for ; Wed, 20 Aug 2025 08:46:58 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1755701215; bh=W89LOPRu+YTAd2xiZWBApprB+GvDKfdTiMpAHeSrpKY=; 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=WRoWe3absm+/Gk0JKCSxXqLqNMUv6dulbY/u58PuoTqk16/Go80sDiYp17O3ESD8m q4Kd4H9iBwRJzefN5uIAPMG/K4KL4tCp696E6aWwGro8WTH3u0OyZXRpPJhbmR3w1z i8GcaDI0+zJpOiKrFH54l71Hz5D8QLGhOFTSOA6Y1410xrS7gQj3SvcXucto0eXG2+ 5IVk6EFKbVZE88LG+mCbbeppBumQmeOdhp4OgKfn9LWiPcpqlYW/YoEX429MAONm/u cBJSxtf1xybJ+arxY1pGoWAPprBvZmOjZsl8nDlw0qkF3xfUX7F47O0zcnY9B+Nzjq om6G7HKyTHNuA== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id ABB746769C for ; Wed, 20 Aug 2025 08:46:55 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1755701214; bh=0h0x2rlx1W8FiEeFXdSl4U81YrDkUmYrqjuC/4m0mps=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ESOY0mPJpypaEG0lVFsXvTRwHNkMMHSvkkEZIvksbYdnmskQD9xy8dF6fT4WekCQo zlky0CrITnVaHv669jFClmw83uM8WncoewwGOR5LAFKzBxySIZnOIl/g31GpWmbS0I ooTe4BsrKsPL4rO59ZqvOMp/lgSEpD+GvdBzoY/xHuE3SULYIW7lYt356cNN3vLBPV EeRg4TvtjwGP9Sn074FVZRNtpZiWYUy4dPRX+pmI1kE3y6Sq4nAyEMB1lGmaHlQysC zWTcx4CmAL9qWXE2mYVg9L4TuNrW5kshjIptNMO/m8TUJDumDFjGwqN/csJusj799Y CAhPVB+l3EVPg== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 14D3D6766B; Wed, 20 Aug 2025 08:46:54 -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 ZPdvCTPilCfK; Wed, 20 Aug 2025 08:46:54 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1755701207; bh=zIRT0mlsBbkFGq1AffGtluTBhfRAzSqnYGUwbsTwLb0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fABBW2DVJXruZA0DXWx4Z9vcEqsHv4NU20ubIJw5IzRhigo0sH1K4e1w+y/6/v9hj KT6U6EXa87HGtyvP+GKKePj9eU4W5H6bDMJmrRIyaPKPvIxqUUx8lUPQt+USey12sU 2D4JQA/3cjHs4tXHmRoXOj+4I+YCvOVWj3XT3eDdIB9UfdCXWxSFSwOiBkUQUhVMm4 lS/SoPUtN6tQP3xKdsendED1jLLwVbDYBzxQwgJJbqOO0vNkVX35IBwW0oCAwE0iQL VHhppu2MyLt88UNTfQXX3tWvlCPuzpLT7xp0LfRRFyLxF2/H8whF1p2JrrVCBlz8st G0+OKQhgOp+3g== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id C86CB6769C; Wed, 20 Aug 2025 08:46:46 -0600 (MDT) From: Simon Glass To: U-Boot Concept Date: Wed, 20 Aug 2025 08:46:07 -0600 Message-ID: <20250820144621.1073679-6-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250820144621.1073679-1-sjg@u-boot.org> References: <20250820144621.1073679-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: 7NPRJAKSV6UWKOHBH26ASI32KPYSR334 X-Message-ID-Hash: 7NPRJAKSV6UWKOHBH26ASI32KPYSR334 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 05/14] efi: Use a function to obtain boot services in efi debug 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 Rather than accessing the EFI loader's structure, create an efi_get_boot() function to match that used by the app, so that the call to protocols_per_handle() can operate in the app as well. Signed-off-by: Simon Glass --- cmd/efidebug.c | 4 ++-- lib/efi_loader/efi_boottime.c | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/cmd/efidebug.c b/cmd/efidebug.c index 3a4429a3928..d7f88692d8c 100644 --- a/cmd/efidebug.c +++ b/cmd/efidebug.c @@ -491,8 +491,8 @@ static int do_efi_show_handles(struct cmd_tbl *cmdtp, int flag, &handler); if (ret == EFI_SUCCESS) printf(" %pD\n", handler->protocol_interface); - ret = systab.boottime->protocols_per_handle(handles[i], &guid, - &count); + ret = efi_get_boot()->protocols_per_handle(handles[i], &guid, + &count); /* Print other protocols */ for (j = 0; j < count; j++) { if (guidcmp(guid[j], &efi_guid_device_path)) diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c index 6c5ebdad95e..8b46e43f1ea 100644 --- a/lib/efi_loader/efi_boottime.c +++ b/lib/efi_loader/efi_boottime.c @@ -4026,3 +4026,8 @@ struct efi_system_table *efi_get_sys_table(void) { return &systab; } + +struct efi_boot_services *efi_get_boot(void) +{ + return systab.boottime; +}