feat(fvp): enable external SP images in BL2 config

Currently the list of SP UUIDs loaded by BL2 is hardcoded in the DT.
This is a problem when building a system with other SPs (e.g. from
Trusted Services). This commit implements a workaround to enable adding
SP UUIDs to the list at build time.

Signed-off-by: Balint Dobszay <balint.dobszay@arm.com>
Change-Id: Iff85d3778596d23d777dec458f131bd7a8647031
This commit is contained in:
Balint Dobszay 2021-03-26 15:19:11 +01:00
parent 9dc2534fd7
commit 33993a3737
3 changed files with 14 additions and 0 deletions

View file

@ -525,6 +525,10 @@ ifneq (${SPD},none)
ifeq ($(TS_SP_FW_CONFIG),1) ifeq ($(TS_SP_FW_CONFIG),1)
DTC_CPPFLAGS += -DTS_SP_FW_CONFIG DTC_CPPFLAGS += -DTS_SP_FW_CONFIG
endif endif
ifneq ($(ARM_BL2_SP_LIST_DTS),)
DTC_CPPFLAGS += -DARM_BL2_SP_LIST_DTS=$(ARM_BL2_SP_LIST_DTS)
endif
else else
# All other SPDs in spd directory # All other SPDs in spd directory
SPD_DIR := spd SPD_DIR := spd

View file

@ -100,6 +100,9 @@ Arm Platform Build Options
- ``ARM_SPMC_MANIFEST_DTS`` : path to an alternate manifest file used as the - ``ARM_SPMC_MANIFEST_DTS`` : path to an alternate manifest file used as the
SPMC Core manifest. Valid when ``SPD=spmd`` is selected. SPMC Core manifest. Valid when ``SPD=spmd`` is selected.
- ``ARM_BL2_SP_LIST_DTS``: Path to DTS file snippet to override the hardcoded
SP nodes in tb_fw_config.
- ``OPTEE_SP_FW_CONFIG``: DTC build flag to include OP-TEE as SP in tb_fw_config - ``OPTEE_SP_FW_CONFIG``: DTC build flag to include OP-TEE as SP in tb_fw_config
device tree. This flag is defined only when ``ARM_SPMC_MANIFEST_DTS`` manifest device tree. This flag is defined only when ``ARM_SPMC_MANIFEST_DTS`` manifest
file name contains pattern optee_sp. file name contains pattern optee_sp.

View file

@ -4,6 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
#include <lib/libc/cdefs.h>
/dts-v1/; /dts-v1/;
/ { / {
@ -74,6 +76,10 @@
secure-partitions { secure-partitions {
compatible = "arm,sp"; compatible = "arm,sp";
#ifdef ARM_BL2_SP_LIST_DTS
#include __XSTRING(ARM_BL2_SP_LIST_DTS)
#else
#ifdef OPTEE_SP_FW_CONFIG #ifdef OPTEE_SP_FW_CONFIG
op-tee { op-tee {
uuid = "486178e0-e7f8-11e3-bc5e-0002a5d5c51b"; uuid = "486178e0-e7f8-11e3-bc5e-0002a5d5c51b";
@ -104,6 +110,7 @@
owner = "Plat"; owner = "Plat";
}; };
#endif #endif
#endif /* ARM_BL2_SP_LIST_DTS */
}; };
#if COT_DESC_IN_DTB #if COT_DESC_IN_DTB