From: Michal Simek <michal.simek@xilinx.com>
To: Masami Hiramatsu <masami.hiramatsu@linaro.org>,
Michal Simek <michal.simek@xilinx.com>
Cc: Sughosh Ganu <sughosh.ganu@linaro.org>,
Michal Simek <monstr@monstr.eu>, U-Boot <u-boot@lists.denx.de>,
Heinrich Schuchardt <xypron.glpk@gmx.de>,
Patrick Delaunay <patrick.delaunay@foss.st.com>,
Patrice Chotard <patrice.chotard@foss.st.com>,
Alexander Graf <agraf@csgraf.de>,
AKASHI Takahiro <takahiro.akashi@linaro.org>,
Simon Glass <sjg@chromium.org>, Bin Meng <bmeng.cn@gmail.com>,
Ilias Apalodimas <ilias.apalodimas@linaro.org>,
Jose Marinho <jose.marinho@arm.com>,
Grant Likely <grant.likely@arm.com>,
Tom Rini <trini@konsulko.com>,
Etienne Carriere <etienne.carriere@linaro.org>
Subject: Re: [PATCH v4 01/11] FWU: Add FWU metadata structure and driver for accessing metadata
Date: Wed, 9 Feb 2022 08:21:00 +0100 [thread overview]
Message-ID: <b9e7b422-7bec-e7af-6162-7da2f4e3d8a2@xilinx.com> (raw)
In-Reply-To: <CAA93ih39YG7KghibS6PR7jDFWqW2t6hHpOdOgx4-M_01DF4XUA@mail.gmail.com>
Hi,
On 2/9/22 00:39, Masami Hiramatsu wrote:
> Hi Michal,
>
> 2022年2月8日(火) 23:27 Michal Simek <michal.simek@xilinx.com>:
>>
>>
>>
>> On 2/8/22 15:14, Masami Hiramatsu wrote:
>>> 2022年2月8日(火) 22:45 Michal Simek <michal.simek@xilinx.com>:
>>>>
>>>>
>>>>
>>>> On 2/8/22 14:36, Masami Hiramatsu wrote:
>>>>> 2022年2月8日(火) 20:35 Sughosh Ganu <sughosh.ganu@linaro.org>:
>>>>>>
>>>>>> On Tue, 8 Feb 2022 at 16:26, Michal Simek <monstr@monstr.eu> wrote:
>>>>>>>
>>>>>>> po 7. 2. 2022 v 19:21 odesílatel Sughosh Ganu <sughosh.ganu@linaro.org> napsal:
>>>>>>>>
>>>>>>>> In the FWU Multi Bank Update feature, the information about the
>>>>>>>> updatable images is stored as part of the metadata, which is stored on
>>>>>>>> a dedicated partition. Add the metadata structure, and a driver model
>>>>>>>> uclass which provides functions to access the metadata. These are
>>>>>>>> generic API's, and implementations can be added based on parameters
>>>>>>>> like how the metadata partition is accessed and what type of storage
>>>>>>>> device houses the metadata.
>>>>>>>>
>>>>>>>> A device tree node fwu-mdata has been added, which is used for
>>>>>>>> pointing to the storage device which contains the FWU metadata. The
>>>>>>>> fwu-mdata node is u-boot specific, and can be added the platform's
>>>>>>>> u-boot dtsi file.
>>>>>>>>
>>>>>>>> Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
>>>>>>>> ---
>>>>>>>>
>>>>>>>> Changes since V3:
>>>>>>>> * Move the FWU metadata access to driver model
>>>>>>>> * Get the storage device containing the metadata from a device tree
>>>>>>>> property instead of a platform helper function
>>>>>>>>
>>>>>>>> arch/arm/dts/stm32mp157c-dk2-u-boot.dtsi | 7 +
>>>>>>>> .../firmware/fwu-mdata.txt | 18 +
>>>>>>>> drivers/Kconfig | 2 +
>>>>>>>> drivers/Makefile | 1 +
>>>>>>>> drivers/fwu-mdata/Kconfig | 7 +
>>>>>>>> drivers/fwu-mdata/Makefile | 6 +
>>>>>>>> drivers/fwu-mdata/fwu-mdata-uclass.c | 434 ++++++++++++++++++
>>>>>>>> include/dm/uclass-id.h | 1 +
>>>>>>>> include/fwu.h | 51 ++
>>>>>>>> include/fwu_mdata.h | 67 +++
>>>>>>>> 10 files changed, 594 insertions(+)
>>>>>>>> create mode 100644 doc/device-tree-bindings/firmware/fwu-mdata.txt
>>>>>>>> create mode 100644 drivers/fwu-mdata/Kconfig
>>>>>>>> create mode 100644 drivers/fwu-mdata/Makefile
>>>>>>>> create mode 100644 drivers/fwu-mdata/fwu-mdata-uclass.c
>>>>>>>> create mode 100644 include/fwu.h
>>>>>>>> create mode 100644 include/fwu_mdata.h
>>>>>>>>
>>>>>>>> diff --git a/arch/arm/dts/stm32mp157c-dk2-u-boot.dtsi b/arch/arm/dts/stm32mp157c-dk2-u-boot.dtsi
>>>>>>>> index 06ef3a4095..3bec6107f7 100644
>>>>>>>> --- a/arch/arm/dts/stm32mp157c-dk2-u-boot.dtsi
>>>>>>>> +++ b/arch/arm/dts/stm32mp157c-dk2-u-boot.dtsi
>>>>>>>> @@ -4,3 +4,10 @@
>>>>>>>> */
>>>>>>>>
>>>>>>>> #include "stm32mp157a-dk1-u-boot.dtsi"
>>>>>>>> +
>>>>>>>> +/ {
>>>>>>>> + fwu-mdata {
>>>>>>>> + compatible = "u-boot,fwu-mdata";
>>>>>>>> + fwu-mdata-store = <&sdmmc1>;
>>>>>>>> + };
>>>>>>>> +};
>>>>>>>> diff --git a/doc/device-tree-bindings/firmware/fwu-mdata.txt b/doc/device-tree-bindings/firmware/fwu-mdata.txt
>>>>>>>> new file mode 100644
>>>>>>>> index 0000000000..c766b595ef
>>>>>>>> --- /dev/null
>>>>>>>> +++ b/doc/device-tree-bindings/firmware/fwu-mdata.txt
>>>>>>>> @@ -0,0 +1,18 @@
>>>>>>>> +FWU Metadata Access Devicetree Binding
>>>>>>>> +
>>>>>>>> +The FWU Multi Bank Update feature uses a metadata structure, stored on
>>>>>>>> +a separate partition for keeping information on the set of updatable
>>>>>>>> +images. The device tree node provides information on the storage
>>>>>>>> +device that contains the FWU metadata.
>>>>>>>> +
>>>>>>>> +Required properties :
>>>>>>>> +
>>>>>>>> +- compatible : "u-boot,fwu-mdata";
>>>>>>>> +- fwu-mdata-store : should point to the storage device which contains
>>>>>>>> + the FWU metadata partition.
>>>>>>>
>>>>>>> In 0/11 you are describing GPT partitions but I don't think this
>>>>>>> binding is generic enough to describe
>>>>>>> other cases. It is saying device but not where exactly it is.
>>>>>>> I didn't read the whole series yet but arm spec recommends GPT but dt
>>>>>>> binding should be generic enough to describe
>>>>>>> also other cases.
>>>>>>> We are saving this structure to qspi for example but current binding
>>>>>>> can't be used for it.
>>>>>>
>>>>>> I would wait to see Masami's implementation of this feature. If I am
>>>>>> not wrong, his platform too is enabling this feature with a spi as the
>>>>>> storage device. Maybe we can instead put a list of <device partition>
>>>>>> tuples which can then list the device and partition number of the
>>>>>> metadata partitions.
>>>>>
>>>>> Yes, I would like to define new compatible for sf backend, e.g.
>>>>> "u-boot,fwu-mdata-sf".
>>>>
>>>> backend is fine. What does this compatible string have to do with it?
>>>> I didn't see any fwu-mdata-gpt in this series.
>>>
>>> Sughosh made it "fwu-mdata" but I think it should be "fwu-mdata-gpt"
>>> if the required parameters are different.
>>>
>>>>
>>>>> It will have the fwu-mdata-store to point the SPI flash device, and
>>>>> will have a list of offset information for the metadata.
>>>>
>>>> Can you describe it?
>>>>
>>>> Something like for raw accesses?
>>>> fwu-mdta-store = <&qspi 0 XXXX>;
>>>
>>> I'm still not sure what is the best way. What I thought was,
>>>
>>> fwu-mdata-store = <&spi-flash>;
>>> fwu-mdata-offsets = <500000, 520000>;
>>
>> as I said. Before this is applied I think we should work on generic proposal how
>> to describe it. Because the same way can be used for u-boot variables and maybe
>> others.
>
> Agreed. This also reminds me the dfu_alt_info. Currently the dfu_alt_info
> is passed via u-boot variables, but this should be a (important) part of
> firmware information. I think it should be defined in the devicetree too.
> (actually, stm32 builds dfu_alt_info from the device information already)
yes that capsule update via dfu_alt_info and upgrading all that structure should
be also the part of it. I am not saying in this series. On the top of this one
should be fine but it should be clear how this is supposed to work.
>> Definitely I would prefer to ask Rob for helping with this and get this to yaml
>> to be able to use the whole infrastructure to check it.
>
> Yeah, and at first we should define what information should be in the
> devicetree.
yes.
Thanks,
Michal
next prev parent reply other threads:[~2022-02-09 7:21 UTC|newest]
Thread overview: 64+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-07 18:19 [PATCH v4 00/11] FWU: Add support for FWU Multi Bank Update feature Sughosh Ganu
2022-02-07 18:19 ` [PATCH v4 01/11] FWU: Add FWU metadata structure and driver for accessing metadata Sughosh Ganu
2022-02-08 9:33 ` Masami Hiramatsu
2022-02-08 10:24 ` Sughosh Ganu
2022-02-08 11:23 ` Masami Hiramatsu
2022-02-08 10:56 ` Michal Simek
2022-02-08 11:35 ` Sughosh Ganu
2022-02-08 11:39 ` Michal Simek
2022-02-08 13:36 ` Masami Hiramatsu
2022-02-08 13:45 ` Michal Simek
2022-02-08 14:14 ` Masami Hiramatsu
2022-02-08 14:27 ` Michal Simek
2022-02-08 23:39 ` Masami Hiramatsu
2022-02-09 7:21 ` Michal Simek [this message]
2022-02-08 11:31 ` Michal Simek
2022-02-08 11:38 ` Sughosh Ganu
2022-02-08 11:44 ` Michal Simek
2022-02-08 11:54 ` Sughosh Ganu
2022-02-08 11:59 ` Michal Simek
2022-02-08 12:07 ` Sughosh Ganu
2022-02-08 12:14 ` Michal Simek
2022-02-08 12:49 ` Sughosh Ganu
2022-02-07 18:19 ` [PATCH v4 02/11] FWU: Add FWU metadata access driver for GPT partitioned block devices Sughosh Ganu
2022-02-09 4:56 ` Masami Hiramatsu
2022-02-09 9:03 ` Sughosh Ganu
2022-02-09 11:47 ` Masami Hiramatsu
2022-02-09 18:40 ` Sughosh Ganu
2022-02-10 1:43 ` Masami Hiramatsu
2022-02-10 3:14 ` Masami Hiramatsu
2022-02-10 12:25 ` Sughosh Ganu
2022-02-11 1:58 ` Masami Hiramatsu
2022-02-07 18:19 ` [PATCH v4 03/11] FWU: stm32mp1: Add helper functions for accessing FWU metadata Sughosh Ganu
2022-02-07 18:19 ` [PATCH v4 04/11] FWU: STM32MP1: Add support to read boot index from backup register Sughosh Ganu
2022-02-07 18:19 ` [PATCH v4 05/11] EFI: FMP: Add provision to update image's ImageTypeId in image descriptor Sughosh Ganu
2022-02-10 2:48 ` AKASHI Takahiro
2022-02-10 7:18 ` Sughosh Ganu
2022-02-10 7:58 ` AKASHI Takahiro
2022-02-10 10:10 ` Sughosh Ganu
2022-02-14 3:24 ` AKASHI Takahiro
2022-02-14 5:42 ` Sughosh Ganu
2022-02-15 1:51 ` AKASHI Takahiro
2022-02-15 6:38 ` Sughosh Ganu
2022-02-15 14:40 ` Ilias Apalodimas
2022-02-15 17:19 ` Sughosh Ganu
2022-02-17 8:22 ` Ilias Apalodimas
2022-02-17 10:10 ` Sughosh Ganu
2022-02-26 6:54 ` Heinrich Schuchardt
2022-02-26 9:54 ` Sughosh Ganu
2022-03-08 13:13 ` AKASHI Takahiro
2022-03-09 8:31 ` Ilias Apalodimas
2022-02-07 18:19 ` [PATCH v4 06/11] stm32mp1: Populate ImageTypeId values in EFI_FIRMWARE_IMAGE_DESCRIPTOR array Sughosh Ganu
2022-02-07 18:19 ` [PATCH v4 07/11] FWU: Add boot time checks as highlighted by the FWU specification Sughosh Ganu
2022-02-08 10:53 ` Michal Simek
2022-02-11 10:46 ` Sughosh Ganu
2022-02-07 18:19 ` [PATCH v4 08/11] FWU: Add support for FWU Multi Bank Update feature Sughosh Ganu
2022-02-07 18:19 ` [PATCH v4 09/11] FWU: cmd: Add a command to read FWU metadata Sughosh Ganu
2022-02-07 18:20 ` [PATCH v4 10/11] mkeficapsule: Add support for generating empty capsules Sughosh Ganu
2022-02-09 3:05 ` AKASHI Takahiro
2022-02-10 1:27 ` AKASHI Takahiro
2022-02-11 13:27 ` Sughosh Ganu
2022-02-11 13:25 ` Sughosh Ganu
2022-02-07 18:20 ` [PATCH v4 11/11] FWU: doc: Add documentation for the FWU feature Sughosh Ganu
2022-02-08 11:05 ` [PATCH v4 00/11] FWU: Add support for FWU Multi Bank Update feature Michal Simek
2022-02-08 12:09 ` Sughosh Ganu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b9e7b422-7bec-e7af-6162-7da2f4e3d8a2@xilinx.com \
--to=michal.simek@xilinx.com \
--cc=agraf@csgraf.de \
--cc=bmeng.cn@gmail.com \
--cc=etienne.carriere@linaro.org \
--cc=grant.likely@arm.com \
--cc=ilias.apalodimas@linaro.org \
--cc=jose.marinho@arm.com \
--cc=masami.hiramatsu@linaro.org \
--cc=monstr@monstr.eu \
--cc=patrice.chotard@foss.st.com \
--cc=patrick.delaunay@foss.st.com \
--cc=sjg@chromium.org \
--cc=sughosh.ganu@linaro.org \
--cc=takahiro.akashi@linaro.org \
--cc=trini@konsulko.com \
--cc=u-boot@lists.denx.de \
--cc=xypron.glpk@gmx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox