[PATCH 38/41] imx8: ahab: fix 'end address' parameter of rm_find_memreg

Peng Fan (OSS) peng.fan at oss.nxp.com
Mon Jan 23 10:16:57 CET 2023


From: Seb Fagard <sebastien.fagard at nxp.com>

parameter 'end address' must be inclusive of address range.
And include cpu_func.h header file

Reviewed-by: Ye Li <ye.li at nxp.com>
Signed-off-by: Seb Fagard <sebastien.fagard at nxp.com>
Signed-off-by: Peng Fan <peng.fan at nxp.com>
---
 arch/arm/mach-imx/imx8/ahab.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/mach-imx/imx8/ahab.c b/arch/arm/mach-imx/imx8/ahab.c
index 5a4d39cdaad..1ca7b7f2182 100644
--- a/arch/arm/mach-imx/imx8/ahab.c
+++ b/arch/arm/mach-imx/imx8/ahab.c
@@ -106,7 +106,7 @@ int authenticate_os_container(ulong addr)
 		flush_dcache_range(s, e);
 
 		/* Find the memreg and set permission for seco pt */
-		err = sc_rm_find_memreg(-1, &mr, s, e);
+		err = sc_rm_find_memreg(-1, &mr, s, e - 1);
 		if (err) {
 			printf("Error: can't find memreg for image load address 0x%llx, error %d\n", img->dst, err);
 			ret = -ENOMEM;
-- 
2.36.0



More information about the U-Boot mailing list