diff options
author | Michal Simek <michal.simek@xilinx.com> | 2016-04-28 10:36:11 +0200 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2016-05-27 09:56:20 -0400 |
commit | 90a7417602e89889a703538e47e323051ecea1fd (patch) | |
tree | 2b88926074ef28e45650326315d2a604ba7dde84 | |
parent | 71db3270dbee381ebdbc183cf88dde46d9a59afb (diff) |
SPL: FIT: Align loading address for header
If bl_len is not aligned it can caused a problem because another code
expects that start is aligned.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
-rw-r--r-- | common/spl/spl_fit.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/common/spl/spl_fit.c b/common/spl/spl_fit.c index 26842ba285..90acbb2d8a 100644 --- a/common/spl/spl_fit.c +++ b/common/spl/spl_fit.c @@ -123,6 +123,7 @@ int spl_load_simple_fit(struct spl_load_info *info, ulong sector, void *fit) * be before CONFIG_SYS_TEXT_BASE. */ fit = (void *)(CONFIG_SYS_TEXT_BASE - size - info->bl_len); + fit = (void *)ALIGN((ulong)fit, 8); sectors = (size + info->bl_len - 1) / info->bl_len; count = info->read(info, sector, sectors, fit); debug("fit read sector %lx, sectors=%d, dst=%p, count=%lu\n", |