diff options
author | Giulio Benetti | 2019-11-25 17:18:20 +0100 |
---|---|---|
committer | Tom Rini | 2019-12-05 10:28:39 -0500 |
commit | d3e97b53c1f2464f4898226de7d89abf242e4aa8 (patch) | |
tree | ec047cd795178b481265e876d43fec714e800102 | |
parent | 995237b04921574c3922734005d1493d5ec8be97 (diff) |
spl: fix entry_point equal to load_addr
At the moment entry_point is set to image_get_load(header) that sets it
to "load address" instead of "entry point", assuming entry_point is
equal to load_addr, but it's not true. Then load_addr is set to
"entry_point - header_size", but this is wrong too since load_addr is
not an entry point.
So use image_get_ep() for entry_point assignment and image_get_load()
for load_addr assignment.
Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
-rw-r--r-- | common/spl/spl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/common/spl/spl.c b/common/spl/spl.c index d51dbe9942f..24da164b438 100644 --- a/common/spl/spl.c +++ b/common/spl/spl.c @@ -264,9 +264,9 @@ int spl_parse_image_header(struct spl_image_info *spl_image, spl_image->entry_point = image_get_ep(header); spl_image->size = image_get_data_size(header); } else { - spl_image->entry_point = image_get_load(header); + spl_image->entry_point = image_get_ep(header); /* Load including the header */ - spl_image->load_addr = spl_image->entry_point - + spl_image->load_addr = image_get_load(header) - header_size; spl_image->size = image_get_data_size(header) + header_size; |