diff options
author | Madhukar Pappireddy <madhukar.pappireddy@arm.com> | 2019-12-06 15:46:42 -0600 |
---|---|---|
committer | Madhukar Pappireddy <madhukar.pappireddy@arm.com> | 2020-03-11 10:19:21 -0500 |
commit | 25d740c45e14d42c9284ab1788a8d7b516608ece (patch) | |
tree | e0eb3eae765d72813ee49c15797cbae89d171e32 /plat | |
parent | f09852c97bc5de46d7322f2d1532fdddbd787043 (diff) | |
download | platform_external_arm-trusted-firmware-25d740c45e14d42c9284ab1788a8d7b516608ece.tar.gz platform_external_arm-trusted-firmware-25d740c45e14d42c9284ab1788a8d7b516608ece.tar.bz2 platform_external_arm-trusted-firmware-25d740c45e14d42c9284ab1788a8d7b516608ece.zip |
fconf: enhancements to firmware configuration framework
A populate() function essentially captures the value of a property,
defined by a platform, into a fconf related c structure. Such a
callback is usually platform specific and is associated to a specific
configuration source.
For example, a populate() function which captures the hardware topology
of the platform can only parse HW_CONFIG DTB. Hence each populator
function must be registered with a specific 'config_type' identifier.
It broadly represents a logical grouping of configuration properties
which is usually a device tree source file.
Example:
> TB_FW: properties related to trusted firmware such as IO policies,
base address of other DTBs, mbedtls heap info etc.
> HW_CONFIG: properties related to hardware configuration of the SoC
such as topology, GIC controller, PSCI hooks, CPU ID etc.
This patch modifies FCONF_REGISTER_POPULATOR macro and fconf_populate()
to register and invoke the appropriate callbacks selectively based on
configuration type.
Change-Id: I6f63b1fd7a8729c6c9137d5b63270af1857bb44a
Signed-off-by: Madhukar Pappireddy <madhukar.pappireddy@arm.com>
Diffstat (limited to 'plat')
-rw-r--r-- | plat/arm/common/arm_bl2_setup.c | 2 | ||||
-rw-r--r-- | plat/arm/common/fconf/arm_fconf_io.c | 2 | ||||
-rw-r--r-- | plat/arm/common/fconf/arm_fconf_sp.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/plat/arm/common/arm_bl2_setup.c b/plat/arm/common/arm_bl2_setup.c index 136e65a1f..d9fc84e8c 100644 --- a/plat/arm/common/arm_bl2_setup.c +++ b/plat/arm/common/arm_bl2_setup.c @@ -61,7 +61,7 @@ void arm_bl2_early_platform_setup(uintptr_t tb_fw_config, /* Fill the properties struct with the info from the config dtb */ if (tb_fw_config != 0U) { - fconf_populate(tb_fw_config); + fconf_populate("TB_FW", tb_fw_config); } /* Initialise the IO layer and register platform IO devices */ diff --git a/plat/arm/common/fconf/arm_fconf_io.c b/plat/arm/common/fconf/arm_fconf_io.c index cfcddc2b2..017af79a5 100644 --- a/plat/arm/common/fconf/arm_fconf_io.c +++ b/plat/arm/common/fconf/arm_fconf_io.c @@ -138,6 +138,6 @@ int fconf_populate_arm_io_policies(uintptr_t config) return 0; } -FCONF_REGISTER_POPULATOR(arm_io, fconf_populate_arm_io_policies); +FCONF_REGISTER_POPULATOR(TB_FW, arm_io, fconf_populate_arm_io_policies); #endif /* IMAGE_BL2 */ diff --git a/plat/arm/common/fconf/arm_fconf_sp.c b/plat/arm/common/fconf/arm_fconf_sp.c index bb88aff6f..9b6fa9b1f 100644 --- a/plat/arm/common/fconf/arm_fconf_sp.c +++ b/plat/arm/common/fconf/arm_fconf_sp.c @@ -102,6 +102,6 @@ int fconf_populate_arm_sp(uintptr_t config) return 0; } -FCONF_REGISTER_POPULATOR(arm_sp, fconf_populate_arm_sp); +FCONF_REGISTER_POPULATOR(TB_FW, arm_sp, fconf_populate_arm_sp); #endif /* IMAGE_BL2 */ |