1375f538aSAchin Gupta# 2375f538aSAchin Gupta# Copyright (c) 2013-2014, ARM Limited and Contributors. All rights reserved. 3375f538aSAchin Gupta# 4375f538aSAchin Gupta# Redistribution and use in source and binary forms, with or without 5375f538aSAchin Gupta# modification, are permitted provided that the following conditions are met: 6375f538aSAchin Gupta# 7375f538aSAchin Gupta# Redistributions of source code must retain the above copyright notice, this 8375f538aSAchin Gupta# list of conditions and the following disclaimer. 9375f538aSAchin Gupta# 10375f538aSAchin Gupta# Redistributions in binary form must reproduce the above copyright notice, 11375f538aSAchin Gupta# this list of conditions and the following disclaimer in the documentation 12375f538aSAchin Gupta# and/or other materials provided with the distribution. 13375f538aSAchin Gupta# 14375f538aSAchin Gupta# Neither the name of ARM nor the names of its contributors may be used 15375f538aSAchin Gupta# to endorse or promote products derived from this software without specific 16375f538aSAchin Gupta# prior written permission. 17375f538aSAchin Gupta# 18375f538aSAchin Gupta# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19375f538aSAchin Gupta# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20375f538aSAchin Gupta# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21375f538aSAchin Gupta# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 22375f538aSAchin Gupta# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 23375f538aSAchin Gupta# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 24375f538aSAchin Gupta# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25375f538aSAchin Gupta# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 26375f538aSAchin Gupta# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27375f538aSAchin Gupta# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28375f538aSAchin Gupta# POSSIBILITY OF SUCH DAMAGE. 29375f538aSAchin Gupta# 30375f538aSAchin Gupta 31375f538aSAchin GuptaTSPD_DIR := services/spd/tspd 325a06bb7eSDan HandleySPD_INCLUDES := -Iinclude/bl32/tsp 33375f538aSAchin Gupta 34bee82417SDan HandleySPD_SOURCES := services/spd/tspd/tspd_common.c \ 35bee82417SDan Handley services/spd/tspd/tspd_helpers.S \ 36bee82417SDan Handley services/spd/tspd/tspd_main.c \ 37bee82417SDan Handley services/spd/tspd/tspd_pm.c 38375f538aSAchin Gupta 39375f538aSAchin Gupta# This dispatcher is paired with a Test Secure Payload source and we intend to 40375f538aSAchin Gupta# build the Test Secure Payload along with this dispatcher. 41375f538aSAchin Gupta# 42375f538aSAchin Gupta# In cases where an associated Secure Payload lies outside this build 43375f538aSAchin Gupta# system/source tree, the the dispatcher Makefile can either invoke an external 44375f538aSAchin Gupta# build command or assume it pre-built 45375f538aSAchin Gupta 46375f538aSAchin GuptaBL32_ROOT := bl32/tsp 47375f538aSAchin Gupta 48375f538aSAchin Gupta# Include SP's Makefile. The assumption is that the TSP's build system is 49375f538aSAchin Gupta# compatible with that of Trusted Firmware, and it'll add and populate necessary 50375f538aSAchin Gupta# build targets and variables 51375f538aSAchin Guptainclude ${BL32_ROOT}/tsp.mk 52375f538aSAchin Gupta 53375f538aSAchin Gupta# Let the top-level Makefile know that we intend to build the SP from source 54375f538aSAchin GuptaNEED_BL32 := yes 55f4f1ae77SSoby Mathew 56f4f1ae77SSoby Mathew# Flag used to enable routing of non-secure interrupts to EL3 when they are 57f4f1ae77SSoby Mathew# generated while the code is executing in S-EL1/0. 58*02446137SSoby MathewTSP_NS_INTR_ASYNC_PREEMPT := 0 59f4f1ae77SSoby Mathew 60*02446137SSoby Mathew# If TSPD_ROUTE_IRQ_TO_EL3 build flag is defined, use it to define value for 61*02446137SSoby Mathew# TSP_NS_INTR_ASYNC_PREEMPT for backward compatibility. 62*02446137SSoby Mathewifdef TSPD_ROUTE_IRQ_TO_EL3 63*02446137SSoby Mathewifeq (${ERROR_DEPRECATED},1) 64*02446137SSoby Mathew$(error "TSPD_ROUTE_IRQ_TO_EL3 is deprecated. Please use the new build flag TSP_NS_INTR_ASYNC_PREEMPT") 65*02446137SSoby Mathewendif 66*02446137SSoby Mathew$(warning "TSPD_ROUTE_IRQ_TO_EL3 is deprecated. Please use the new build flag TSP_NS_INTR_ASYNC_PREEMPT") 67*02446137SSoby MathewTSP_NS_INTR_ASYNC_PREEMPT := ${TSPD_ROUTE_IRQ_TO_EL3} 68*02446137SSoby Mathewendif 69*02446137SSoby Mathew 70*02446137SSoby Mathew$(eval $(call assert_boolean,TSP_NS_INTR_ASYNC_PREEMPT)) 71*02446137SSoby Mathew$(eval $(call add_define,TSP_NS_INTR_ASYNC_PREEMPT)) 72