aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Vasut <marex@denx.de>2023-08-31 16:57:24 +0200
committerStefano Babic <sbabic@denx.de>2023-10-16 16:25:09 +0200
commitb0296e22cb48c26ffe5ceb09f35a2ac5975a299f (patch)
treeb33d6af49969f370e1d7c829e2f8de5c523c08ee
parentcc7df0b9e8bcc63f06db83e7e44e6b214cc30e1d (diff)
downloadu-boot-b0296e22cb48c26ffe5ceb09f35a2ac5975a299f.zip
u-boot-b0296e22cb48c26ffe5ceb09f35a2ac5975a299f.tar.gz
u-boot-b0296e22cb48c26ffe5ceb09f35a2ac5975a299f.tar.bz2
imx: hab: Use size parameter
The current code works by sheer coincidence, because (see HABv4 API documentation, section 3.4) the RVT authenticate_image call updates the size that is passed in with the actual size ROM code pulls from IVT/CSF . So if the input size is larger, that is "fine" . Pass in size instead to make this really correct. Signed-off-by: Marek Vasut <marex@denx.de>
-rw-r--r--arch/arm/mach-imx/spl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/mach-imx/spl.c b/arch/arm/mach-imx/spl.c
index 6c13b00..b30cd96 100644
--- a/arch/arm/mach-imx/spl.c
+++ b/arch/arm/mach-imx/spl.c
@@ -353,7 +353,7 @@ void *spl_load_simple_fit_fix_load(const void *fit)
debug("%s: ivt: %p offset: %lx size: %lx\n", __func__, ivt, offset, size);
debug("%s: ivt self: %x\n", __func__, ivt->self);
- if (imx_hab_authenticate_image((uintptr_t)fit, (uintptr_t)ivt, offset))
+ if (imx_hab_authenticate_image((uintptr_t)fit, (uintptr_t)size, offset))
panic("spl: ERROR: image authentication unsuccessful\n");
return (void *)fit;