[PATCH 14/24] imx8: parser: fix 'end address' parameter of rm_find_memreg

Peng Fan peng.fan at nxp.com
Wed Apr 22 15:52:25 CEST 2020


parameter 'end address' must be inclusive of address range.

Modified from Seb's downstream patch.

Signed-off-by: Peng Fan <peng.fan at nxp.com>
---
 arch/arm/mach-imx/imx8/parse-container.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/mach-imx/imx8/parse-container.c b/arch/arm/mach-imx/imx8/parse-container.c
index b57e68e412..e192b0c6d2 100644
--- a/arch/arm/mach-imx/imx8/parse-container.c
+++ b/arch/arm/mach-imx/imx8/parse-container.c
@@ -29,7 +29,7 @@ static int authenticate_image(struct boot_img_t *img, int image_index)
 	/* Find the memreg and set permission for seco pt */
 	err = sc_rm_find_memreg(-1, &mr,
 				img->dst & ~(CONFIG_SYS_CACHELINE_SIZE - 1),
-				ALIGN(img->dst + img->size, CONFIG_SYS_CACHELINE_SIZE));
+				ALIGN(img->dst + img->size, CONFIG_SYS_CACHELINE_SIZE) - 1);
 
 	if (err) {
 		printf("can't find memreg for image: %d, err %d\n",
-- 
2.16.4



More information about the U-Boot mailing list