From 268f6ac1f95c1734e7eea369e93062e52c4aa04a Mon Sep 17 00:00:00 2001 From: Patrice Chotard Date: Mon, 19 Jul 2021 11:21:51 +0200 Subject: arm64: Update memcpy_{from, to}io() helpers At early U-Boot stage, before relocation, MMU is not yet configured and disabled. DDR may not be configured with the correct memory attributes (can be configured in MT_DEVICE instead of MT_MEMORY). In this case, usage of memcpy_{from, to}io() may leads to synchronous abort in AARCH64 in case the normal memory address is not 64Bits aligned. To avoid such situation, forbid usage of normal memory cast to (u64 *) in case MMU is not enabled. Signed-off-by: Patrice Chotard Reviewed-by: Patrick Delaunay Cc: mark.kettenis@xs4all.nl Signed-off-by: Patrick Delaunay --- include/cpu_func.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/cpu_func.h b/include/cpu_func.h index c3a66f0..23cd5ec 100644 --- a/include/cpu_func.h +++ b/include/cpu_func.h @@ -59,6 +59,7 @@ int dcache_status(void); void dcache_enable(void); void dcache_disable(void); void mmu_disable(void); +int mmu_status(void); /* arch/$(ARCH)/lib/cache.c */ void enable_caches(void); -- cgit v1.1