[PATCH 1/2] bloblist: fix the overriding of fdt from bloblist
Simon Glass
sjg at chromium.org
Fri Mar 28 16:12:51 CET 2025
Hi Raymond,
On Fri, 28 Mar 2025 at 08:38, Raymond Mao <raymond.mao at linaro.org> wrote:
>
> Hi Simon,
>
> On Fri, 28 Mar 2025 at 10:26, Simon Glass <sjg at chromium.org> wrote:
> >
> > Hi Raymond,
> >
> > On Fri, 28 Mar 2025 at 08:17, Raymond Mao <raymond.mao at linaro.org> wrote:
> > >
> > > Hi Simon,
> > >
> > > On Fri, 28 Mar 2025 at 07:34, Simon Glass <sjg at chromium.org> wrote:
> > > >
> > > > Hi Raymond,
> > > >
> > > > On Thu, 27 Mar 2025 at 17:13, Raymond Mao <raymond.mao at linaro.org> wrote:
> > > > >
> > > > > When a bloblist is valid and contains fdt, it explicitly means
> > > > > a previous boot stage is passing transfer list compliant with
> > > > > Firmware Handoff specification, thus the fdt from bloblist should
> > > > > not be overridden with the ones from board or env variables.
> > > >
> > > > Why is that? The board can choose to override it, if it wishes, but in
> > > > general, if gd->fdt_blob is already set up, it should return -EEXIST
> > > > from board_fdt_blob_setup().
> > > >
> > > First, if a board is running in a "stand-alone" mode, there should not
> > > be a transfer list passed from the previous boot stage.
> > > Secondly, overriding the transfer list with the env variables does not
> > > make sense, since booti, bootm and bootefi are actually using the env
> > > variables to get the fdt when launching to the kernel.
> > > We need to do the opposite way - override the env variable with the
> > > one pointing to the bloblist fdt (See my patch [2/2]), then all boot
> > > commands can work with the transfer list.
> >
> > OK, but now we are going back to the OF_BLOBLIST thing that I did 18
> > months ago and ended up being the major reason I had to create my own
> > U-Boot tree just to get my boards working.
> >
> > Anyway, Tom has agreed to let me maintain bloblist (and maybe fdt?)
> > again, so I am going to send a series to 'clean this up' as Ilias
> > would say. Let's see if that passes muster, because I do agree with
> > you that if the devicetree is in the bloblist, it should be
> > definitive.
> >
> > Re your second point, do you know why we have fdt_addr? Is it just for
> > the distro scripts? I'm wondering if we could restrict the use of
> > fdt_addr to just the places that actually need to use environment
> > variables.
> >
>
> I understand that there is a clean-up plan from you, so this time I am
> just trying to minimize the changes (as you can see, just a few lines)
> to make the transfer list work again.
> I am also working on the OP-TEE repo project to enable qemu v8 build
> with transfer list enabled, so users can just use a single command to
> test the Firmware Handoff feature from TF-A to kernel.
> But since 70fe23859437, it is broken in U-Boot due to the overriding
> of the fdt, I made this hotfix in order to let us have the feature
> work again before the upcoming release.
Yes I looked up that commit but it was over a year ago so I assumed
that something else was going on.
Re your project, it would be good to get that running in CI. My old
standard passage stuff had such a test and I think it was pretty easy
within U-Boot.
Anyway, this patch doesn't make things any worse.
Reviewed-by: Simon Glass <sjg at chromium.org>
Regards,
SImon
More information about the U-Boot
mailing list