[PATCH 0/4] bloblist: fdt: Clean up the code
Raymond Mao
raymond.mao at linaro.org
Thu Apr 3 21:54:22 CEST 2025
Hi Simon,
On Thu, 3 Apr 2025 at 14:18, Simon Glass <sjg at chromium.org> wrote:
>
> Hi Raymond,
>
> On Fri, 4 Apr 2025 at 07:13, Raymond Mao <raymond.mao at linaro.org> wrote:
> >
> > Hi Simon,
> >
> > On Thu, 3 Apr 2025 at 13:57, Simon Glass <sjg at chromium.org> wrote:
> > >
> > > Hi Raymond,
> > >
> > > On Fri, 4 Apr 2025 at 03:09, Raymond Mao <raymond.mao at linaro.org> wrote:
> > > >
> > > > Hi Simon,
> > > >
> > > > On Fri, 28 Mar 2025 at 11:44, Simon Glass <sjg at chromium.org> wrote:
> > > > >
> > > > > The bloblist code took what I consider to be a wrong turn a year or so
> > > > > ago. As discussed with Tom, this series proposes a way to arrange things
> > > > > so that it is simpler to understand and manage.
> > > > >
> > > > > - Unwind some of the nesting in bloblist_init()
> > > > > - Avoid needing to init the bloblist just to get the FDT
> > > > > - Create a deterministic OF_BLOBLIST option rather than using guesswork
> > > > >
> > > > We now have a kconfig BLOBLIST_PASSAGE_MANDATORY which means
> > > > mandatorily use bloblist to hand over everything between boot stages
> > > > including fdt, creating OF_BLOBLIST is not necessary.
> > >
> > > Yes, I noticed that, but BLOBLIST_PASSAGE_MANDATORY indicates that
> > > there must be a bloblist, not that it must contain a devicetree. So I
> > > wasn't sure about removing it.
> > >
> >
> > See my comments to your [2/4] patch, if BLOBLIST_PASSAGE_MANDATORY is
> > selected, we can override any fdt from board or env with the one from
> > the bloblist.
>
> Yes, but we should be explicit about what is going on here. With
> OF_BLOBLIST we indicate that the devicetree is coming from the
> bloblist. It becomes one of the sources for devicetree, like
> OF_SEPARATE and OF_EMBED
>
BLOBLIST_PASSAGE_MANDATORY indicates the fdt from bloblist will be
mandatorily used and override other fdt sources like from the board or
env variables.
> > Moreover, it is not just for fdt, but for everything that is being
> > handed over from the previous boot stage using bloblist, but
> > OF_BLOBLIST is for fdt only.
>
> What other things are there?
All transfer entries defined in the Firmware Handoff spec should be
handed over via bloblist, for example, TPM event logs.
Regards,
Raymond
>
> > I don't think it is a good idea to replace BLOBLIST_PASSAGE_MANDATORY
> > with OF_BLOBLIST.
>
> I am OK with keeping BLOBLIST_PASSAGE_MANDATORY for now. This series
> does not remove it.
>
> >
> > > But actually, thinking about it just now, we can remove
> > > BLOBLIST_PASSAGE_MANDATORY, since U-Boot won't make it that far if
> > > there is no bloblist. It will die in fdtdec_setup(). Take a look and
> > > see if you agree.
>
> Regards,
> SImon
>
> > >
> > > >
> > > > > It is to be hoped that we can get a platform which uses OF_BLOBLIST into
> > > > > CI at some point. In the meantime, the standard passage series[1] could
> > > > > be resurrected to give some coverage.
> > > > >
> > > > > [1] https://patchwork.ozlabs.org/project/uboot/list/?series=281465&state=*
> > > > >
> > > > >
> > > > > Simon Glass (4):
> > > > > bloblist: Simplify bloblist init
> > > > > fdt: Introduce OF_BLOBLIST
> > > > > bloblist: Provide access to the FDT address
> > > > > fdt: Obtain the FDT from bloblist without parsing it
> > > > >
> > > > > arch/arm/lib/xferlist.c | 6 +-
> > > > > common/bloblist.c | 102 ++++++++++++++++++-----------
> > > > > doc/develop/devicetree/control.rst | 3 +
> > > > > dts/Kconfig | 8 +++
> > > > > include/bloblist.h | 16 ++++-
> > > > > lib/fdtdec.c | 65 +++++++-----------
> > > > > 6 files changed, 116 insertions(+), 84 deletions(-)
> > > > >
> > > > > --
> > > > > 2.43.0
> > > > >
> > >
> > > Regards,
> > > Simon
More information about the U-Boot
mailing list