diff options
author | Heinrich Schuchardt <heinrich.schuchardt@canonical.com> | 2022-11-29 16:00:41 +0100 |
---|---|---|
committer | Heinrich Schuchardt <heinrich.schuchardt@canonical.com> | 2022-12-02 19:17:24 +0100 |
commit | 1a12796292c026d6e86cf533eaa7a121776236a4 (patch) | |
tree | 904af843e847777fc6d6f326be8b9e9e8df9e59f /lib | |
parent | 1702055eb3010a9bd473f49565613899177aeb36 (diff) | |
download | u-boot-1a12796292c026d6e86cf533eaa7a121776236a4.tar.gz u-boot-1a12796292c026d6e86cf533eaa7a121776236a4.tar.bz2 u-boot-1a12796292c026d6e86cf533eaa7a121776236a4.zip |
efi_loader: don't use EFI_LOADER_DATA internally
EFI_LOADER_DATA/CODE is reserved for EFI applications.
Memory allocated by U-Boot for internal usage should be
EFI_BOOT_SERVICES_DATA or _CODE or EFI_RUNTIME_SERVICES_DATA or _CODE.
Reported-by: François-Frédéric Ozog <ff@ozog.com>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: François-Frédéric Ozog <ff@ozog.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/efi_loader/efi_memory.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/efi_loader/efi_memory.c b/lib/efi_loader/efi_memory.c index a17b426d11..8d347f101f 100644 --- a/lib/efi_loader/efi_memory.c +++ b/lib/efi_loader/efi_memory.c @@ -823,7 +823,7 @@ static void add_u_boot_and_runtime(void) uboot_stack_size) & ~EFI_PAGE_MASK; uboot_pages = ((uintptr_t)map_sysmem(gd->ram_top - 1, 0) - uboot_start + EFI_PAGE_MASK) >> EFI_PAGE_SHIFT; - efi_add_memory_map_pg(uboot_start, uboot_pages, EFI_LOADER_DATA, + efi_add_memory_map_pg(uboot_start, uboot_pages, EFI_BOOT_SERVICES_CODE, false); #if defined(__aarch64__) @@ -857,7 +857,7 @@ int efi_memory_init(void) /* Request a 32bit 64MB bounce buffer region */ uint64_t efi_bounce_buffer_addr = 0xffffffff; - if (efi_allocate_pages(EFI_ALLOCATE_MAX_ADDRESS, EFI_LOADER_DATA, + if (efi_allocate_pages(EFI_ALLOCATE_MAX_ADDRESS, EFI_BOOT_SERVICES_DATA, (64 * 1024 * 1024) >> EFI_PAGE_SHIFT, &efi_bounce_buffer_addr) != EFI_SUCCESS) return -1; |