[PATCHv3 1/5] FWU: Add FWU metadata access driver for MTD storage regions

Jassi Brar jaswinder.singh at linaro.org
Tue Feb 28 01:58:29 CET 2023


On Sat, 4 Feb 2023 at 22:09, Jassi Brar <jaswinder.singh at linaro.org> wrote:
> >
> > +               fwu-mdata {
> > +                       compatible = "u-boot,fwu-mdata-mtd";
> > +                       fwu-mdata-store = <&spi_flash>;
> > +                       mdata-offsets = <0x500000 0x530000>;
> > +               };
> >
> > which is based on DT going to location which is already labelled.
> >
> >   79                                 partition at 500000 {
> >   80                                         label = "Ex-OPTEE";
> >   81                                         reg = <0x500000 0x200000>;
> >   82                                 };
> >
> The 'ex-optee' is actually unused so we never faced any issue. But
> yes, this is inconsistent.
>
> > I don't know what this space is used for but the whole code around is using MTD
> > partitions and it's infrastructure and this is using RAW access without MTD.
> >
> > Why not to create separate partitions just for storing metadata?
> > And also identify them like that.
> >
> > Or just switch it to complete RAW mode without MTD and then offsets can be used
> > (but I expect with different dt description).
> >
> The design predates my involvement in fwu. I guess the reason was to
> have a mechanism similar to GPT based implementation which uses a
> similar fwu-mdata {} node structure.  It does make sense to have
> dedicated partitions for primary and  secondary meta-data, identified
> by uuid (like Banks) or standard labels. But may be Sughosh/Ilias know
> why the current approach was chosen.
>
I changed the bindings to not require any changes to any non-FWU subsystem.
Now every bit of info is contained in 'fwu-mdata' node.
   https://lore.kernel.org/u-boot/20230228005218.1635781-1-jassisinghbrar@gmail.com/T/#u

Thanks.


More information about the U-Boot mailing list