diff options
Diffstat (limited to 'lib/efi')
-rw-r--r-- | lib/efi/efi.c | 1 | ||||
-rw-r--r-- | lib/efi/efi_app.c | 25 | ||||
-rw-r--r-- | lib/efi/efi_info.c | 1 | ||||
-rw-r--r-- | lib/efi/efi_stub.c | 1 |
4 files changed, 21 insertions, 7 deletions
diff --git a/lib/efi/efi.c b/lib/efi/efi.c index aa42f1842f3..bcb34d67465 100644 --- a/lib/efi/efi.c +++ b/lib/efi/efi.c @@ -10,7 +10,6 @@ * Common EFI functions */ -#include <common.h> #include <debug_uart.h> #include <errno.h> #include <malloc.h> diff --git a/lib/efi/efi_app.c b/lib/efi/efi_app.c index 2209410f35b..119db6602cf 100644 --- a/lib/efi/efi_app.c +++ b/lib/efi/efi_app.c @@ -8,22 +8,24 @@ * This file implements U-Boot running as an EFI application. */ -#include <common.h> #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 +322,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 +369,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. diff --git a/lib/efi/efi_info.c b/lib/efi/efi_info.c index 4d78923c4d4..5b564c5651d 100644 --- a/lib/efi/efi_info.c +++ b/lib/efi/efi_info.c @@ -5,7 +5,6 @@ * Access to the EFI information table */ -#include <common.h> #include <efi.h> #include <errno.h> #include <mapmem.h> diff --git a/lib/efi/efi_stub.c b/lib/efi/efi_stub.c index c9eb32ec104..40fc29d9adf 100644 --- a/lib/efi/efi_stub.c +++ b/lib/efi/efi_stub.c @@ -9,7 +9,6 @@ * EFI application. It can be built either in 32-bit or 64-bit mode. */ -#include <common.h> #include <debug_uart.h> #include <efi.h> #include <efi_api.h> |