[PATCH 3/4] fsl-layerscape: align first parameter of efi_add_memory_map()

Michael Walle michael at walle.cc
Thu May 14 14:38:30 CEST 2020


The start parameter must be aligned to EFI_PAGE_SIZE.

Fixes: 5a37a2f0140c ("armv8: ls2080a: Declare spin tables as reserved for efi loader")
Signed-off-by: Michael Walle <michael at walle.cc>
---
 arch/arm/cpu/armv8/fsl-layerscape/fdt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/cpu/armv8/fsl-layerscape/fdt.c b/arch/arm/cpu/armv8/fsl-layerscape/fdt.c
index 3bbad827cb..fc65ad6c1e 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/fdt.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/fdt.c
@@ -146,7 +146,7 @@ remove_psci_node:
 	fdt_add_mem_rsv(blob, (uintptr_t)&secondary_boot_code,
 			*boot_code_size);
 #if CONFIG_IS_ENABLED(EFI_LOADER)
-	efi_add_memory_map((uintptr_t)&secondary_boot_code,
+	efi_add_memory_map(ALIGN_DOWN((uintptr_t)&secondary_boot_code, EFI_PAGE_SIZE),
 			   ALIGN(*boot_code_size, EFI_PAGE_SIZE) >> EFI_PAGE_SHIFT,
 			   EFI_RESERVED_MEMORY_TYPE, false);
 #endif
-- 
2.20.1



More information about the U-Boot mailing list