public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: "Benoît Thébaudeau" <benoit@wsystem.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] Inconsistencies in commands regarding load_addr
Date: Fri, 9 Oct 2015 16:01:29 +0200	[thread overview]
Message-ID: <5617C8B9.30204@wsystem.com> (raw)
In-Reply-To: <20151009131826.51616382C64@gemini.denx.de>

Dear Wolfgang,

On 09/10/2015 15:18, Wolfgang Denk wrote:
> Regarding the "load address" topic, be careful, as there has always
> been a lot of confusion (due to unfortunate historic choice of names).
> There is the "load address" as part of the image formates (uImage, FIT
> image), which means the address where the image (OS code) gets loaded
> (or even uncompressed) _to_.  This is recorded in the image itself,
> and has nothing to do woth the "loadaddr" variable, which states where
> the image is located in system memory.

Indeed, but I was only referring to the load address below.

> A command, that _loads_ an image to memory, should either use the
> current setting of "loadaddr" (if no argument is given), of, if the
> argument is given, set "loadaddr" to that value, so that further
> commands can refer to that address by default.

Makes sense.

Currently, it's all mixed up between CONFIG_SYS_LOAD_ADDR, the loadaddr
environment variable and the load_addr global C variable.

The 1st issue is that loadaddr and load_addr currently diverge if the user
changes loadaddr or if commands change load_addr.

The 2nd issue is that some commands use the value of loadaddr as a default,
whereas others use load_addr. And if that fails, CONFIG_SYS_LOAD_ADDR is
sometimes used as a fallback value.

The 3rd issue is that some read/load commands set load_addr, but not all (e.g.:
mmc read, ext2load), which breaks the whole feature, but fixing this could break
existing configurations relying on the current behavior.

Best regards,
Beno?t

  reply	other threads:[~2015-10-09 14:01 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-06 15:00 [U-Boot] Inconsistencies in commands regarding load_addr Benoît Thébaudeau
2015-10-06 18:09 ` Stephen Warren
2015-10-06 19:07   ` Benoît Thébaudeau
2015-10-08  4:40 ` Wolfgang Denk
2015-10-08 14:29   ` Stephen Warren
2015-10-08 21:29     ` Wolfgang Denk
2015-10-09  8:28       ` Benoît Thébaudeau
2015-10-09 13:18         ` Wolfgang Denk
2015-10-09 14:01           ` Benoît Thébaudeau [this message]
2015-10-09 14:55             ` Wolfgang Denk
2015-10-09 15:36         ` 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=5617C8B9.30204@wsystem.com \
    --to=benoit@wsystem.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