From patchwork Wed Aug 20 14:46:11 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 87 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=1755701222; bh=MMdEov9HQ/hOCrQ8FAugui4zCVtcwtL2tz7FF4jSEbg=; 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=Fr1St6KN6zrFOJECa+q+17faGgkR1FroEVliNU8YV5tsHXrNglzXIlf4OPtn/9FMg EA0ao7895H0P9nxI/4uoi+RHAf1Bo8EqYG2UMXrOb6PZo8FPiCOwVlAKbHLsZ7WBnX AJFnHmYDY7+JKJouhJqzk8EfAlSy4yU+XthgjCUJOj1+CnZiBaiz1d89HoBzUAbDSI njP8QNhuBjT3dsAXgC8KTKwge7XXkrm+WhZPm4B1mTw5B8lA5NMD3+cz796oyu+WHC P7O2zZXQ7gO6j91ypnFS2LKsnGWzB7DuS9xU6lBj93HVBxhFg5f2PPILIJCqvGYHUP +SRWC2jyf+Hjw== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id DB47E67699 for ; Wed, 20 Aug 2025 08:47:02 -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 72T0ttmOGOWh for ; Wed, 20 Aug 2025 08:47:02 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1755701220; bh=MMdEov9HQ/hOCrQ8FAugui4zCVtcwtL2tz7FF4jSEbg=; 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=EnqTSzzcMyIjTYTXF/piGTxuOyY970rX/Z4481xQxKMrcI7mLokteWRhw+JudDZ8S SzRIzNQx8fIW2Vj2ROReL3p/1l8oEdbYKD7CCRuiFxOWjhrSkoFPyihbfEgPjXU26v fOqXse03DFwfSTo62yS+pFRIhy60qKkqcp9yMv4GTSSX1y/9q2LxSljdNwFAJgwt6V O/VK6YkeEReT6wYvI++5qOOdEza3E3d6CpiFk5AuE/3ExQci28wfLJ3zLSpNaCYXg9 zX6TCLExZZpBjZz7gOnbSuzaJJ/+LYoIbv32ajNjasTmMU/ZbUIpyHhbmSH6JaUoeS fkY2Ajm6NNCvw== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id DF43A6769B for ; Wed, 20 Aug 2025 08:47:00 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1755701218; bh=ewVhRbyJQim593I2+a7KTw1I7EzK+wVcjOVuy7F1J5M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZJX3gtO05BY/pND8Ej2YFZffZFI1QWGCaq5ie6nqt6yDeGyG7MysjDnozo9cQRN84 8+qOsmzh3yjXcwiZ9k8+VWFbU2qHldKVLEzSjcYP6xEBxgJYU8lOCExcKGIhcCDEi5 LH18DvD5L8yQpqBaY/4/9Crw5fwfopbhqPQ4rc5KEtin8zJ04E+7owxUFeArrqE757 u7zHoNE2NIrTKj/uGH+RgEI1ykjh8aUGTh7E8nyYW5W44aW5VgrIL8BWaGtR04qq71 lxRrQBES4bWG79mzlRqZopERx52NyXigww6lN27FxvH1UHxIxt1XpAp6j8KXm9lcb+ hv+AioDqpzNSg== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 2974F676A5; 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 U8g1iilPmhLl; 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=1755701210; bh=3pkuNCyTuxuc5WrL4eNic2Nefob/eFnxeyP2gyE1icM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fE0lcWTRfeH3La15iAJdWgemgNkDcWtFGVXj0W84qCeCUYxz2cVhoxa509+5EqYLb 84rLyZMSU+p1pdry3QT9vghBGiZJYym2ZFLUvEhOo7dKc042bLUbQjT0LhlmM8oBWl HkGGmkdz2wAsJTUlw/0I34MZ0d8AlVoPJGXNFwBPFHUqGpRHHvxA40J4XikAsXQg+V 1fmmWySzmzllCuJ3zLDH7ee89gtIiqJDdj4X7Yzaboa7kPwS6xj7e8wrx2uwbjBymv J07kpNDizY8bsGuReOoy4dAw4Q2Fco/JQZHy0t1Irsis4JICA+BJ5dtNwEs4bSx0kQ Pkmm43G5uX1aw== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 250CA67699; Wed, 20 Aug 2025 08:46:50 -0600 (MDT) From: Simon Glass To: U-Boot Concept Date: Wed, 20 Aug 2025 08:46:11 -0600 Message-ID: <20250820144621.1073679-10-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: EX5EY4X5VZY62UD2NNW7IOWJT5UOKANY X-Message-ID-Hash: EX5EY4X5VZY62UD2NNW7IOWJT5UOKANY 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 09/14] efi: Add the component-name2 protocol to 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 Add the GUID and API for this protocol so that we can use it in the 'efidebug dh' command. Signed-off-by: Simon Glass --- include/efi.h | 1 + include/efi_api.h | 15 +++++++++++++++ lib/efi/device_path.c | 1 + lib/uuid.c | 1 + 4 files changed, 18 insertions(+) diff --git a/include/efi.h b/include/efi.h index 60afb18784d..5e15a87ed3b 100644 --- a/include/efi.h +++ b/include/efi.h @@ -156,6 +156,7 @@ extern const efi_guid_t efi_global_variable_guid; extern const efi_guid_t efi_guid_fdt; /* GUID of the EFI_DRIVER_BINDING_PROTOCOL */ extern const efi_guid_t efi_guid_driver_binding_protocol; +extern const efi_guid_t efi_guid_component_name2; /* Generic EFI table header */ struct efi_table_hdr { diff --git a/include/efi_api.h b/include/efi_api.h index dfc13588213..876c1ac2bbe 100644 --- a/include/efi_api.h +++ b/include/efi_api.h @@ -483,6 +483,10 @@ struct efi_runtime_services { EFI_GUID(0xd719b2cb, 0x3d3a, 0x4596, \ 0xa3, 0xbc, 0xda, 0xd0, 0x0e, 0x67, 0x65, 0x6f) +#define EFI_COMPONENT_NAME2_PROTOCOL_GUID \ + EFI_GUID(0x6a7a5cff, 0xe8d9, 0x4f70, \ + 0xba, 0xda, 0x75, 0xab, 0x30, 0x25, 0xce, 0x14) + /** * struct efi_configuration_table - EFI Configuration Table * @@ -2426,4 +2430,15 @@ struct efi_disk { void *buffer); }; +struct efi_component_name2_protocol { + efi_status_t (EFIAPI *get_driver_name) + (struct efi_component_name2_protocol *this, + char *language, u16 **driver_name); + efi_status_t (EFIAPI *get_controller_name) + (struct efi_component_name2_protocol *this, + efi_handle_t controller_handle, efi_handle_t child_handle, + char *language, u16 **controller_name); + char *supported_langs; +}; + #endif diff --git a/lib/efi/device_path.c b/lib/efi/device_path.c index 3fd5c75aeee..0b2eb7561b1 100644 --- a/lib/efi/device_path.c +++ b/lib/efi/device_path.c @@ -37,6 +37,7 @@ const efi_guid_t efi_guid_fdt = EFI_FDT_GUID; /* GUID of the EFI_DRIVER_BINDING_PROTOCOL */ const efi_guid_t efi_guid_driver_binding_protocol = EFI_DRIVER_BINDING_PROTOCOL_GUID; +const efi_guid_t efi_guid_component_name2 = EFI_COMPONENT_NAME2_PROTOCOL_GUID; /* template EFI_DP_END node: */ const struct efi_device_path EFI_DP_END = { diff --git a/lib/uuid.c b/lib/uuid.c index b5f486182f4..3f7885d0877 100644 --- a/lib/uuid.c +++ b/lib/uuid.c @@ -279,6 +279,7 @@ static const struct { { "Debug Image Info", EFI_DEBUG_IMAGE_INFO_TABLE }, { "Memory Attribute", EFI_ACPI_MCFG_TABLE_GUID }, { "Random-number-generator Algorithms", EFI_RNG_ALGORITHM_GUID }, + { "Component-name2 Protocol", EFI_COMPONENT_NAME2_PROTOCOL_GUID }, #endif #endif /* !USE_HOSTCC */ };