[Concept,03/14] efi: Move driver-binding guid to a common file

Message ID 20250820144621.1073679-4-sjg@u-boot.org
State New
Headers
Series efi: app: Support booting an OS |

Commit Message

Simon Glass Aug. 20, 2025, 2:46 p.m. UTC
  From: Simon Glass <sjg@chromium.org>

Move efi_guid_driver_binding_protocol to lib/efi so that it can be used
from the app.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 include/efi.h                 | 2 ++
 include/efi_loader.h          | 2 --
 lib/efi/device_path.c         | 3 +++
 lib/efi_loader/efi_boottime.c | 3 ---
 4 files changed, 5 insertions(+), 5 deletions(-)
  

Patch

diff --git a/include/efi.h b/include/efi.h
index 54da1540d0b..60afb18784d 100644
--- a/include/efi.h
+++ b/include/efi.h
@@ -154,6 +154,8 @@  typedef struct efi_object *efi_handle_t;
 
 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;
 
 /* Generic EFI table header */
 struct efi_table_hdr {
diff --git a/include/efi_loader.h b/include/efi_loader.h
index 2d5e8de0132..a475ebb5413 100644
--- a/include/efi_loader.h
+++ b/include/efi_loader.h
@@ -321,8 +321,6 @@  extern const efi_guid_t efi_guid_console_control;
 extern const efi_guid_t efi_guid_device_path;
 /* GUID of the EFI system partition */
 extern const efi_guid_t efi_system_partition_guid;
-/* GUID of the EFI_DRIVER_BINDING_PROTOCOL */
-extern const efi_guid_t efi_guid_driver_binding_protocol;
 /* event group ExitBootServices() invoked */
 extern const efi_guid_t efi_guid_event_group_exit_boot_services;
 /* event group SetVirtualAddressMap() invoked */
diff --git a/lib/efi/device_path.c b/lib/efi/device_path.c
index db5a686ccb2..3fd5c75aeee 100644
--- a/lib/efi/device_path.c
+++ b/lib/efi/device_path.c
@@ -34,6 +34,9 @@  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;
+/* GUID of the EFI_DRIVER_BINDING_PROTOCOL */
+const efi_guid_t efi_guid_driver_binding_protocol =
+			EFI_DRIVER_BINDING_PROTOCOL_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 0f9a654ca03..6c5ebdad95e 100644
--- a/lib/efi_loader/efi_boottime.c
+++ b/lib/efi_loader/efi_boottime.c
@@ -68,9 +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 EFI_DRIVER_BINDING_PROTOCOL */
-const efi_guid_t efi_guid_driver_binding_protocol =
-			EFI_DRIVER_BINDING_PROTOCOL_GUID;
 
 /* event group ExitBootServices() invoked */
 const efi_guid_t efi_guid_event_group_exit_boot_services =