aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSandrine Bailleux <sandrine.bailleux@arm.com>2020-06-30 12:12:32 +0000
committerTrustedFirmware Code Review <review@review.trustedfirmware.org>2020-06-30 12:12:32 +0000
commit1ba168cf4233274236276d7bfbc520c90fa2a1cf (patch)
tree1dd2b9ddf694519344d0201d366bae4daf62fbfa
parentb2b0e28a45941b560b6f945d6d293ce92cdd4235 (diff)
parent1d60052e995b13ec49ba0b320a5056ce8e7a962a (diff)
downloadtrusted-firmware-a-1ba168cf4233274236276d7bfbc520c90fa2a1cf.tar.gz
Merge "plat/arm: Add assert for the valid address of dtb information" into integration
-rw-r--r--plat/arm/common/arm_bl2_setup.c10
-rw-r--r--plat/arm/common/arm_dyn_cfg.c4
2 files changed, 8 insertions, 6 deletions
diff --git a/plat/arm/common/arm_bl2_setup.c b/plat/arm/common/arm_bl2_setup.c
index e4a4f8724..fd60c2bd3 100644
--- a/plat/arm/common/arm_bl2_setup.c
+++ b/plat/arm/common/arm_bl2_setup.c
@@ -62,15 +62,13 @@ void arm_bl2_early_platform_setup(uintptr_t fw_config,
bl2_tzram_layout = *mem_layout;
/* Fill the properties struct with the info from the config dtb */
- if (fw_config != 0U) {
- fconf_populate("FW_CONFIG", fw_config);
- }
+ fconf_populate("FW_CONFIG", fw_config);
/* TB_FW_CONFIG was also loaded by BL1 */
tb_fw_config_info = FCONF_GET_PROPERTY(dyn_cfg, dtb, TB_FW_CONFIG_ID);
- if (tb_fw_config_info != NULL) {
- fconf_populate("TB_FW", tb_fw_config_info->config_addr);
- }
+ assert(tb_fw_config_info != NULL);
+
+ fconf_populate("TB_FW", tb_fw_config_info->config_addr);
/* Initialise the IO layer and register platform IO devices */
plat_arm_io_setup();
diff --git a/plat/arm/common/arm_dyn_cfg.c b/plat/arm/common/arm_dyn_cfg.c
index a28e0ccff..633445bad 100644
--- a/plat/arm/common/arm_dyn_cfg.c
+++ b/plat/arm/common/arm_dyn_cfg.c
@@ -93,6 +93,8 @@ void arm_bl1_set_mbedtls_heap(void)
*/
tb_fw_config_info = FCONF_GET_PROPERTY(dyn_cfg, dtb, TB_FW_CONFIG_ID);
+ assert(tb_fw_config_info != NULL);
+
tb_fw_cfg_dtb = tb_fw_config_info->config_addr;
if ((tb_fw_cfg_dtb != 0UL) && (mbedtls_heap_addr != NULL)) {
@@ -134,6 +136,8 @@ void arm_bl1_set_bl2_hash(image_desc_t *image_desc)
const struct dyn_cfg_dtb_info_t *tb_fw_config_info;
tb_fw_config_info = FCONF_GET_PROPERTY(dyn_cfg, dtb, TB_FW_CONFIG_ID);
+ assert(tb_fw_config_info != NULL);
+
tb_fw_cfg_dtb = tb_fw_config_info->config_addr;
/*