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