summaryrefslogtreecommitdiff
path: root/lib/efi_loader/efi_setup.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2025-07-03 08:25:38 -0600
committerTom Rini <trini@konsulko.com>2025-07-03 08:25:38 -0600
commit218db7bdbd0ea115c166f8bf18e1292c588beb10 (patch)
treec724c584750b3f0d1d6e786bc9c0243557c847e3 /lib/efi_loader/efi_setup.c
parentc405bab7661dd60420e97a4edeb3162e9d7e02c5 (diff)
parent95732f2bf8700f9ec17983b419073b6a16b79aef (diff)
Merge tag 'efi-next-03072025' of https://source.denx.de/u-boot/custodians/u-boot-tpm into next
Sughosh added EFI HTTP(s) support into our eficonfig application. Up to now we could only enable that via our efidebug command. Users now get that option on the eficonfig menu. Javier implemented support for the EFI_PARTITION_INFO_PROTOCOL, to provide cached partition information for GPT partition types. The protocol describes legacy MBR partition types, but that's for backward compatibility and not implemented by this series. The protocol is needed by [0], an implementation of a UEFI based A/B boot protocol for the root filesystem. Paul added support for EFI_DEBUG_IMAGE_INFO_TABLE. This is part of the EFI spec and is defining a debug protocol that Google currently uses to debug their Generic Bootloader project [1][2], using EFI to load Android. Heinrich contributed a test EFI application for it as well. The efi_realloc() function he added will realloc any type of memory to BootServicesData, but keeping in mind the new protocol is the only consumer he will fix that on a followup patch. Finally another round of smatch fixes from Andrew cleans up coding errors. The CI https://source.denx.de/u-boot/custodians/u-boot-tpm/-/pipelines/26935 seems happy [0] https://gitlab.com/CentOS/automotive/src/ukiboot [1] https://lpc.events/event/18/contributions/1704/attachments/1550/3231/Android%20Generic%20Boot%20Loader.pdf [2] https://source.android.com/docs/core/architecture/bootloader/generic-bootloader
Diffstat (limited to 'lib/efi_loader/efi_setup.c')
-rw-r--r--lib/efi_loader/efi_setup.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/efi_loader/efi_setup.c b/lib/efi_loader/efi_setup.c
index 48f91da5df7..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.
*
@@ -278,6 +281,21 @@ efi_status_t efi_init_obj_list(void)
if (ret != EFI_SUCCESS)
goto out;
+ /* 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)) {
ret = efi_ecpt_register();
if (ret != EFI_SUCCESS)