diff --git a/plat/st/stm32mp1/bl2_plat_setup.c b/plat/st/stm32mp1/bl2_plat_setup.c index 218f28d12..a52dd8a3f 100644 --- a/plat/st/stm32mp1/bl2_plat_setup.c +++ b/plat/st/stm32mp1/bl2_plat_setup.c @@ -352,6 +352,7 @@ int bl2_plat_handle_post_image_load(unsigned int image_id) const struct dyn_cfg_dtb_info_t *config_info; bl_mem_params_node_t *tos_fw_mem_params; unsigned int i; + unsigned int idx; unsigned long long ddr_top __unused; const unsigned int image_ids[] = { BL32_IMAGE_ID, @@ -370,8 +371,14 @@ int bl2_plat_handle_post_image_load(unsigned int image_id) set_config_info(STM32MP_FW_CONFIG_BASE, STM32MP_FW_CONFIG_MAX_SIZE, FW_CONFIG_ID); fconf_populate("FW_CONFIG", STM32MP_FW_CONFIG_BASE); + idx = dyn_cfg_dtb_info_get_index(TOS_FW_CONFIG_ID); + /* Iterate through all the fw config IDs */ for (i = 0U; i < ARRAY_SIZE(image_ids); i++) { + if ((image_ids[i] == TOS_FW_CONFIG_ID) && (idx == FCONF_INVALID_IDX)) { + continue; + } + bl_mem_params = get_bl_mem_params_node(image_ids[i]); assert(bl_mem_params != NULL);