From patchwork Wed Aug 20 14:46:12 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 88 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=1755701223; bh=c4opK3azzvDaIFg6z+SmugAky5AWjJ7E7cfpaEIa1og=; 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=ink1s+hM2sXgVbW0AhlfcV0R5hSdUugBX5tH2kGHyuDJBxM+FKkpxAGD1FL7+fTNI epV41qJfh4IurF+jWizvkTrFZT5fVc0beb+gPYaAKiPYTprfqXkpRkb9VzBAnSb1nr BapxD/z5kuFaRcjqEh87EiJGXq3idDf/IN8GRELbXWrKTw2q4nasTuSZaMA9NpAHaC oLWOWjFxrhL8ZKsdYqzUEF3Zn0UgtQyKuyR7XYdxpFoZLHw7DfIMb+dqUdMPBIyslz DkwyTndVQz068WOjJm7b/EzwiJsVksGnF8XM25Xj7Pq1zYhCRsdMSPRPiJm3mzpJX+ /p9vWjGPHy1lA== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 3EAC2676A0 for ; Wed, 20 Aug 2025 08:47:03 -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 owsw3yHFg3Yp for ; Wed, 20 Aug 2025 08:47:03 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1755701221; bh=c4opK3azzvDaIFg6z+SmugAky5AWjJ7E7cfpaEIa1og=; 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=BtuAavS2O7qQiUyI6amawE9sKu26KrWRf1KsLvtcMFIlA8/3T5wLML2YBg5RBOtSx L2dFTcFc4K3dZZDpQzPN48HBrUMdN10OXEzVuaf198zdjCaOO+j0G5G/Z5Prp3JKcM y/PIL0eeEZpnpjtR9LMJ5g5pnUbk8QNfNjV3EOmfdi9NQqneXRxerPLQ0WsI61U9RL MrczEz9LuuHeDn7c1L3WhtuwNgoD2LYW9WTtUl1FOXED99ZQpjaIWFYmTSKQy2eOu3 VnsRNLbBPe/T8IVCSK3jwu55H6LZ6BEpCz4uzPgUSqnMT0U0sUaVOejXK21zlhCX0R XKCHXWdTeDzAg== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id CC490674FA for ; Wed, 20 Aug 2025 08:47:01 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1755701218; bh=T4gtNueA3/QoYblHudl4QhwB+8dhiIQfnoi/xt/1EdU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RthOWMjQi1ARsTW8y6cjSAyhVJGf1Qmr00E24G5sigpdovR/C5a1fWiXAIyHMuKIP nDY4upEhDSZ+smOzp9PLZ99tFMFZHeZ+XLYTWVlBrIfQvbUkD8v2o8POjY1XOaRBm7 d6tD4/T8muUmgD/BwN5nAXI8hVd9jw5AIX27bNGTmNW20xE3NyW0AALrSu32ieWHcd tWW4T6crHLrQNnC+NSwJ1wzaIpuM+JJrdmyJIVpgrQH1IsjL3q7QC+zMoOx3Ipg2g2 u7Fwm9sayCOwZ8dyioMgcZAW+241DGEyVJRi5iDeWRUZOchcRvvZkWY44Roxyo+c4O b4C/zEuWM2x5w== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 4044C67699; 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 10026) with ESMTP id RUiIBlDM3ywa; 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=1755701211; bh=yCOsQ1uBYHOeg3yoCY5zoCFmZM3e0UFRqelK9wbH9XE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=g8APi26eUhTEssQi501TqxPhs4teHjskIjJ/7tYWcKjfue+ENLtMKZ/lNYamdm0HI EfbtskurFbvV6Rie6PiJhXWTPxknMt8zcCFSLf94RqZBJnwJGv12sR6qBKAdVMKOPn 8XhwHp8j5KfPkiJMzcynLn/Ipw5R6cu9NvcxX6ooU82h1wimh55sBCm1y1Idqu8DW6 79nC8x9R293/AdP7W7gEaAyK0/D7rDFztP6BlREH0Az3t40GDQRiHNPQjkSNK+fbgH oHjKvqHhY7HEgiqD3h+gcBZ/CuGIu5Bk8H9Mfo0KCKRXOI/YJAJOQFN+qOdW3HroyC Vk3qvZiax3qVQ== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 3B956676A9; Wed, 20 Aug 2025 08:46:51 -0600 (MDT) From: Simon Glass To: U-Boot Concept Date: Wed, 20 Aug 2025 08:46:12 -0600 Message-ID: <20250820144621.1073679-11-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: AQPTHQDKJBWC44CPEMPWGTXRAHQZOX5W X-Message-ID-Hash: AQPTHQDKJBWC44CPEMPWGTXRAHQZOX5W 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 10/14] efi: Show component names and other info with efidebug dh 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 If a component name is available, show it, along with the supported languages. Also indicate at the top if the handle is a driver, rather than listing that protocol at the end. Signed-off-by: Simon Glass --- cmd/efidebug.c | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/cmd/efidebug.c b/cmd/efidebug.c index dee0fc7efc2..1515a508e2d 100644 --- a/cmd/efidebug.c +++ b/cmd/efidebug.c @@ -488,8 +488,27 @@ static int do_efi_show_handles(struct cmd_tbl *cmdtp, int flag, void *iface; printf("\n%p", handle); - if (!IS_ENABLED(CONFIG_EFI_APP) && handle->dev) + ret = boot->handle_protocol(handle, + &efi_guid_driver_binding_protocol, + &iface); + if (!ret) + printf(" "); + if (IS_ENABLED(CONFIG_EFI_APP)) { + struct efi_component_name2_protocol *comp; + u16 *name; + + ret = boot->handle_protocol(handle, + &efi_guid_component_name2, + (void **)&comp); + if (!ret) { + printf(" [langs: %s]", comp->supported_langs); + ret = comp->get_driver_name(comp, "en", &name); + if (!ret) + printf(" (%ls)", name); + } + } else if (handle->dev) { printf(" (%s)", handle->dev->name); + } printf("\n"); /* Print device path */ ret = boot->handle_protocol(handle, &efi_guid_device_path, @@ -501,7 +520,9 @@ static int do_efi_show_handles(struct cmd_tbl *cmdtp, int flag, ret = boot->protocols_per_handle(handle, &guid, &count); /* Print other protocols */ for (j = 0; j < count; j++) { - if (guidcmp(guid[j], &efi_guid_device_path)) + if (guidcmp(guid[j], &efi_guid_device_path) && + guidcmp(guid[j], &efi_guid_component_name2) && + guidcmp(guid[j], &efi_guid_driver_binding_protocol)) printf(" %pUs\n", guid[j]); } efi_free_pool(guid);