public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Etienne CARRIERE - foss <etienne.carriere@foss.st.com>
To: Sughosh Ganu <sughosh.ganu@linaro.org>,
	"u-boot@lists.denx.de" <u-boot@lists.denx.de>
Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>,
	Ilias Apalodimas <ilias.apalodimas@linaro.org>,
	Masahisa Kojima <masahisa.kojima@linaro.org>,
	Patrice CHOTARD - foss <patrice.chotard@foss.st.com>,
	Patrick DELAUNAY - foss <patrick.delaunay@foss.st.com>,
	Yann GAUTIER <yann.gautier@st.com>,
	"Michal Simek" <michal.simek@amd.com>,
	Jassi Brar <jaswinder.singh@linaro.org>
Subject: Re: [PATCH v2 00/21] FWU: Migrate FWU metadata to version 2
Date: Tue, 20 Feb 2024 09:43:54 +0000	[thread overview]
Message-ID: <0ace0a3a8a94407b84ee95c34eefdafc@foss.st.com> (raw)
In-Reply-To: <20240212074712.3657076-1-sughosh.ganu@linaro.org>

Hello Sughosh,

Sorry for this very late reply especially since I have a quite negative feedback  on the proposed changes.

I don't think FWU metadata version 1 should be removed from U-Boot support.
There are existing immutable boot agent relying on format v1, starting from the Synquacer boards based on SCP-firmware v2.11 [1] onward (at least up to latest v2.13 tag) and the stm32mp1 platforms based on TF-A v2.7 [2] onward (at least up to latest tag v2.10). These platforms should be able to update there EFI firmware hence needing the update agent (U-Boot) to support format v1.

With the proposed series, the new format v2 contains the same information the previous mdata v1 based implementation did (apart that some info where built-in whereas v2 describe them from the mdata storage area).
Could it be possible the implementation support both, using for example a internal structure fed from either format v1 or v2 content read from the storage, and used to update the mdata  v1 or v2 format storage layout?

[1] https://gitlab.arm.com/firmware/SCP-firmware/-/blob/v2.11.0/product/synquacer/include/fwu_mdata.h
[2] https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/refs/tags/v2.7/include/drivers/fwu/fwu_metadata.h

Best regards,
Etienne

> From: Sughosh Ganu <sughosh.ganu@linaro.org>
> 
> The following patches migrate the FWU metadata access code to version
> 2 of the structure. This is based on the structure definition as
> defined in the latest rev of the FWU Multi Bank Update specification
> [1].
> 
> Since the version 1 of the structure has currently been adopted on a
> couple of platforms, it was decided to have a clean migration of the
> metadata to version 2 only, instead of supporting both the versions of
> the structure. Also, based on consultations with the main author of
> the specification, it is expected that any further changes in the
> structure would be minor tweaks, and not be significant. Hence a
> migration to version 2.
> 
> Similar migration is also being done in TF-A, including migrating the
> ST platform port to support version 2 of the metadata structure [2].
> 
> @Michal, I tested the metadata for the two image per bank case, and it
> works fine on the ST board. Kindly test this on your board as well.
> 
> @Kojima-san, Please help in testing the version 2 on your
> board. Thanks.
> 
> 
> [1] - https://developer.arm.com/documentation/den0118/latest/
> [2] - https://review.trustedfirmware.org/q/topic:%22topics/fwu_metadata_v2_migration%22
> 
> Changes since V1:
> 
> * Do not define flexible array members inside the structures.
> * Access the image information related fields in the metadata using
>   the helper functions defined in an earlier patch.
> * Access fwu_fw_store_desc structure using pointer arithmetic.
> 
> (snip)

  parent reply	other threads:[~2024-02-20  9:44 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-12  7:46 [PATCH v2 00/21] FWU: Migrate FWU metadata to version 2 Sughosh Ganu
2024-02-12  7:46 ` [PATCH v2 01/21] configs: fwu: remove FWU configs for metadata V2 migration Sughosh Ganu
2024-02-12  7:46 ` [PATCH v2 02/21] fwu: metadata: migrate to version 2 of the structure Sughosh Ganu
2024-02-12  7:46 ` [PATCH v2 03/21] drivers: fwu: add the size parameter to the metadata access API's Sughosh Ganu
2024-02-12  7:46 ` [PATCH v2 04/21] fwu: add helper functions for getting image description offsets Sughosh Ganu
2024-02-12  7:46 ` [PATCH v2 05/21] fwu: make changes to support version 2 of FWU metadata Sughosh Ganu
2024-02-12  7:46 ` [PATCH v2 06/21] fwu: add some API's for metadata version 2 access Sughosh Ganu
2024-02-12  7:46 ` [PATCH v2 07/21] drivers: fwu: mtd: allocate buffer for image info dynamically Sughosh Ganu
2024-02-12  7:46 ` [PATCH v2 08/21] drivers: fwu: allocate memory for metadata copies Sughosh Ganu
2024-02-12  7:47 ` [PATCH v2 09/21] fwu: add a function to put a bank in Trial State Sughosh Ganu
2024-02-12  7:47 ` [PATCH v2 10/21] capsule: accept a bank on a successful update Sughosh Ganu
2024-02-12  7:47 ` [PATCH v2 11/21] fwu: mtd: modify the DFU API's to align with metadata version 2 Sughosh Ganu
2024-02-12  7:47 ` [PATCH v2 12/21] efi_firmware: fwu: do not read FWU metadata on sandbox Sughosh Ganu
2024-02-12  7:47 ` [PATCH v2 13/21] efi_firmware: fwu: get the number of FWU banks at runtime Sughosh Ganu
2024-02-12  7:47 ` [PATCH v2 14/21] cmd: fwu: align the command with metadata version 2 Sughosh Ganu
2024-02-12  7:47 ` [PATCH v2 15/21] test: fwu: align the FWU metadata access test with " Sughosh Ganu
2024-02-12  7:47 ` [PATCH v2 16/21] fwu: remove the config symbols for number of banks and images Sughosh Ganu
2024-02-12  7:47 ` [PATCH v2 17/21] tools: mkfwumdata: migrate to metadata version 2 Sughosh Ganu
2024-02-15 14:31   ` Michal Simek
2024-02-19 11:42     ` Sughosh Ganu
2024-02-12  7:47 ` [PATCH v2 18/21] tools: mkfwumdata: add logic to append vendor data to the FWU metadata Sughosh Ganu
2024-02-15 14:31   ` Michal Simek
2024-02-12  7:47 ` [PATCH v2 19/21] tools: mkfwumdata: fix the size parameter to the fwrite call Sughosh Ganu
2024-02-12  7:47 ` [PATCH v2 20/21] configs: fwu: re-enable FWU configs Sughosh Ganu
2024-02-12  7:47 ` [PATCH v2 21/21] doc: fwu: make changes for supporting FWU Metadata version 2 Sughosh Ganu
2024-02-20  9:43 ` Etienne CARRIERE - foss [this message]
2024-02-20 11:15   ` [PATCH v2 00/21] FWU: Migrate FWU metadata to " 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=0ace0a3a8a94407b84ee95c34eefdafc@foss.st.com \
    --to=etienne.carriere@foss.st.com \
    --cc=ilias.apalodimas@linaro.org \
    --cc=jaswinder.singh@linaro.org \
    --cc=masahisa.kojima@linaro.org \
    --cc=michal.simek@amd.com \
    --cc=patrice.chotard@foss.st.com \
    --cc=patrick.delaunay@foss.st.com \
    --cc=sughosh.ganu@linaro.org \
    --cc=u-boot@lists.denx.de \
    --cc=xypron.glpk@gmx.de \
    --cc=yann.gautier@st.com \
    /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