xref: /rk3399_ARM-atf/services/spd/tspd/tspd.mk (revision 6027796fff15f0d9c9dbd9aabe2bcc3daeebbd14)
1375f538aSAchin Gupta#
2*6027796fSJeenu Viswambharan# Copyright (c) 2013-2018, ARM Limited and Contributors. All rights reserved.
3375f538aSAchin Gupta#
482cb2c1aSdp-arm# SPDX-License-Identifier: BSD-3-Clause
5375f538aSAchin Gupta#
6375f538aSAchin Gupta
7375f538aSAchin GuptaTSPD_DIR		:=	services/spd/tspd
85a06bb7eSDan HandleySPD_INCLUDES		:=	-Iinclude/bl32/tsp
9375f538aSAchin Gupta
10bee82417SDan HandleySPD_SOURCES		:=	services/spd/tspd/tspd_common.c		\
11bee82417SDan Handley				services/spd/tspd/tspd_helpers.S	\
12bee82417SDan Handley				services/spd/tspd/tspd_main.c		\
13bee82417SDan Handley				services/spd/tspd/tspd_pm.c
14375f538aSAchin Gupta
15375f538aSAchin Gupta# This dispatcher is paired with a Test Secure Payload source and we intend to
16375f538aSAchin Gupta# build the Test Secure Payload along with this dispatcher.
17375f538aSAchin Gupta#
18375f538aSAchin Gupta# In cases where an associated Secure Payload lies outside this build
19375f538aSAchin Gupta# system/source tree, the the dispatcher Makefile can either invoke an external
20375f538aSAchin Gupta# build command or assume it pre-built
21375f538aSAchin Gupta
22375f538aSAchin GuptaBL32_ROOT		:=	bl32/tsp
23375f538aSAchin Gupta
24375f538aSAchin Gupta# Include SP's Makefile. The assumption is that the TSP's build system is
25375f538aSAchin Gupta# compatible with that of Trusted Firmware, and it'll add and populate necessary
26375f538aSAchin Gupta# build targets and variables
27375f538aSAchin Guptainclude ${BL32_ROOT}/tsp.mk
28375f538aSAchin Gupta
29375f538aSAchin Gupta# Let the top-level Makefile know that we intend to build the SP from source
30375f538aSAchin GuptaNEED_BL32		:=	yes
31f4f1ae77SSoby Mathew
32f4f1ae77SSoby Mathew# Flag used to enable routing of non-secure interrupts to EL3 when they are
33f4f1ae77SSoby Mathew# generated while the code is executing in S-EL1/0.
3402446137SSoby MathewTSP_NS_INTR_ASYNC_PREEMPT	:=	0
35f4f1ae77SSoby Mathew
3602446137SSoby Mathew# If TSPD_ROUTE_IRQ_TO_EL3 build flag is defined, use it to define value for
3702446137SSoby Mathew# TSP_NS_INTR_ASYNC_PREEMPT for backward compatibility.
3802446137SSoby Mathewifdef TSPD_ROUTE_IRQ_TO_EL3
3902446137SSoby Mathewifeq (${ERROR_DEPRECATED},1)
4002446137SSoby Mathew$(error "TSPD_ROUTE_IRQ_TO_EL3 is deprecated. Please use the new build flag TSP_NS_INTR_ASYNC_PREEMPT")
4102446137SSoby Mathewendif
4202446137SSoby Mathew$(warning "TSPD_ROUTE_IRQ_TO_EL3 is deprecated. Please use the new build flag TSP_NS_INTR_ASYNC_PREEMPT")
4302446137SSoby MathewTSP_NS_INTR_ASYNC_PREEMPT	:= ${TSPD_ROUTE_IRQ_TO_EL3}
4402446137SSoby Mathewendif
4502446137SSoby Mathew
46*6027796fSJeenu Viswambharanifeq ($(EL3_EXCEPTION_HANDLING),1)
47*6027796fSJeenu Viswambharanifeq ($(TSP_NS_INTR_ASYNC_PREEMPT),0)
48*6027796fSJeenu Viswambharan$(error When EL3_EXCEPTION_HANDLING=1, TSP_NS_INTR_ASYNC_PREEMPT must also be 1)
49*6027796fSJeenu Viswambharanendif
50*6027796fSJeenu Viswambharanendif
51*6027796fSJeenu Viswambharan
5202446137SSoby Mathew$(eval $(call assert_boolean,TSP_NS_INTR_ASYNC_PREEMPT))
5302446137SSoby Mathew$(eval $(call add_define,TSP_NS_INTR_ASYNC_PREEMPT))
54