[PATCH v2 15/18] fdt: Allow the devicetree to come from a bloblist

Raymond Mao raymond.mao at linaro.org
Mon Dec 4 20:25:40 CET 2023


Hi Simon,

When `OF_BOARD` is defined, the FDT should be from one of
the board-specific mechanisms:
1. FDT from a bloblist via boot args
2. FDT in memory
I don't think we need a new build option to distinguish these two, since it
can be done in runtime by checking whether the boot args follow the FW
Handoff spec conventions and the FDT exists in the bloblist.
If it fulfills the above conditions, we can take the FDT from bloblist,
otherwise from the predefined memory address.
This is fully backward compatible without adding a new build option.

Regards,
Raymond

On Sat, 2 Dec 2023 at 13:32, Simon Glass <sjg at chromium.org> wrote:

> Hi Raymond,
>
> On Mon, 27 Nov 2023 at 12:53, Raymond Mao <raymond.mao at linaro.org> wrote:
> >
> > From: Simon Glass <sjg at chromium.org>
> >
> > Standard passage provides for a bloblist to be passed from one firmware
> > phase to the next. That can be used to pass the devicetree along as well.
> > If CONFIG_OF_BOARD is defined, a board custom routine will provide a
> > bloblist or a specified memory address to retrieve the devicetree at
> > runtime.
> > A devicetree from a bloblist is prioritized than the one from specified
> > memory region.
> >
> > Tests for this will be added as part of the Universal Payload work.
> >
> > Signed-off-by: Simon Glass <sjg at chromium.org>
> > Co-developed-by: Raymond Mao <raymond.mao at linaro.org>
> > Signed-off-by: Raymond Mao <raymond.mao at linaro.org>
> > ---
> > Changes in v2
> > - New patch file created for v2.
> >   Amended from the original patch
> >   "[v2,30/32] fdt: Allow the devicetree to come from a bloblist".
> >   Remove CONFIG_OF_BLOBLIST and FDTSRC_BLOBLIST, a DTB from a previous
> >   loader is defined by CONFIG_OF_BOARD. The DTB can be located either in
> the
> >   bloblist or from a specified memory address.
> >
> >  doc/develop/devicetree/control.rst |  8 +++--
> >  dts/Kconfig                        |  9 ++++--
> >  include/fdtdec.h                   |  3 +-
> >  lib/fdtdec.c                       | 52 +++++++++++++++++++++++-------
> >  4 files changed, 53 insertions(+), 19 deletions(-)
>
> This is a bit mangled. I spoke to Ilias about this as osfc and thought
> we had it figured out, but it was a bit rushed so perhaps not.
>
> OF_BOARD refers to a board-specific mechanism
>
> We should have OF_BLOBLIST to reference to this, a standard mechanism
> and not board-specific.
>
> Ideally all boards should use a bloblist to send their DT to U-Boot.
> E.g. Raspberry Pi.
>
> So I believe my original patch was closer to what we want.
>
> Regards,
> SImon
>


More information about the U-Boot mailing list