diff options
author | Alexandru Gagniuc <mr.nuke.me@gmail.com> | 2021-01-20 10:46:49 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2021-02-17 17:12:45 -0500 |
commit | efc4ad0bc763f135f3437f51df693e83941a9928 (patch) | |
tree | cedd7ce0eb3b68f24d0c8c1b713ef00e40d8b0a3 /arch | |
parent | 496f49464d90b564da5f1a2f4eecb5553e01edf9 (diff) | |
download | u-boot-efc4ad0bc763f135f3437f51df693e83941a9928.tar.gz u-boot-efc4ad0bc763f135f3437f51df693e83941a9928.tar.xz u-boot-efc4ad0bc763f135f3437f51df693e83941a9928.zip |
spl: fit: Drop 'length' argument to board_spl_fit_post_load()
The size is derived from the FIT image itself. Any alignment
requirements are machine-specific and known by the board code. Thus
the total length can be derived from the FIT image and knowledge of
the platform. The 'length' argument is redundant. Remove it.
Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
CC: Matt Porter <mporter@konsulko.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-imx/spl.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/arch/arm/mach-imx/spl.c b/arch/arm/mach-imx/spl.c index be4da0f702..36033d611c 100644 --- a/arch/arm/mach-imx/spl.c +++ b/arch/arm/mach-imx/spl.c @@ -19,6 +19,7 @@ #include <asm/mach-imx/hab.h> #include <asm/mach-imx/boot_mode.h> #include <g_dnl.h> +#include <linux/libfdt.h> DECLARE_GLOBAL_DATA_PTR; @@ -321,11 +322,11 @@ ulong board_spl_fit_size_align(ulong size) return size; } -void board_spl_fit_post_load(ulong load_addr, size_t length) +void board_spl_fit_post_load(const void *fit) { - u32 offset = length - CONFIG_CSF_SIZE; + u32 offset = ALIGN(fdt_totalsize(fit), 0x1000); - if (imx_hab_authenticate_image(load_addr, + if (imx_hab_authenticate_image((uintptr_t)fit, offset + IVT_SIZE + CSF_PAD_SIZE, offset)) { panic("spl: ERROR: image authentication unsuccessful\n"); |