From: Tom Rini <trini@konsulko.com>
To: Marek Vasut <marex@denx.de>
Cc: Rasmus Villemoes <ravi@prevas.dk>,
u-boot@lists.denx.de, Tim Harvey <tharvey@gateworks.com>,
Heiko Schocher <hs@denx.de>
Subject: Re: [PATCH] imx8m: set sane default value for SPL_LOAD_FIT_ADDRESS
Date: Thu, 24 Oct 2024 09:20:19 -0600 [thread overview]
Message-ID: <20241024152019.GS4959@bill-the-cat> (raw)
In-Reply-To: <5b9d07eb-14f1-4ac8-bc3f-69cdd8b87a73@denx.de>
[-- Attachment #1: Type: text/plain, Size: 2768 bytes --]
On Thu, Oct 24, 2024 at 04:06:03PM +0200, Marek Vasut wrote:
> On 10/24/24 3:18 PM, Rasmus Villemoes wrote:
> > On Thu, Oct 24 2024, Marek Vasut <marex@denx.de> wrote:
> >
> > > On 10/24/24 12:01 PM, Rasmus Villemoes wrote:
> > > > I enabled IMX_HAB on an imx8mp board, but even though I knew about the
> > > > implementation, I forgot that I had to provide a sane value for
> > > > SPL_LOAD_FIT_ADDRESS. The help text for IMX_HAB doesn't mention this
> > > > implicit requirement, and there's no build-time warning; the default
> > > > 0x0 value just ends up being returned from
> > > > board_spl_fit_buffer_addr(), obviously resulting in a non-booting
> > > > board.
> > > > The existing imx8m* board configs that set a non-zero value
> > > > currently
> > > > all use 0x44000000. The actual value doesn't matter too much, but 0 is
> > > > always wrong for imx8m platforms. So just use 0x44000000 as default
> > > > for those platforms.
> > > > Signed-off-by: Rasmus Villemoes <ravi@prevas.dk>
> > > > ---
> > > > boot/Kconfig | 1 +
> > > > 1 file changed, 1 insertion(+)
> > > > diff --git a/boot/Kconfig b/boot/Kconfig
> > > > index 940389d4882..72d1f69afcd 100644
> > > > --- a/boot/Kconfig
> > > > +++ b/boot/Kconfig
> > > > @@ -231,6 +231,7 @@ config SPL_LOAD_FIT
> > > > config SPL_LOAD_FIT_ADDRESS
> > > > hex "load address of fit image"
> > > > depends on SPL_LOAD_FIT
> > > > + default 0x44000000 if ARCH_IMX8M
> > > This only applies to HAB , for non-HAB the fitImage can be loaded at
> > > arbitrary location, do you need:
> > >
> > > default 0x44000000 if ARCH_IMX8M && IMX_HAB
> > >
> > > right ?
> >
> > On IMX8 without HAB, the value is not used at all AFAICT (otherwise the
> > value of 0x0 would have caused trouble already). I don't see the harm of
> > setting some sane value that's actually within DRAM space independent of
> > HAB.
> >
> > Making the default depend on IMX_HAB has the UX problem that if I do
> > "make imx8mp_evk_defconfig", then go about tweaking stuff, then do "make
> > menuconfig" and enable IMX_HAB, SPL_LOAD_FIT_ADDRESS already has the
> > bogus 0x0 value and nothing forces or asks that to be changed. Making the
> > default depend only on SOC (or SOC family or whatever IMX8M is in this
> > context) makes that problem go away.
> Looking at this closely, common/spl/spl_ram.c does make use of
> CONFIG_SPL_LOAD_FIT_ADDRESS too, so I think yes, we should have a default
> for this.
>
> iMX6 should have 0x14000000
> iMX7 should have 0x84000000
> iMX8M should have 0x44000000
These differ, slightly, from the value used in CONFIG_SYS_LOAD_ADDR.
Could that not be used (and the overall option changed to default
SYS_LOAD_ADDR ?
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]
next prev parent reply other threads:[~2024-10-24 15:20 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-24 10:01 [PATCH] imx8m: set sane default value for SPL_LOAD_FIT_ADDRESS Rasmus Villemoes
2024-10-24 11:51 ` Marek Vasut
2024-10-24 13:18 ` Rasmus Villemoes
2024-10-24 14:06 ` Marek Vasut
2024-10-24 15:20 ` Tom Rini [this message]
2024-10-24 16:13 ` Marek Vasut
2024-10-25 8:41 ` Rasmus Villemoes
2024-10-25 23:02 ` Marek Vasut
2024-10-26 0:24 ` Fabio Estevam
2024-10-26 0:32 ` 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=20241024152019.GS4959@bill-the-cat \
--to=trini@konsulko.com \
--cc=hs@denx.de \
--cc=marex@denx.de \
--cc=ravi@prevas.dk \
--cc=tharvey@gateworks.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