1375f538aSAchin Gupta# 26027796fSJeenu 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 8*b29c1b00SAntonio Nino Diaz 9*b29c1b00SAntonio Nino Diazifeq (${ERROR_DEPRECATED},0) 105a06bb7eSDan HandleySPD_INCLUDES := -Iinclude/bl32/tsp 11*b29c1b00SAntonio Nino Diazendif 12375f538aSAchin Gupta 13bee82417SDan HandleySPD_SOURCES := services/spd/tspd/tspd_common.c \ 14bee82417SDan Handley services/spd/tspd/tspd_helpers.S \ 15bee82417SDan Handley services/spd/tspd/tspd_main.c \ 16bee82417SDan Handley services/spd/tspd/tspd_pm.c 17375f538aSAchin Gupta 18375f538aSAchin Gupta# This dispatcher is paired with a Test Secure Payload source and we intend to 19375f538aSAchin Gupta# build the Test Secure Payload along with this dispatcher. 20375f538aSAchin Gupta# 21375f538aSAchin Gupta# In cases where an associated Secure Payload lies outside this build 22375f538aSAchin Gupta# system/source tree, the the dispatcher Makefile can either invoke an external 23375f538aSAchin Gupta# build command or assume it pre-built 24375f538aSAchin Gupta 25375f538aSAchin GuptaBL32_ROOT := bl32/tsp 26375f538aSAchin Gupta 27375f538aSAchin Gupta# Include SP's Makefile. The assumption is that the TSP's build system is 28375f538aSAchin Gupta# compatible with that of Trusted Firmware, and it'll add and populate necessary 29375f538aSAchin Gupta# build targets and variables 30375f538aSAchin Guptainclude ${BL32_ROOT}/tsp.mk 31375f538aSAchin Gupta 32375f538aSAchin Gupta# Let the top-level Makefile know that we intend to build the SP from source 33375f538aSAchin GuptaNEED_BL32 := yes 34f4f1ae77SSoby Mathew 35f4f1ae77SSoby Mathew# Flag used to enable routing of non-secure interrupts to EL3 when they are 36f4f1ae77SSoby Mathew# generated while the code is executing in S-EL1/0. 3702446137SSoby MathewTSP_NS_INTR_ASYNC_PREEMPT := 0 38f4f1ae77SSoby Mathew 396027796fSJeenu Viswambharanifeq ($(EL3_EXCEPTION_HANDLING),1) 406027796fSJeenu Viswambharanifeq ($(TSP_NS_INTR_ASYNC_PREEMPT),0) 416027796fSJeenu Viswambharan$(error When EL3_EXCEPTION_HANDLING=1, TSP_NS_INTR_ASYNC_PREEMPT must also be 1) 426027796fSJeenu Viswambharanendif 436027796fSJeenu Viswambharanendif 446027796fSJeenu Viswambharan 4502446137SSoby Mathew$(eval $(call assert_boolean,TSP_NS_INTR_ASYNC_PREEMPT)) 4602446137SSoby Mathew$(eval $(call add_define,TSP_NS_INTR_ASYNC_PREEMPT)) 47