xref: /rk3399_ARM-atf/bl32/tsp/tsp.mk (revision 4a8bfdb90956ecec02ba5e189fe5452817a65179)
17c88f3f6SAchin Gupta#
2*4a8bfdb9SAchin Gupta# Copyright (c) 2013-2022, ARM Limited and Contributors. All rights reserved.
37c88f3f6SAchin Gupta#
482cb2c1aSdp-arm# SPDX-License-Identifier: BSD-3-Clause
57c88f3f6SAchin Gupta#
67c88f3f6SAchin Gupta
75a06bb7eSDan HandleyINCLUDES		+=	-Iinclude/bl32/tsp
85a06bb7eSDan Handley
9*4a8bfdb9SAchin Guptaifeq (${SPMC_AT_EL3},1)
10*4a8bfdb9SAchin Gupta   BL32_SOURCES            +=      bl32/tsp/tsp_ffa_main.c
11*4a8bfdb9SAchin Guptaelse
12*4a8bfdb9SAchin Gupta   BL32_SOURCES            +=      bl32/tsp/tsp_main.c
13*4a8bfdb9SAchin Guptaendif
14*4a8bfdb9SAchin Gupta
15*4a8bfdb9SAchin GuptaBL32_SOURCES		+=	bl32/tsp/aarch64/tsp_entrypoint.S	\
1657356e90SAchin Gupta				bl32/tsp/aarch64/tsp_exceptions.S	\
17bee82417SDan Handley				bl32/tsp/aarch64/tsp_request.S		\
186cf89021SAchin Gupta				bl32/tsp/tsp_interrupt.c		\
196cf89021SAchin Gupta				bl32/tsp/tsp_timer.c			\
20*4a8bfdb9SAchin Gupta				bl32/tsp/tsp_common.c			\
21bee82417SDan Handley				common/aarch64/early_exceptions.S	\
2212ab697eSSoby Mathew				lib/locks/exclusive/aarch64/spinlock.S
237c88f3f6SAchin Gupta
24bee82417SDan HandleyBL32_LINKERFILE		:=	bl32/tsp/tsp.ld.S
257c88f3f6SAchin Gupta
26d178637dSJuan Castillo# This flag determines if the TSPD initializes BL32 in tspd_init() (synchronous
27d178637dSJuan Castillo# method) or configures BL31 to pass control to BL32 instead of BL33
28faaa2e76SVikram Kanigiri# (asynchronous method).
29faaa2e76SVikram KanigiriTSP_INIT_ASYNC         :=      0
30faaa2e76SVikram Kanigiri
31faaa2e76SVikram Kanigiri$(eval $(call assert_boolean,TSP_INIT_ASYNC))
32faaa2e76SVikram Kanigiri$(eval $(call add_define,TSP_INIT_ASYNC))
33faaa2e76SVikram Kanigiri
34d1466a2eSSandrine Bailleux# Include the platform-specific TSP Makefile
35d1466a2eSSandrine Bailleux# If no platform-specific TSP Makefile exists, it means TSP is not supported
36d1466a2eSSandrine Bailleux# on this platform.
37231c1470SEvan LloydTSP_PLAT_MAKEFILE := $(wildcard ${PLAT_DIR}/tsp/tsp-${PLAT}.mk)
38231c1470SEvan Lloydifeq (,${TSP_PLAT_MAKEFILE})
39d1466a2eSSandrine Bailleux  $(error TSP is not supported on platform ${PLAT})
40d1466a2eSSandrine Bailleuxelse
41d1466a2eSSandrine Bailleux  include ${TSP_PLAT_MAKEFILE}
42d1466a2eSSandrine Bailleuxendif
43