Hi Heinrich,

On Thu, 18 Jul 2024 at 15:53, Heinrich Schuchardt <xypron.g...@gmx.de> wrote:
>
> On 13.07.24 09:00, Simon Glass wrote:
> > Universal Payload provides a standard way of handing off control between
> > two firmware phases. Add support for reading the handoff information into
> > a structure.
> >
> > Signed-off-by: Simon Glass <s...@chromium.org>
> > ---
> >
> > (no changes since v1)
> >
> >   MAINTAINERS               |   7 +
> >   boot/Kconfig              |  19 ++
> >   boot/Makefile             |   3 +
> >   boot/upl_common.c         |  60 ++++
> >   boot/upl_common.h         |  24 ++
> >   boot/upl_read.c           | 588 ++++++++++++++++++++++++++++++++++++++
> >   configs/sandbox_defconfig |   1 +
> >   include/upl.h             | 352 +++++++++++++++++++++++
> >   8 files changed, 1054 insertions(+)
> >   create mode 100644 boot/upl_common.c
> >   create mode 100644 boot/upl_common.h
> >   create mode 100644 boot/upl_read.c
> >   create mode 100644 include/upl.h
> >
[..]

> > diff --git a/boot/upl_read.c b/boot/upl_read.c
> > new file mode 100644
> > index 00000000000..2d8caa6ef11
> > --- /dev/null
> > +++ b/boot/upl_read.c
> > @@ -0,0 +1,588 @@

[..]

> > +/**
> > + * decode_root_props() - Decode root properties from the tree
> > + *
> > + * @upl: UPL state
> > + * @node: Node to decode
> > + * Return 0 if OK, -ve on error
> > + */
> > +static int decode_root_props(struct upl *upl, ofnode node)
> > +{
> > +     int ret;
> > +
> > +     ret = read_uint(node, UPLP_ADDRESS_CELLS, &upl->addr_cells);
> > +     if (!ret)
> > +             ret = read_uint(node, UPLP_SIZE_CELLS, &upl->size_cells);
>
> Why do we need a special handling of addr_cells and size_cells?
> The device-tree provided by UPL follows the device-tree specification
> which requires to set these properties in the parent of the node.

This is just decoding the information so it can be used later as
needed. For example, we might want to validate that it is correct
before using the data.

[..]

Regards,
Simon

Reply via email to