From patchwork Wed Aug 20 00:40:24 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 48 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=1755650488; bh=hQ3onlZZJHue1z+RWfPeOShGUu9dH0Uj9a9KJ5jkPm8=; 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=C2EWMJoEimxLoTB39MbIsIp6qrH5EusWWqQ2+tGL5ciWzM62HUq0GckY5Ayud7GwT q/DgiOFHVxRCy0Jk8C951V18NTxi8FH3SQMdAJgitUMl02G4gf0JYrRtiulNFVGncT AN/wB0ZJHf+/ENhO9dAgKtyH4W1mgfWoYcnl0FNulowW+qdzYU7A0PDGsHJ/1ReVxZ tslsRmF6E2JLJd0am/+CSyrC9nLrAVkhambqKBbSX8Z5Q13vctX79o10kim+WLa+uN A1TU1v6prX3hu7UuU/keOOWiaChLyius3jFccFgsaoXQlMO2GoaGdSA4mBpMMA/ie1 521d1MLh41Q2w== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 9AEA2675B8 for ; Tue, 19 Aug 2025 18:41:28 -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 qgZcpCuoONYS for ; Tue, 19 Aug 2025 18:41:28 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1755650488; bh=hQ3onlZZJHue1z+RWfPeOShGUu9dH0Uj9a9KJ5jkPm8=; 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=C2EWMJoEimxLoTB39MbIsIp6qrH5EusWWqQ2+tGL5ciWzM62HUq0GckY5Ayud7GwT q/DgiOFHVxRCy0Jk8C951V18NTxi8FH3SQMdAJgitUMl02G4gf0JYrRtiulNFVGncT AN/wB0ZJHf+/ENhO9dAgKtyH4W1mgfWoYcnl0FNulowW+qdzYU7A0PDGsHJ/1ReVxZ tslsRmF6E2JLJd0am/+CSyrC9nLrAVkhambqKBbSX8Z5Q13vctX79o10kim+WLa+uN A1TU1v6prX3hu7UuU/keOOWiaChLyius3jFccFgsaoXQlMO2GoaGdSA4mBpMMA/ie1 521d1MLh41Q2w== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 752616765D for ; Tue, 19 Aug 2025 18:41:28 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1755650486; bh=EbVvyePPGft8bpiP/uAtvrs1NOh/HsgEce6seHVTJOE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=m1n4/XjhmmcUle2tTUJgMo158vk5GO7y3wUbJ9kxo+Kcj4Oj4xIWwQZC3gVjCK9Oh +2YmEkR9WOhItwWp/45YflXVDjd/CbP+UK/9oqoMQ1ZNpmekNAvN0zeCWvVkALe8z4 qGtjTQCCuZg2BP/h6THmwJ7JVUJ3tjgFHmdXlNTcOY9LUQKEjyx4UzUQlOE/qFRydn 0XSW0DaczPwuKwtwHtjScd6xd0nCeOfq3uGR04HoyH9Z4POkhBcjIDSihwFZtLJXG5 4ahGnnSGFco1wiWcHDOK5shZWtByB4027MNROgZenRONnsQIXCDCfPYma0u3fxI/Wc y1fIR2OW7uU5Q== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 530A7675C0; Tue, 19 Aug 2025 18:41:26 -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 Wko2aiRfUT23; Tue, 19 Aug 2025 18:41:26 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1755650480; bh=qDjsJQlhz9fZ61kpLJDloi521kWWXBa3wIIvNXZxf40=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JETTU3+m2t8vaKqYoqFue2eFeMEXLbpydLQ7FnVGcTi018J7M4bOZHUk1iDHBniLv lePsPzcxMWmGTyJC9vxq2i4OPvx3o3yCcd6WKA9poACWKNitvJFLE8ENvCNYsEGcOg 1+VrO3j9F9Do3D+qJDNEJJoxvBJK9eJYjoBHqs4DxONFkaQrqu8hlKpBRM2vmdiUNF cLgfzNQeVZKbju3bfIjXNJNFUcIjchUMl61C08D1dD0KBh4NK02ZtdWLB0aK5M/TkN TbvEVZrUrp7tbnQ38Yrkh0LF8Xo6dJwUKNkIq5/1CSHNP66ri9o7quiV+NGQrWUPEI ByCNDuhkEDCEQ== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id E46026728E; Tue, 19 Aug 2025 18:41:19 -0600 (MDT) From: Simon Glass To: U-Boot Concept Date: Tue, 19 Aug 2025 18:40:24 -0600 Message-ID: <20250820004039.3920254-11-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: NPATU47EVJNDR6OFLGRYD5WDFGGNMRLF X-Message-ID-Hash: NPATU47EVJNDR6OFLGRYD5WDFGGNMRLF 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/18] efi: Move FDT and global-variable GUIDs to common files 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 The global-variable GUID is already set in the common device_path.c file but its declaration is only in the efi_loader header. Move it and also move over the FDT GUIDs. Signed-off-by: Simon Glass --- include/efi.h | 3 +++ include/efi_loader.h | 3 --- lib/efi/device_path.c | 2 ++ lib/efi_loader/efi_boottime.c | 2 -- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/efi.h b/include/efi.h index 742c40bfd8c..ed22ff9a5a4 100644 --- a/include/efi.h +++ b/include/efi.h @@ -152,6 +152,9 @@ typedef struct efi_object *efi_handle_t; (c) & 0xff, ((c) >> 8) & 0xff, \ (d0), (d1), (d2), (d3), (d4), (d5), (d6), (d7) } } +extern const efi_guid_t efi_global_variable_guid; +extern const efi_guid_t efi_guid_fdt; + /* Generic EFI table header */ struct efi_table_hdr { u64 signature; diff --git a/include/efi_loader.h b/include/efi_loader.h index b57196da8da..c4d9c4f1c7c 100644 --- a/include/efi_loader.h +++ b/include/efi_loader.h @@ -317,7 +317,6 @@ extern const efi_guid_t efi_guid_host_dev; extern const efi_guid_t efi_block_io_guid; /* GUID of the EFI_SIMPLE_NETWORK_PROTOCOL */ extern const efi_guid_t efi_net_guid; -extern const efi_guid_t efi_global_variable_guid; extern const efi_guid_t efi_guid_console_control; extern const efi_guid_t efi_guid_device_path; /* GUID of the EFI system partition */ @@ -336,8 +335,6 @@ extern const efi_guid_t efi_guid_event_group_ready_to_boot; extern const efi_guid_t efi_guid_event_group_reset_system; /* event group return to efibootmgr */ extern const efi_guid_t efi_guid_event_group_return_to_efibootmgr; -/* GUID of the device tree table */ -extern const efi_guid_t efi_guid_fdt; extern const efi_guid_t efi_guid_loaded_image; extern const efi_guid_t efi_guid_loaded_image_device_path; extern const efi_guid_t efi_guid_device_path_to_text_protocol; diff --git a/lib/efi/device_path.c b/lib/efi/device_path.c index fb6653b23a3..db5a686ccb2 100644 --- a/lib/efi/device_path.c +++ b/lib/efi/device_path.c @@ -32,6 +32,8 @@ const efi_guid_t efi_simple_file_system_protocol_guid = EFI_SIMPLE_FILE_SYSTEM_PROTOCOL_GUID; const efi_guid_t efi_file_info_guid = EFI_FILE_INFO_GUID; const efi_guid_t efi_u_boot_guid = U_BOOT_GUID; +/* GUID of the device tree table */ +const efi_guid_t efi_guid_fdt = EFI_FDT_GUID; /* template EFI_DP_END node: */ const struct efi_device_path EFI_DP_END = { diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c index 8ba42ec4544..0f9a654ca03 100644 --- a/lib/efi_loader/efi_boottime.c +++ b/lib/efi_loader/efi_boottime.c @@ -68,8 +68,6 @@ efi_status_t efi_uninstall_protocol /* 1 if inside U-Boot code, 0 if inside EFI payload code */ static int entry_count = 1; static int nesting_level; -/* GUID of the device tree table */ -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;