diff options
author | Tom Rini <trini@konsulko.com> | 2023-12-08 19:03:03 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2023-12-08 19:03:03 -0500 |
commit | dd638467a4c9131e6732ce489d335b0309d8f13d (patch) | |
tree | e623d1a55a5ca200df5fc0ca9f0c14e4ef2d5e7e /lib/efi/efi_app.c | |
parent | 2f0282922b2c458eea7f85c500a948a587437b63 (diff) | |
parent | 6805b4dbad72a6e9180426c50f6db6e2681430c0 (diff) |
Merge tag 'efi-2024-01-rc5' of https://source.denx.de/u-boot/custodians/u-boot-efi
Pull request efi-2024-01-rc5
Documentation:
* Update and correct support notes on clang
* sandbox: Fix VPL instructions
UEFI:
* Fix a bug in DisconnectController
* Provide better error messages for missing CONFIG_EFI_CAPSULE_ESL_FILE
* Create EFI memory reservations when booting via ACPI
* Make ACPI tables accessible in EFI app
Diffstat (limited to 'lib/efi/efi_app.c')
-rw-r--r-- | lib/efi/efi_app.c | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/lib/efi/efi_app.c b/lib/efi/efi_app.c index 2209410f35b..c5eb816655e 100644 --- a/lib/efi/efi_app.c +++ b/lib/efi/efi_app.c @@ -12,18 +12,21 @@ #include <cpu_func.h> #include <debug_uart.h> #include <dm.h> +#include <efi.h> +#include <efi_api.h> #include <errno.h> #include <init.h> #include <malloc.h> +#include <sysreset.h> +#include <uuid.h> #include <asm/global_data.h> #include <linux/err.h> #include <linux/types.h> -#include <efi.h> -#include <efi_api.h> -#include <sysreset.h> +#include <asm/global_data.h> #include <dm/device-internal.h> #include <dm/lists.h> #include <dm/root.h> +#include <mapmem.h> DECLARE_GLOBAL_DATA_PTR; @@ -320,6 +323,19 @@ int dm_scan_other(bool pre_reloc_only) return 0; } +static void scan_tables(struct efi_system_table *sys_table) +{ + efi_guid_t acpi = EFI_ACPI_TABLE_GUID; + uint i; + + for (i = 0; i < sys_table->nr_tables; i++) { + struct efi_configuration_table *tab = &sys_table->tables[i]; + + if (!memcmp(&tab->guid, &acpi, sizeof(efi_guid_t))) + gd_set_acpi_start(map_to_sysmem(tab->table)); + } +} + /** * efi_main() - Start an EFI image * @@ -354,6 +370,8 @@ efi_status_t EFIAPI efi_main(efi_handle_t image, return ret; } + scan_tables(priv->sys_table); + /* * We could store the EFI memory map here, but it changes all the time, * so this is only useful for debugging. |