xref: /arm-trusted-firmware/services/spd/tspd/tspd.mk (revision 91f16700b400a8c0651d24a598fc48ee2997a0d7)
1*91f16700Schasinglulu#
2*91f16700Schasinglulu# Copyright (c) 2013-2018, ARM Limited and Contributors. All rights reserved.
3*91f16700Schasinglulu#
4*91f16700Schasinglulu# SPDX-License-Identifier: BSD-3-Clause
5*91f16700Schasinglulu#
6*91f16700Schasinglulu
7*91f16700SchasingluluTSPD_DIR		:=	services/spd/tspd
8*91f16700Schasinglulu
9*91f16700Schasingluluifeq (${ERROR_DEPRECATED},0)
10*91f16700SchasingluluSPD_INCLUDES		:=	-Iinclude/bl32/tsp
11*91f16700Schasingluluendif
12*91f16700Schasinglulu
13*91f16700SchasingluluSPD_SOURCES		:=	services/spd/tspd/tspd_common.c		\
14*91f16700Schasinglulu				services/spd/tspd/tspd_helpers.S	\
15*91f16700Schasinglulu				services/spd/tspd/tspd_main.c		\
16*91f16700Schasinglulu				services/spd/tspd/tspd_pm.c
17*91f16700Schasinglulu
18*91f16700Schasinglulu# This dispatcher is paired with a Test Secure Payload source and we intend to
19*91f16700Schasinglulu# build the Test Secure Payload along with this dispatcher.
20*91f16700Schasinglulu#
21*91f16700Schasinglulu# In cases where an associated Secure Payload lies outside this build
22*91f16700Schasinglulu# system/source tree, the the dispatcher Makefile can either invoke an external
23*91f16700Schasinglulu# build command or assume it pre-built
24*91f16700Schasinglulu
25*91f16700SchasingluluBL32_ROOT		:=	bl32/tsp
26*91f16700Schasinglulu
27*91f16700Schasinglulu# Include SP's Makefile. The assumption is that the TSP's build system is
28*91f16700Schasinglulu# compatible with that of Trusted Firmware, and it'll add and populate necessary
29*91f16700Schasinglulu# build targets and variables
30*91f16700Schasingluluinclude ${BL32_ROOT}/tsp.mk
31*91f16700Schasinglulu
32*91f16700Schasinglulu# Let the top-level Makefile know that we intend to build the SP from source
33*91f16700SchasingluluNEED_BL32		:=	yes
34*91f16700Schasinglulu
35*91f16700Schasinglulu# Flag used to enable routing of non-secure interrupts to EL3 when they are
36*91f16700Schasinglulu# generated while the code is executing in S-EL1/0.
37*91f16700SchasingluluTSP_NS_INTR_ASYNC_PREEMPT	:=	0
38*91f16700Schasinglulu
39*91f16700Schasingluluifeq ($(EL3_EXCEPTION_HANDLING),1)
40*91f16700Schasingluluifeq ($(TSP_NS_INTR_ASYNC_PREEMPT),0)
41*91f16700Schasinglulu$(error When EL3_EXCEPTION_HANDLING=1, TSP_NS_INTR_ASYNC_PREEMPT must also be 1)
42*91f16700Schasingluluendif
43*91f16700Schasingluluendif
44*91f16700Schasinglulu
45*91f16700Schasinglulu$(eval $(call assert_boolean,TSP_NS_INTR_ASYNC_PREEMPT))
46*91f16700Schasinglulu$(eval $(call add_define,TSP_NS_INTR_ASYNC_PREEMPT))
47