u-boot.lists.denx.de archive mirror
 help / color / mirror / Atom feed
From: Ilias Apalodimas <ilias.apalodimas@linaro.org>
To: Mark Kettenis <mark.kettenis@xs4all.nl>
Cc: zong.li@sifive.com, trini@konsulko.com,
	bharat.gooty@broadcom.com, rayagonda.kokatanur@broadcom.com,
	rick@andestech.com, ycliang@andestech.com, fitzsim@fitzsim.org,
	sjg@chromium.org, bmeng.cn@gmail.com, marek.behun@nic.cz,
	green.wan@sifive.com, seanga2@gmail.com, lukas@auer.io,
	brad.kim@semifive.com, xypron.glpk@gmx.de,
	david.abdurachmanov@sifive.com, dimitri.ledkov@canonical.com,
	u-boot@lists.denx.de
Subject: Re: [PATCH 1/3] treewide: Remove OF_PRIOR_STAGE from RISC-V boards
Date: Wed, 29 Sep 2021 16:11:38 +0300	[thread overview]
Message-ID: <YVRmCs/ysQB+PvoI@apalos.home> (raw)
In-Reply-To: <5614943fc1ec0ac8@bloch.sibelius.xs4all.nl>

Hi Mark, 

On Wed, Sep 29, 2021 at 02:59:10PM +0200, Mark Kettenis wrote:
> > > > > >

[...]

> > > > > > I was wondering if we need to check CONFIG_OF_BOARD here? I'm not sure
> > > > > > whether we should distinguish the value of a1 register which is
> > > 
> > > Yes, it seems to me that we could use a config to separate the case
> > > between the prior stage and the _end. 
> > 
> > Untangling OF_SEPARATE and OF_BOARD is part of a bigger revamp I wanted to 
> > do on the handover of a device tree from previous bootloaders,  since we do 
> > have similar 'problems' in Arm and TF-A.  But in principle OF_SEPARATE
> > shouldn't have per board code to overwrite it.  OF_BOARD should be used for
> > that.  OF_SEPARATE should merely mean "The dtb is concatenated to my U-Boot
> > binary.
> > 
> > Right now RISC-V uses OF_SEPARATE reads the DTB on SPL and then goes back
> > to using the a1 register for U-Boot proper.  We could instead read the 
> > U-Boot concatenated DTB always in that case.  OF_BOARD would then be used in
> > case OpenSBI is compiled with a *different* DTB and you'd want to use that.
> > Any idea if OpenSBI performs fixups before handing over the dtb in a1?
> 
> It does.  One of the things it does is add a reserved memory entry for
> itself.
> 

Ah lovely :(, then untangling that is not an option atm :(.  We still have
to keep board_fdt_blob_setup() a __weak symbol for those boards, even if
OF_SEPARATE is selected.

> > Unfortunately I don't have a board to test apart from QEMU.  Let me respin
> > this, with a potential fix I have in mind and we can discuss further.
> > 
> > > Just note that, there is a patch
> > > on the fly, it modifies the same snippet of code, you might need to
> > > update your code based on top of it.
> > > https://lists.denx.de/pipermail/u-boot/2021-September/460378.html
> > 
> > I'll reply to that and see if the _end is indeed a problem.
> > 
> > Thanks
> > /Ilias
> > 
Thanks
/Ilias

      reply	other threads:[~2021-09-29 13:12 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-27  6:47 Ilias Apalodimas
2021-09-27  6:47 ` [PATCH 2/3] board: arm: Remove OF_PRIOR_STAGE Ilias Apalodimas
2021-09-27 20:15   ` Simon Glass
2021-09-27  6:47 ` [PATCH 3/3] treewide: " Ilias Apalodimas
2021-09-27 20:15   ` Simon Glass
2021-09-27 20:14 ` [PATCH 1/3] treewide: Remove OF_PRIOR_STAGE from RISC-V boards Simon Glass
2021-09-29  8:33 ` Zong Li
2021-09-29  9:02   ` Ilias Apalodimas
2021-09-29 10:17     ` Ilias Apalodimas
2021-09-29 11:51       ` Zong Li
2021-09-29 12:55         ` Ilias Apalodimas
2021-09-29 12:59           ` Mark Kettenis
2021-09-29 13:11             ` Ilias Apalodimas [this message]

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=YVRmCs/ysQB+PvoI@apalos.home \
    --to=ilias.apalodimas@linaro.org \
    --cc=bharat.gooty@broadcom.com \
    --cc=bmeng.cn@gmail.com \
    --cc=brad.kim@semifive.com \
    --cc=david.abdurachmanov@sifive.com \
    --cc=dimitri.ledkov@canonical.com \
    --cc=fitzsim@fitzsim.org \
    --cc=green.wan@sifive.com \
    --cc=lukas@auer.io \
    --cc=marek.behun@nic.cz \
    --cc=mark.kettenis@xs4all.nl \
    --cc=rayagonda.kokatanur@broadcom.com \
    --cc=rick@andestech.com \
    --cc=seanga2@gmail.com \
    --cc=sjg@chromium.org \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    --cc=xypron.glpk@gmx.de \
    --cc=ycliang@andestech.com \
    --cc=zong.li@sifive.com \
    --subject='Re: [PATCH 1/3] treewide: Remove OF_PRIOR_STAGE from RISC-V boards' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).