public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [PATCH v2 00/21] FWU: Migrate FWU metadata to version 2
@ 2024-02-12  7:46 Sughosh Ganu
  2024-02-12  7:46 ` [PATCH v2 01/21] configs: fwu: remove FWU configs for metadata V2 migration Sughosh Ganu
                   ` (21 more replies)
  0 siblings, 22 replies; 27+ messages in thread
From: Sughosh Ganu @ 2024-02-12  7:46 UTC (permalink / raw)
  To: u-boot
  Cc: Heinrich Schuchardt, Ilias Apalodimas, Masahisa Kojima,
	Patrice Chotard, Patrick Delaunay, Yann Gautier, Etienne Carriere,
	Michal Simek, Jassi Brar


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.


Sughosh Ganu (21):
  configs: fwu: remove FWU configs for metadata V2 migration
  fwu: metadata: migrate to version 2 of the structure
  drivers: fwu: add the size parameter to the metadata access API's
  fwu: add helper functions for getting image description offsets
  fwu: make changes to support version 2 of FWU metadata
  fwu: add some API's for metadata version 2 access
  drivers: fwu: mtd: allocate buffer for image info dynamically
  drivers: fwu: allocate memory for metadata copies
  fwu: add a function to put a bank in Trial State
  capsule: accept a bank on a successful update
  fwu: mtd: modify the DFU API's to align with metadata version 2
  efi_firmware: fwu: do not read FWU metadata on sandbox
  efi_firmware: fwu: get the number of FWU banks at runtime
  cmd: fwu: align the command with metadata version 2
  test: fwu: align the FWU metadata access test with version 2
  fwu: remove the config symbols for number of banks and images
  tools: mkfwumdata: migrate to metadata version 2
  tools: mkfwumdata: add logic to append vendor data to the FWU metadata
  tools: mkfwumdata: fix the size parameter to the fwrite call
  configs: fwu: re-enable FWU configs
  doc: fwu: make changes for supporting FWU Metadata version 2

 arch/sandbox/Kconfig                     |   6 -
 board/armltd/corstone1000/corstone1000.c |   2 +-
 cmd/fwu_mdata.c                          |  45 ++-
 configs/synquacer_developerbox_defconfig |   1 -
 doc/board/socionext/developerbox.rst     |   9 +-
 doc/develop/uefi/fwu_updates.rst         |  12 +-
 doc/usage/cmd/fwu_mdata.rst              |  12 +-
 drivers/fwu-mdata/fwu-mdata-uclass.c     |  10 +-
 drivers/fwu-mdata/gpt_blk.c              |  27 +-
 drivers/fwu-mdata/raw_mtd.c              |  85 +++--
 include/fwu.h                            | 139 +++++++-
 include/fwu_mdata.h                      |  56 +++-
 lib/efi_loader/efi_capsule.c             |  12 +-
 lib/efi_loader/efi_firmware.c            |  20 +-
 lib/fwu_updates/Kconfig                  |  11 -
 lib/fwu_updates/fwu.c                    | 401 +++++++++++++++++++----
 lib/fwu_updates/fwu_mtd.c                |  81 +++--
 test/dm/fwu_mdata.c                      |  56 ++--
 test/dm/fwu_mdata_disk_image.h           | 124 +++----
 tools/mkfwumdata.c                       | 132 ++++++--
 20 files changed, 924 insertions(+), 317 deletions(-)

-- 
2.34.1



^ permalink raw reply	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2024-02-20 11:16 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [PATCH v2 00/21] FWU: Migrate FWU metadata to " Etienne CARRIERE - foss
2024-02-20 11:15   ` Sughosh Ganu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox