summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2021-02-18 12:02:11 -0500
committerTom Rini <trini@konsulko.com>2021-02-18 12:02:11 -0500
commit766927a7595a6f18fef460a06fdac370fd9e02cf (patch)
tree1016a8e52a61cd1b1753df8fd5f78c4cee65e75a /arch
parent2dddc1bb296308b48f89f31e711965fa2c8091a0 (diff)
parent71551055cbdbb059be0e2051aad7976ee9847197 (diff)
downloadu-boot-766927a7595a6f18fef460a06fdac370fd9e02cf.tar.gz
u-boot-766927a7595a6f18fef460a06fdac370fd9e02cf.tar.xz
u-boot-766927a7595a6f18fef460a06fdac370fd9e02cf.zip
Merge branch '2021-02-18-SPL-FIT-OP-TEE-Linux-improvements'
- Improve interactions between SPL / OP-TEE and Linux in FIT images
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-imx/spl.c7
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");