From: Lokesh Vutla <lokeshvutla@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [RFC PATCH] SPL: FIT: Align loading address for header
Date: Mon, 2 May 2016 09:16:54 +0530 [thread overview]
Message-ID: <5726CDAE.1020506@ti.com> (raw)
In-Reply-To: <b0fcd3f216cd7929df2f941b4ad9dafb25aa5207.1461832568.git.michal.simek@xilinx.com>
On Thursday 28 April 2016 02:06 PM, Michal Simek wrote:
> If bl_len is not aligned it can caused a problem because another code
> expects that start is aligned.
What about loading of U-boot image and dtb image? I have posted a
similar patch for solving this[1]. Can you see if it helps?
[1] http://patchwork.ozlabs.org/patch/606958/
Thanks and regards,
Lokesh
>
> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
> ---
>
> Not sure if this is the right way how to ensure it.
> But patch is pointing to the problem. For example if bl_len is 1.
> ---
> common/spl/spl_fit.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/common/spl/spl_fit.c b/common/spl/spl_fit.c
> index e301927c87ac..08e432a52dbb 100644
> --- a/common/spl/spl_fit.c
> +++ b/common/spl/spl_fit.c
> @@ -119,6 +119,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",
>
next prev parent reply other threads:[~2016-05-02 3:46 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-28 8:36 [U-Boot] [RFC PATCH] SPL: FIT: Align loading address for header Michal Simek
2016-05-01 18:54 ` Simon Glass
2016-05-02 3:46 ` Lokesh Vutla [this message]
2016-05-02 7:53 ` Michal Simek
2016-05-30 17:56 ` [U-Boot] [U-Boot, RFC] " Tom Rini
2016-05-31 4:29 ` Lokesh Vutla
2016-05-31 14:09 ` Tom Rini
2016-05-31 14:12 ` Lokesh Vutla
2016-05-31 14:15 ` Tom Rini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5726CDAE.1020506@ti.com \
--to=lokeshvutla@ti.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox