diff --git a/Makefile b/Makefile index 2892f215a..6a1ea99a6 100644 --- a/Makefile +++ b/Makefile @@ -452,8 +452,12 @@ ifneq (${SPD},none) DTC_CPPFLAGS += -DOPTEE_SP_FW_CONFIG endif + ifeq ($(findstring trusty_sp,$(ARM_SPMC_MANIFEST_DTS)),trusty_sp) + DTC_CPPFLAGS += -DTRUSTY_SP_FW_CONFIG + endif + ifeq ($(TS_SP_FW_CONFIG),1) - DTC_CPPFLAGS += -DTS_SP_FW_CONFIG + DTC_CPPFLAGS += -DTS_SP_FW_CONFIG endif ifneq ($(ARM_BL2_SP_LIST_DTS),) diff --git a/docs/getting_started/build-internals.rst b/docs/getting_started/build-internals.rst index 390c3671d..c43f4e989 100644 --- a/docs/getting_started/build-internals.rst +++ b/docs/getting_started/build-internals.rst @@ -19,3 +19,11 @@ depends on certain options to be enabled or disabled. ``HANDLE_EA_EL3_FIRST_NS`` is set. Currently only NS world routes EA to EL3 but in future when Secure/Realm wants to use FFH then they can introduce new macros which will enable this option implicitly. + +- ``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 file name contains pattern optee_sp. + +- ``TRUSTY_SP_FW_CONFIG``: DTC build flag to include Trusty as SP in + tb_fw_config device tree. This flag is defined only when + ``ARM_SPMC_MANIFEST_DTS`` manifest file name contains pattern trusty_sp. diff --git a/docs/getting_started/build-options.rst b/docs/getting_started/build-options.rst index 16522bd45..37545ce34 100644 --- a/docs/getting_started/build-options.rst +++ b/docs/getting_started/build-options.rst @@ -740,10 +740,6 @@ Common build options 1 (do save and restore). 0 is the default. An SPD may set this to 1 if it wants the timer registers to be saved and restored. -- ``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 file name contains pattern optee_sp. - - ``OVERRIDE_LIBC``: This option allows platforms to override the default libc for the BL image. It can be either 0 (include) or 1 (remove). The default value is 0. diff --git a/include/plat/arm/common/fconf_arm_sp_getter.h b/include/plat/arm/common/fconf_arm_sp_getter.h index 96ed96383..d8a332ec6 100644 --- a/include/plat/arm/common/fconf_arm_sp_getter.h +++ b/include/plat/arm/common/fconf_arm_sp_getter.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Arm Limited and Contributors. All rights reserved. + * Copyright (c) 2020-2024, Arm Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -9,12 +9,17 @@ #include #include +#include #include /* arm_sp getter */ #define arm__sp_getter(prop) arm_sp.prop +#ifdef PLAT_ARM_SP_MAX_SIZE +#define ARM_SP_MAX_SIZE PLAT_ARM_SP_MAX_SIZE +#else #define ARM_SP_MAX_SIZE U(0xb0000) +#endif /* PLAT_ARM_SP_MAX_SIZE */ #define ARM_SP_OWNER_NAME_LEN U(8) struct arm_sp_t { diff --git a/plat/arm/board/tc/include/platform_def.h b/plat/arm/board/tc/include/platform_def.h index e8f97e19b..74dae7b37 100644 --- a/plat/arm/board/tc/include/platform_def.h +++ b/plat/arm/board/tc/include/platform_def.h @@ -221,6 +221,8 @@ #define PLAT_ARM_SP_IMAGE_STACK_BASE (PLAT_SP_IMAGE_NS_BUF_BASE + \ PLAT_SP_IMAGE_NS_BUF_SIZE) +#define PLAT_ARM_SP_MAX_SIZE U(0x2000000) + /******************************************************************************* * Memprotect definitions ******************************************************************************/