blob: b1fe7ff600e930f28360019f7a5ea477cd1ac4f3 [file] [log] [blame]
Achin Gupta7c88f3f2014-02-18 18:09:12 +00001#
Antonio Nino Diaze61ece02019-02-26 11:41:03 +00002# Copyright (c) 2013-2019, ARM Limited and Contributors. All rights reserved.
Achin Gupta7c88f3f2014-02-18 18:09:12 +00003#
dp-armfa3cf0b2017-05-03 09:38:09 +01004# SPDX-License-Identifier: BSD-3-Clause
Achin Gupta7c88f3f2014-02-18 18:09:12 +00005#
6
Dan Handley4fd2f5c2014-08-04 11:41:20 +01007INCLUDES += -Iinclude/bl32/tsp
8
Dan Handley176e7b42014-04-15 18:20:09 +01009BL32_SOURCES += bl32/tsp/tsp_main.c \
10 bl32/tsp/aarch64/tsp_entrypoint.S \
Achin Guptaa4f50c22014-05-09 12:17:56 +010011 bl32/tsp/aarch64/tsp_exceptions.S \
Dan Handley176e7b42014-04-15 18:20:09 +010012 bl32/tsp/aarch64/tsp_request.S \
Achin Gupta76717892014-05-09 11:42:56 +010013 bl32/tsp/tsp_interrupt.c \
14 bl32/tsp/tsp_timer.c \
Dan Handley176e7b42014-04-15 18:20:09 +010015 common/aarch64/early_exceptions.S \
Soby Mathew7b5c9b32016-08-08 12:42:53 +010016 lib/locks/exclusive/aarch64/spinlock.S
Achin Gupta7c88f3f2014-02-18 18:09:12 +000017
Dan Handley176e7b42014-04-15 18:20:09 +010018BL32_LINKERFILE := bl32/tsp/tsp.ld.S
Achin Gupta7c88f3f2014-02-18 18:09:12 +000019
Antonio Nino Diaze61ece02019-02-26 11:41:03 +000020# This flag determines whether pointer authentication is used in the TSP or not
21ifeq ($(ENABLE_PAUTH),1)
22BL32_CFLAGS += -msign-return-address=non-leaf
23endif
24
Juan Castillo7d199412015-12-14 09:35:25 +000025# This flag determines if the TSPD initializes BL32 in tspd_init() (synchronous
26# method) or configures BL31 to pass control to BL32 instead of BL33
Vikram Kanigiri4e813412014-07-15 16:49:22 +010027# (asynchronous method).
28TSP_INIT_ASYNC := 0
29
30$(eval $(call assert_boolean,TSP_INIT_ASYNC))
31$(eval $(call add_define,TSP_INIT_ASYNC))
32
Sandrine Bailleuxa3a936e2014-03-13 14:48:31 +000033# Include the platform-specific TSP Makefile
34# If no platform-specific TSP Makefile exists, it means TSP is not supported
35# on this platform.
Evan Lloydf2697142015-12-02 18:17:37 +000036TSP_PLAT_MAKEFILE := $(wildcard ${PLAT_DIR}/tsp/tsp-${PLAT}.mk)
37ifeq (,${TSP_PLAT_MAKEFILE})
Sandrine Bailleuxa3a936e2014-03-13 14:48:31 +000038 $(error TSP is not supported on platform ${PLAT})
39else
40 include ${TSP_PLAT_MAKEFILE}
41endif