1# 2# Copyright (c) 2013-2022, ARM Limited and Contributors. All rights reserved. 3# 4# SPDX-License-Identifier: BSD-3-Clause 5# 6 7INCLUDES += -Iinclude/bl32/tsp 8 9ifeq (${SPMC_AT_EL3},1) 10 BL32_SOURCES += bl32/tsp/tsp_ffa_main.c 11else 12 BL32_SOURCES += bl32/tsp/tsp_main.c 13endif 14 15BL32_SOURCES += bl32/tsp/aarch64/tsp_entrypoint.S \ 16 bl32/tsp/aarch64/tsp_exceptions.S \ 17 bl32/tsp/aarch64/tsp_request.S \ 18 bl32/tsp/tsp_interrupt.c \ 19 bl32/tsp/tsp_timer.c \ 20 bl32/tsp/tsp_common.c \ 21 common/aarch64/early_exceptions.S \ 22 lib/locks/exclusive/aarch64/spinlock.S 23 24BL32_LINKERFILE := bl32/tsp/tsp.ld.S 25 26# This flag determines if the TSPD initializes BL32 in tspd_init() (synchronous 27# method) or configures BL31 to pass control to BL32 instead of BL33 28# (asynchronous method). 29TSP_INIT_ASYNC := 0 30 31$(eval $(call assert_boolean,TSP_INIT_ASYNC)) 32$(eval $(call add_define,TSP_INIT_ASYNC)) 33 34# Include the platform-specific TSP Makefile 35# If no platform-specific TSP Makefile exists, it means TSP is not supported 36# on this platform. 37TSP_PLAT_MAKEFILE := $(wildcard ${PLAT_DIR}/tsp/tsp-${PLAT}.mk) 38ifeq (,${TSP_PLAT_MAKEFILE}) 39 $(error TSP is not supported on platform ${PLAT}) 40else 41 include ${TSP_PLAT_MAKEFILE} 42endif 43