From: Tom Rini <trini@konsulko.com>
To: "Pali Rohár" <pali@kernel.org>
Cc: "Marek Behún" <kabel@kernel.org>,
"Simon Glass" <sjg@chromium.org>,
u-boot@lists.denx.de
Subject: Re: [PATCH v2] board_f: Add support for CONFIG_OF_BOARD_FIXUP for XIP images
Date: Mon, 21 Nov 2022 12:45:32 -0500 [thread overview]
Message-ID: <20221121174532.GX7282@bill-the-cat> (raw)
In-Reply-To: <20221121174201.u3qoksqewebvpeve@pali>
[-- Attachment #1: Type: text/plain, Size: 1607 bytes --]
On Mon, Nov 21, 2022 at 06:42:01PM +0100, Pali Rohár wrote:
> + Tom
>
> On Wednesday 02 November 2022 00:23:03 Pali Rohár wrote:
> > On Monday 10 October 2022 17:48:58 Simon Glass wrote:
> > > Hi,
> > >
> > > On Sun, 28 Aug 2022 at 09:19, Marek Behún <kabel@kernel.org> wrote:
> > > >
> > > > From: Pali Rohár <pali@kernel.org>
> > > >
> > > > When U-Boot is running from flash memory (execute in place) then
> > > > gd->fdt_blob before relocation points to read-only flash memory.
> > > >
> > > > So U-Boot calls board_fix_fdt() with read-only gd->fdt_blob pointer which
> > > > cause immediate CPU crash when callback is trying to modify gd->fdt_blob.
> > > >
> > > > Fix this issue by introducing a new config option
> > > > OF_DTB_READONLY_BEFORE_RELOC which moves fix_fdt callback after the
> > > > reloc_fdt callback. This makes CONFIG_OF_BOARD_FIXUP working also if
> > > > U-Boot before relocation is not running from read/write (S)RAM memory.
> > > >
> > > > This is required for mpc85xx boards when booting from flash NOR.
> > > >
> > > > Signed-off-by: Pali Rohár <pali@kernel.org>
> > > > Signed-off-by: Marek Behún <kabel@kernel.org>
> > > > ---
> > > > Changes since v1:
> > > > - just changed the new Kconfig option name and associated help string
> > > > ---
> > > > common/board_f.c | 8 +++++++-
> > > > dts/Kconfig | 6 ++++++
> > > > 2 files changed, 13 insertions(+), 1 deletion(-)
> > >
> > > Can we just make this the normal behaviour? I think it makes more
> > > sense to change the FDT after we have relocated it.
Can we?
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]
next prev parent reply other threads:[~2022-11-21 17:45 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-27 18:12 [PATCH] board_f: Add support for CONFIG_OF_BOARD_FIXUP for XIP images Pali Rohár
2022-08-28 3:47 ` Marek Behún
2022-08-28 9:33 ` Pali Rohár
2022-08-28 15:19 ` [PATCH v2] " Marek Behún
2022-10-09 11:32 ` Pali Rohár
2022-10-10 23:48 ` Simon Glass
2022-11-01 23:23 ` Pali Rohár
2022-11-21 17:42 ` Pali Rohár
2022-11-21 17:45 ` Tom Rini [this message]
2022-11-21 18:10 ` Marek Behún
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=20221121174532.GX7282@bill-the-cat \
--to=trini@konsulko.com \
--cc=kabel@kernel.org \
--cc=pali@kernel.org \
--cc=sjg@chromium.org \
--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