aboutsummaryrefslogtreecommitdiff
path: root/plat/arm/common/arm_bl2_setup.c
diff options
context:
space:
mode:
authorManish V Badarkhe <Manish.Badarkhe@arm.com>2020-06-11 22:32:11 +0100
committerManish V Badarkhe <Manish.Badarkhe@arm.com>2020-06-25 13:48:43 +0100
commit8286967552bbf1c1e08e51cd98c22d27ca8fa44c (patch)
tree848fc35f2894059352970a402c6da38689e66628 /plat/arm/common/arm_bl2_setup.c
parentf17ae7b0a92b83f5e230baee1f1a11b3cbfb2910 (diff)
downloadtrusted-firmware-a-8286967552bbf1c1e08e51cd98c22d27ca8fa44c.tar.gz
plat/arm: Load and populate fw_config and tb_fw_config
Modified the code to do below changes: 1. Load tb_fw_config along with fw_config by BL1. 2. Populate fw_config device tree information in the BL1 to load tb_fw_config. 3. In BL2, populate fw_config information to retrieve the address of tb_fw_config and then tb_fw_config gets populated using retrieved address. 4. Avoid processing of configuration file in case of error value returned from "fw_config_load" function. 5. Updated entrypoint information for BL2 image so that it's arg0 should point to fw_config address. Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com> Signed-off-by: Louis Mayencourt <louis.mayencourt@arm.com> Change-Id: Ife6f7b673a074e7f544ee3d1bda7645fd5b2886c
Diffstat (limited to 'plat/arm/common/arm_bl2_setup.c')
-rw-r--r--plat/arm/common/arm_bl2_setup.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/plat/arm/common/arm_bl2_setup.c b/plat/arm/common/arm_bl2_setup.c
index 9d5526f1b6..e4a4f8724f 100644
--- a/plat/arm/common/arm_bl2_setup.c
+++ b/plat/arm/common/arm_bl2_setup.c
@@ -15,6 +15,7 @@
#include <common/desc_image_load.h>
#include <drivers/generic_delay_timer.h>
#include <lib/fconf/fconf.h>
+#include <lib/fconf/fconf_dyn_cfg_getter.h>
#ifdef SPD_opteed
#include <lib/optee_utils.h>
#endif
@@ -53,6 +54,7 @@ CASSERT(BL2_BASE >= ARM_FW_CONFIG_LIMIT, assert_bl2_base_overflows);
void arm_bl2_early_platform_setup(uintptr_t fw_config,
struct meminfo *mem_layout)
{
+ const struct dyn_cfg_dtb_info_t *tb_fw_config_info;
/* Initialize the console to provide early debug support */
arm_console_boot_init();
@@ -61,7 +63,13 @@ void arm_bl2_early_platform_setup(uintptr_t fw_config,
/* Fill the properties struct with the info from the config dtb */
if (fw_config != 0U) {
- fconf_populate("TB_FW", 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);
}
/* Initialise the IO layer and register platform IO devices */