================ ================ ================ ==========
RESERVED 000000000e100000-000000000f000000 WB <---- outside of RAM
CONVENTIONAL 0000000040000000-0000000047f00000 WB
ACPI RECLAIM MEM 0000000047f00000-0000000047f05000 WB
CONVENTIONAL 0000000047f05000-000000007d475000 WB
RESERVED 000000007d475000-000000007d477000 WB
CONVENTIONAL 000000007d477000-000000007df17000 WB
LOADER DATA 000000007df17000-000000007df18000 WB
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
---
I'm really not sure that this is correct way to fix. Current code state is that
uboot fails to boot kernel on armv7 if memory was reserved at 0xe100000. I.e. in
current code it does not work. Qemu target has memory started at 0x40000000 and
this chunk is outside that memory. Flag overlap_only_ram had very confusing naming,
I corrected it in separate path. This patch fixes booting with removing region
from efi memmap. I send this as RFC for now.
BR,
Maxim.
lib/efi_loader/efi_memory.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
@@ -360,11 +360,15 @@ static efi_status_t efi_add_memory_map_pg(u64 start, u64 pages,
efi_status_t efi_add_memory_map(u64 start, u64 size, int memory_type)
{
u64 pages;
+ bool overlap_only_ram = false;
pages = efi_size_in_pages(size + (start & EFI_PAGE_MASK));
start &= ~EFI_PAGE_MASK;
-
- return efi_add_memory_map_pg(start, pages, memory_type, false);
+#if defined(CONFIG_ARM)
+ overlap_only_ram = true;
+#endif
+ return efi_add_memory_map_pg(start, pages, memory_type,
+ overlap_only_ram);
}
/**