]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
efi_memory: do not add U-Boot memory to the memory map
authorSughosh Ganu <sughosh.ganu@linaro.org>
Tue, 15 Oct 2024 15:37:08 +0000 (21:07 +0530)
committerTom Rini <trini@konsulko.com>
Tue, 15 Oct 2024 19:45:29 +0000 (13:45 -0600)
The memory region occupied by U-Boot is reserved by LMB, and gets
added to the EFI memory map through a call from the LMB module. Remove
this superfluous addition to the EFI memory map.

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
lib/efi_loader/efi_memory.c

index 41501e9d41be5376fe4f95660c23d35d28092d61..16e64987af7792d6f01c296de3b23146df97bfc3 100644 (file)
@@ -870,16 +870,6 @@ static void add_u_boot_and_runtime(void)
 {
        unsigned long runtime_start, runtime_end, runtime_pages;
        unsigned long runtime_mask = EFI_PAGE_MASK;
-       unsigned long uboot_start, uboot_pages;
-       unsigned long uboot_stack_size = CONFIG_STACK_SIZE;
-
-       /* Add U-Boot */
-       uboot_start = ((uintptr_t)map_sysmem(gd->start_addr_sp, 0) -
-                      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_BOOT_SERVICES_CODE,
-                             false);
 
 #if defined(__aarch64__)
        /*