public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Thierry Reding <thierry.reding@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] p2371-2180: Build position independent binary
Date: Tue, 19 Mar 2019 13:12:31 +0100	[thread overview]
Message-ID: <20190319121231.GB9309@ulmo> (raw)
In-Reply-To: <f70d6832-adbc-8a35-bdaa-c6e5703eb233@wwwdotorg.org>

On Mon, Mar 18, 2019 at 12:31:32PM -0600, Stephen Warren wrote:
> On 3/8/19 1:10 PM, Thierry Reding wrote:
> > From: Thierry Reding <treding@nvidia.com>
> > 
> > In order to support chainloading of U-Boot by an earlier bootloader,
> > make sure the binary is position independent, so that the earlier boot-
> > loader can relocate it if necessary.
> 
> Why not enable this for all 64-bit Tegra? They're all booted the exact same
> way at least with recent L4T builds.

Yeah, I think that would make sense.

> Also, U-Boot is typically linked to the address that cboot loads it to, and
> cboot typically always loads to precisely that address. I'm not sure why
> this patch is required.

I encountered this issue when I was trying to chainload U-Boot from
cboot on Jetson TX1. It seems like your above comment is no longer true,
though I suppose that could just mean that the link address for U-Boot
has become stale?

> That said, it don't think it harms anything, so I'm fine with it being
> applied.

I suppose there's a bit of extra code to do the indirect jumps, but
overall U-Boot seems to work well and not noticeably slower if this is
enabled. Might be nice for extra flexibility and to avoid any surprises
if we ever end up loading U-Boot to a location other than where it was
liked to.

My understanding is that this could happen on Tegra186 if cboot detects
bad memory blocks in the area where U-Boot was meant to be loaded to. I
guess this doesn't apply to earlier chips, but perhaps it's good to have
it there for consistency anyway.

Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190319/384b1e35/attachment.sig>

  reply	other threads:[~2019-03-19 12:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-08 20:10 [U-Boot] [PATCH] p2371-2180: Build position independent binary Thierry Reding
2019-03-18 18:31 ` Stephen Warren
2019-03-19 12:12   ` Thierry Reding [this message]
2019-03-19 17:05     ` Stephen Warren
2019-03-20 10:27       ` Thierry Reding
2019-03-20 16:53         ` Stephen Warren

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=20190319121231.GB9309@ulmo \
    --to=thierry.reding@gmail.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