imx8: ahab: fix 'end address' parameter of rm_find_memreg
authorPeng Fan <peng.fan@nxp.com>
Wed, 22 Apr 2020 07:36:34 +0000 (15:36 +0800)
committerStefano Babic <sbabic@denx.de>
Fri, 1 May 2020 11:46:21 +0000 (13:46 +0200)
parameter 'end address' must be inclusive of address range.

Reviewed-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
arch/arm/mach-imx/imx8/ahab.c

index 361c578efc855b5c09389eee07a644286cd0a471..89544b3dc61a35e85beac28099db26daf59b31a1 100644 (file)
@@ -97,7 +97,7 @@ int authenticate_os_container(ulong addr)
                       img->size);
 
                s = img->dst & ~(CONFIG_SYS_CACHELINE_SIZE - 1);
                       img->size);
 
                s = img->dst & ~(CONFIG_SYS_CACHELINE_SIZE - 1);
-               e = ALIGN(img->dst + img->size, CONFIG_SYS_CACHELINE_SIZE);
+               e = ALIGN(img->dst + img->size, CONFIG_SYS_CACHELINE_SIZE) - 1;
 
                flush_dcache_range(s, e);
 
 
                flush_dcache_range(s, e);