xref: /rk3399_ARM-atf/bl32/tsp/tsp.mk (revision 82274936374bf630bf5256370e93a531fdda6372)
17c88f3f6SAchin Gupta#
2*82274936SChris Kay# Copyright (c) 2013-2023, 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
94a8bfdb9SAchin Guptaifeq (${SPMC_AT_EL3},1)
10e9b1f300SMarc Bonnici   BL32_SOURCES            +=      bl32/tsp/tsp_ffa_main.c                    \
11e9b1f300SMarc Bonnici				   bl32/tsp/ffa_helpers.c
124a8bfdb9SAchin Guptaelse
134a8bfdb9SAchin Gupta   BL32_SOURCES            +=      bl32/tsp/tsp_main.c
144a8bfdb9SAchin Guptaendif
154a8bfdb9SAchin Gupta
164a8bfdb9SAchin GuptaBL32_SOURCES		+=	bl32/tsp/aarch64/tsp_entrypoint.S	\
1757356e90SAchin Gupta				bl32/tsp/aarch64/tsp_exceptions.S	\
18bee82417SDan Handley				bl32/tsp/aarch64/tsp_request.S		\
196cf89021SAchin Gupta				bl32/tsp/tsp_interrupt.c		\
206cf89021SAchin Gupta				bl32/tsp/tsp_timer.c			\
214a8bfdb9SAchin Gupta				bl32/tsp/tsp_common.c			\
22bee82417SDan Handley				common/aarch64/early_exceptions.S	\
2312ab697eSSoby Mathew				lib/locks/exclusive/aarch64/spinlock.S
247c88f3f6SAchin Gupta
25*82274936SChris KayBL32_DEFAULT_LINKER_SCRIPT_SOURCE := bl32/tsp/tsp.ld.S
267c88f3f6SAchin Gupta
27d178637dSJuan Castillo# This flag determines if the TSPD initializes BL32 in tspd_init() (synchronous
28d178637dSJuan Castillo# method) or configures BL31 to pass control to BL32 instead of BL33
29faaa2e76SVikram Kanigiri# (asynchronous method).
30faaa2e76SVikram KanigiriTSP_INIT_ASYNC         :=      0
31faaa2e76SVikram Kanigiri
32faaa2e76SVikram Kanigiri$(eval $(call assert_boolean,TSP_INIT_ASYNC))
33faaa2e76SVikram Kanigiri$(eval $(call add_define,TSP_INIT_ASYNC))
34faaa2e76SVikram Kanigiri
35d1466a2eSSandrine Bailleux# Include the platform-specific TSP Makefile
36d1466a2eSSandrine Bailleux# If no platform-specific TSP Makefile exists, it means TSP is not supported
37d1466a2eSSandrine Bailleux# on this platform.
38231c1470SEvan LloydTSP_PLAT_MAKEFILE := $(wildcard ${PLAT_DIR}/tsp/tsp-${PLAT}.mk)
39231c1470SEvan Lloydifeq (,${TSP_PLAT_MAKEFILE})
40d1466a2eSSandrine Bailleux  $(error TSP is not supported on platform ${PLAT})
41d1466a2eSSandrine Bailleuxelse
42d1466a2eSSandrine Bailleux  include ${TSP_PLAT_MAKEFILE}
43d1466a2eSSandrine Bailleuxendif
44