From: Simon Glass Date: Thu, 5 May 2016 13:28:07 +0000 (-0600) Subject: bootm: Align cache flush end address correctly X-Git-Tag: v2016.07-rc2~41^2~17 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=b4d956f6bc0f;p=u-boot bootm: Align cache flush end address correctly Flushing part of the cache should be done on cache boundaries. Trying to flush part of a cache line is not supported and the request may be ignored or print warnings. Adjust the bootm code to align the end address to prevent this problem. Signed-off-by: Simon Glass Reviewed-by: Heiko Schocher Tested-on: smartweb, corvus, taurus, axm Tested-by: Heiko Schocher Reviewed-by: Joe Hershberger Reviewed-by: Andreas Bießmann --- diff --git a/common/bootm.c b/common/bootm.c index 49414142dc..2431019b3f 100644 --- a/common/bootm.c +++ b/common/bootm.c @@ -445,7 +445,7 @@ static int bootm_load_os(bootm_headers_t *images, unsigned long *load_end, bootstage_error(BOOTSTAGE_ID_DECOMP_IMAGE); return err; } - flush_cache(load, *load_end - load); + flush_cache(load, ALIGN(*load_end - load, ARCH_DMA_MINALIGN)); debug(" kernel loaded at 0x%08lx, end = 0x%08lx\n", load, *load_end); bootstage_mark(BOOTSTAGE_ID_KERNEL_LOADED);