aboutsummaryrefslogtreecommitdiff
path: root/common/spl
diff options
context:
space:
mode:
authorSean Anderson2023-10-14 16:47:39 -0400
committerTom Rini2023-10-17 20:50:52 -0400
commit5264413246ed258197eea2bd36b3292b9a6cbe6f (patch)
treeb0c2e1fdcd66f95575ce17c82f1f84886002d93d /common/spl
parent6cc2182c84a94d7d765b392e4801cc3e11f404ca (diff)
spl: fit: Fix entry point for SPL_LOAD_FIT_FULL
The entry point is not always the same as the load address. Use the value of the entry property if it exists. Fixes: 8a9dc16e4d0 ("spl: Add full fitImage support") Signed-off-by: Sean Anderson <seanga2@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'common/spl')
-rw-r--r--common/spl/spl_fit.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/common/spl/spl_fit.c b/common/spl/spl_fit.c
index 1409b926372..32316d8baac 100644
--- a/common/spl/spl_fit.c
+++ b/common/spl/spl_fit.c
@@ -901,8 +901,9 @@ int spl_load_fit_image(struct spl_image_info *spl_image,
return ret;
spl_image->size = fw_len;
- spl_image->entry_point = fw_data;
spl_image->load_addr = fw_data;
+ if (fit_image_get_entry(header, ret, &spl_image->entry_point))
+ spl_image->entry_point = fw_data;
if (fit_image_get_os(header, ret, &spl_image->os))
spl_image->os = IH_OS_INVALID;
spl_image->name = genimg_get_os_name(spl_image->os);