diff options
author | Patrick Delaunay <patrick.delaunay@foss.st.com> | 2023-06-08 17:09:56 +0200 |
---|---|---|
committer | Patrice Chotard <patrice.chotard@foss.st.com> | 2023-06-16 11:04:41 +0200 |
commit | dac5b065125cc1b6733097b826cc3cd322a670a0 (patch) | |
tree | 20ee2b0ae6027f92f025a3fd426b5fc7ed51f46d | |
parent | 3a67b61ca04cea80e86008d83d6d996734609dfe (diff) | |
download | u-boot-dac5b065125cc1b6733097b826cc3cd322a670a0.zip u-boot-dac5b065125cc1b6733097b826cc3cd322a670a0.tar.gz u-boot-dac5b065125cc1b6733097b826cc3cd322a670a0.tar.bz2 |
stm32mp: stm32prog: Add support of FWU_MDATA partition type
Add support of "FWU_MDATA" partition type in flashlayout to select
the TF-A firmware update metadata partition type guid, associated to
U-Boot "system" partition type guid, FWU_MDATA_GUID introduced by
commit 2eaedc95164f ("FWU: Add FWU metadata structure and driver for
accessing metadata") and used in gpt_get_mdata_partitions() for
commit 554b38f7a532 ("FWU: Add FWU metadata access driver for GPT
partitioned block devices")
See also recommendation in FWU-PSA-A_DEN0118_1.0ALP3.pdf
4.1.2 Metadata integration with GPT
When embedded in a GPT, each metadata replica occupies a single
partition with PartitionTypeGUID = metadata_uuid.
UUID = 8a7a84a0-8387-40f6-ab41-a8b9a5a60d23
Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
-rw-r--r-- | arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c | 11 | ||||
-rw-r--r-- | arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.h | 1 |
2 files changed, 12 insertions, 0 deletions
diff --git a/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c b/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c index 030614c..773bae8 100644 --- a/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c +++ b/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c @@ -63,6 +63,12 @@ static const efi_guid_t uuid_mmc[3] = { ROOTFS_MMC2_UUID }; +/* + * GUID value defined in the FWU specification for identification + * of the FWU metadata partition. + */ +#define FWU_MDATA_UUID "8a7a84a0-8387-40f6-ab41-a8b9a5a60d23" + /* FIP type partition UUID used by TF-A*/ #define FIP_TYPE_UUID "19D5DF83-11B0-457B-BE2C-7559C13142A5" @@ -425,6 +431,8 @@ static int parse_type(struct stm32prog_data *data, } } else if (!strcmp(p, "FIP")) { part->part_type = PART_FIP; + } else if (!strcmp(p, "FWU_MDATA")) { + part->part_type = PART_FWU_MDATA; } else if (!strcmp(p, "ENV")) { part->part_type = PART_ENV; } else if (!strcmp(p, "System")) { @@ -1125,6 +1133,9 @@ static int create_gpt_partitions(struct stm32prog_data *data) case PART_FIP: type_str = FIP_TYPE_UUID; break; + case PART_FWU_MDATA: + type_str = FWU_MDATA_UUID; + break; case PART_ESP: /* EFI System Partition */ type_str = "system"; diff --git a/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.h b/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.h index a196270..feba295 100644 --- a/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.h +++ b/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.h @@ -105,6 +105,7 @@ struct stm32_header_v2 { enum stm32prog_part_type { PART_BINARY, PART_FIP, + PART_FWU_MDATA, PART_ENV, PART_SYSTEM, PART_FILESYSTEM, |