From 5f00cf3eb3bd1266089919157d55c6ccf83f140a Mon Sep 17 00:00:00 2001 From: Dario Binacchi Date: Mon, 9 Mar 2026 08:17:36 +0100 Subject: [PATCH 1/3] feat(fwu): add Linux FS and XBOOTLDR GUIDs Add GUID definitions for Linux Filesystem Data and XBOOTLDR partitions to the EFI partition driver. These definitions are required to identify and filter these partition types during the boot process, specifically to support FWU multi-bank A/B update scenarios. Signed-off-by: Dario Binacchi --- include/drivers/partition/efi.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/drivers/partition/efi.h b/include/drivers/partition/efi.h index 6d5466f31be..882ab0b7539 100644 --- a/include/drivers/partition/efi.h +++ b/include/drivers/partition/efi.h @@ -43,6 +43,14 @@ static inline void *guidcpy(void *dst, const void *src) EFI_GUID(0xF469F981U, 0x5985U, 0x4206U, \ 0x8FU, 0xB3U, 0x83U, 0x99U, 0x56U, 0x03U, 0x5AU, 0x65U) +#define LINUX_FILE_SYSTEM_DATA_GUID \ + EFI_GUID(0x0FC63DAFU, 0x8483U, 0x4772U, \ + 0x8EU, 0x79U, 0x3DU, 0x69U, 0xD8U, 0x47U, 0x7DU, 0xE4U) + +#define XBOOTLDR_GUID \ + EFI_GUID(0xBC13C2FFU, 0x59E6U, 0x4262U, \ + 0xA3U, 0x52U, 0xB2U, 0x75U, 0xFDU, 0x6FU, 0x71U, 0x72U) + #define NULL_GUID \ EFI_GUID(0x00000000U, 0x0000U, 0x0000U, 0x00U, 0x00U, \ 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U) From bcf0d3cb0ffef50f187e916b84246092713c5666 Mon Sep 17 00:00:00 2001 From: Dario Binacchi Date: Mon, 9 Mar 2026 08:22:42 +0100 Subject: [PATCH 2/3] feat(stm32mp2): add IO policies for BootFS and RootFS Define IO policies and block specifications for BootFS and RootFS partitions to support A/B redundancy systems on STM32MP2. The patch registers FWU_BOOTFS_ID and FWU_ROOTFS_ID, mapping them to their respective GUIDs (XBOOTLDR and Linux FS). This allows the platform to correctly identify and access the required partitions for each bank in A/B boot scenarios. The MAX_NUMBER_IDS is increased to accommodate these new entries in the platform storage pool. Signed-off-by: Dario Binacchi --- plat/st/common/stm32mp_fconf_io.c | 20 ++++++++++++++++++++ plat/st/stm32mp2/include/plat_tbbr_img_def.h | 8 ++++++-- 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/plat/st/common/stm32mp_fconf_io.c b/plat/st/common/stm32mp_fconf_io.c index e12eded81fc..e7d5115bb6f 100644 --- a/plat/st/common/stm32mp_fconf_io.c +++ b/plat/st/common/stm32mp_fconf_io.c @@ -32,6 +32,14 @@ static io_block_spec_t metadata_block_spec = { .offset = 0, /* To be filled at runtime */ .length = 0, /* To be filled at runtime */ }; +static io_block_spec_t bootfs_block_spec = { + .offset = 0, /* To be filled at runtime */ + .length = 0, /* To be filled at runtime */ +}; +static io_block_spec_t rootfs_block_spec = { + .offset = 0, /* To be filled at runtime */ + .length = 0, /* To be filled at runtime */ +}; #endif /* By default, STM32 platforms load images from the FIP */ @@ -71,6 +79,18 @@ struct plat_io_policy policies[MAX_NUMBER_IDS] = { .img_type_guid = NULL_GUID, .check = open_storage }, + [FWU_BOOTFS_ID] = { + .dev_handle = &storage_dev_handle, + .image_spec = (uintptr_t)&bootfs_block_spec, + .img_type_guid = XBOOTLDR_GUID, + .check = open_storage + }, + [FWU_ROOTFS_ID] = { + .dev_handle = &storage_dev_handle, + .image_spec = (uintptr_t)&rootfs_block_spec, + .img_type_guid = LINUX_FILE_SYSTEM_DATA_GUID, + .check = open_storage + }, #endif /* PSA_FWU_SUPPORT */ }; diff --git a/plat/st/stm32mp2/include/plat_tbbr_img_def.h b/plat/st/stm32mp2/include/plat_tbbr_img_def.h index e786dd2b12b..ca4720cdfc0 100644 --- a/plat/st/stm32mp2/include/plat_tbbr_img_def.h +++ b/plat/st/stm32mp2/include/plat_tbbr_img_def.h @@ -42,12 +42,16 @@ #if STM32MP_DDR_FIP_IO_STORAGE #define DDR_FW_ID U(26) +#define FWU_BOOTFS_ID U(27) +#define FWU_ROOTFS_ID U(28) /* Increase the MAX_NUMBER_IDS to match the authentication pool required */ -#define MAX_NUMBER_IDS U(27) +#define MAX_NUMBER_IDS U(29) #else /* Increase the MAX_NUMBER_IDS to match the authentication pool required */ -#define MAX_NUMBER_IDS U(26) +#define FWU_BOOTFS_ID U(26) +#define FWU_ROOTFS_ID U(27) +#define MAX_NUMBER_IDS U(28) #endif From d6c62f7e50c4cef57268b0c220630fc0ab98be98 Mon Sep 17 00:00:00 2001 From: Dario Binacchi Date: Sun, 10 May 2026 11:20:50 +0200 Subject: [PATCH 3/3] plat: stm32mp1: define image IDs for BootFS and RootFS The common I/O policy code (plat/st/common/stm32mp_fconf_io.c) recently introduced support for BootFS and RootFS partitions to handle A/B redundancy, originally targeting the stm32mp2 platform. To leverage this common implementation and enable A/B redundancy on stm32mp1 platforms, define the corresponding FWU_BOOTFS_ID and FWU_ROOTFS_ID image IDs. The MAX_NUMBER_IDS is increased to 29 to accommodate these new entries, aligning the numbering with the stm32mp2 architecture. Signed-off-by: Dario Binacchi --- plat/st/stm32mp1/include/plat_tbbr_img_def.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plat/st/stm32mp1/include/plat_tbbr_img_def.h b/plat/st/stm32mp1/include/plat_tbbr_img_def.h index 984aae85b2a..84a3b1ad011 100644 --- a/plat/st/stm32mp1/include/plat_tbbr_img_def.h +++ b/plat/st/stm32mp1/include/plat_tbbr_img_def.h @@ -33,8 +33,10 @@ #define BKUP_FWU_METADATA_IMAGE_ID U(13) #define TOS_FW_CONFIG_ID U(16) #define STM32MP_CONFIG_CERT_ID U(17) +#define FWU_BOOTFS_ID U(27) +#define FWU_ROOTFS_ID U(28) /* Increase the MAX_NUMBER_IDS to match the authentication pool required */ -#define MAX_NUMBER_IDS U(19) +#define MAX_NUMBER_IDS U(29) #endif /* STM32MP1_IMG_DEF_H */