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) 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/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 */ 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