summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorYing-Chun Liu (PaulLiu) <[email protected]>2025-07-03 07:28:08 +0100
committerIlias Apalodimas <[email protected]>2025-07-03 12:25:56 +0300
commite7a85ec651ed5794eb9a837e1073f6b3146af501 (patch)
treed4d52ad183af11327eb10732e0670aa74f4bddfc /lib
parentaaf7be96c2c14aa190d39e50fa3606389eafda8e (diff)
efi: add EFI_DEBUG_IMAGE_INFO_TABLE for debug
EFI_DEBUG_IMAGE_INFO_TABLE is used to store EFI_LOADED_IMAGE for debug purpose. This commit adds the table to the EFI_CONFIGURATION_TABLE. This feature is described in UEFI Spec version 2.10. Section 18.4. The implementation ensures support for hardware-assisted debugging and provides a standardized mechanism for debuggers to discover and interact with system-level debug resources. Cc: Heinrich Schuchardt <[email protected]> Cc: Peter Robinson <[email protected]> Cc: Simon Glass <[email protected]> Signed-off-by: Ying-Chun Liu (PaulLiu) <[email protected]> Reviewed-by: Ilias Apalodimas <[email protected]> Signed-off-by: Ilias Apalodimas <[email protected]>
Diffstat (limited to 'lib')
-rw-r--r--lib/efi_loader/efi_debug_support.c6
-rw-r--r--lib/efi_loader/efi_setup.c11
2 files changed, 17 insertions, 0 deletions
diff --git a/lib/efi_loader/efi_debug_support.c b/lib/efi_loader/efi_debug_support.c
index 649d21ef829..597592fbd1c 100644
--- a/lib/efi_loader/efi_debug_support.c
+++ b/lib/efi_loader/efi_debug_support.c
@@ -11,6 +11,12 @@
struct efi_system_table_pointer __efi_runtime_data * systab_pointer = NULL;
+struct efi_debug_image_info_table_header efi_m_debug_info_table_header = {
+ 0,
+ 0,
+ NULL
+};
+
/**
* efi_initialize_system_table_pointer() - Initialize system table pointer
*
diff --git a/lib/efi_loader/efi_setup.c b/lib/efi_loader/efi_setup.c
index 78c5059256a..f06cf49e443 100644
--- a/lib/efi_loader/efi_setup.c
+++ b/lib/efi_loader/efi_setup.c
@@ -18,6 +18,9 @@
efi_status_t efi_obj_list_initialized = OBJ_LIST_NOT_INITIALIZED;
+const efi_guid_t efi_debug_image_info_table_guid =
+ EFI_DEBUG_IMAGE_INFO_TABLE_GUID;
+
/*
* Allow unaligned memory access.
*
@@ -280,9 +283,17 @@ efi_status_t efi_init_obj_list(void)
/* Initialize system table pointer */
if (IS_ENABLED(CONFIG_EFI_DEBUG_SUPPORT)) {
+ efi_guid_t debug_image_info_table_guid =
+ efi_debug_image_info_table_guid;
+
ret = efi_initialize_system_table_pointer();
if (ret != EFI_SUCCESS)
goto out;
+
+ ret = efi_install_configuration_table(&debug_image_info_table_guid,
+ &efi_m_debug_info_table_header);
+ if (ret != EFI_SUCCESS)
+ goto out;
}
if (IS_ENABLED(CONFIG_EFI_ECPT)) {