feat(arm): add trusty_sp_fw_config build option

Also increase add PLAT_ARM_SP_MAX_SIZE to override the default
ARM_SP_MAX_SIZE to support Trusty image and move OPTEE_SP_FW_CONFIG
documentation to build-internals.rst as it's not externally set-able.

Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
Change-Id: Ief90ae9113d32265ee2200f35f3e517b7b9a4bea
This commit is contained in:
Arunachalam Ganapathy 2022-04-11 14:36:54 +01:00 committed by Boyan Karatotev
parent fc42f84560
commit 0686a01b0c
5 changed files with 21 additions and 6 deletions

View file

@ -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),)

View file

@ -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.

View file

@ -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.

View file

@ -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 <common/tbbr/tbbr_img_def.h>
#include <lib/fconf/fconf.h>
#include <platform_def.h>
#include <tools_share/uuid.h>
/* 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 {

View file

@ -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
******************************************************************************/