1# 2# Copyright (c) 2013-2025, 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 \ 11 bl32/tsp/ffa_helpers.c 12else 13 BL32_SOURCES += bl32/tsp/tsp_main.c 14endif 15 16BL32_SOURCES += bl32/tsp/aarch64/tsp_entrypoint.S \ 17 bl32/tsp/aarch64/tsp_exceptions.S \ 18 bl32/tsp/aarch64/tsp_request.S \ 19 bl32/tsp/tsp_interrupt.c \ 20 bl32/tsp/tsp_timer.c \ 21 bl32/tsp/tsp_common.c \ 22 bl32/tsp/tsp_context.c \ 23 common/aarch64/early_exceptions.S \ 24 25BL32_DEFAULT_LINKER_SCRIPT_SOURCE := bl32/tsp/tsp.ld.S 26 27# CRYPTO_SUPPORT 28NEED_AUTH := 0 29NEED_HASH := $(if $(filter 1,$(MEASURED_BOOT)),1,) 30$(eval $(call set_crypto_support,NEED_AUTH,NEED_HASH)) 31 32# BL32_CPPFLAGS 33$(eval BL32_CPPFLAGS += $(call make_defines, \ 34 $(sort \ 35 CRYPTO_SUPPORT \ 36))) 37 38# Numeric_Flags 39$(eval $(call assert_numerics,\ 40 $(sort \ 41 CRYPTO_SUPPORT \ 42))) 43 44# This flag determines if the TSPD initializes BL32 in tspd_init() (synchronous 45# method) or configures BL31 to pass control to BL32 instead of BL33 46# (asynchronous method). 47TSP_INIT_ASYNC := 0 48 49$(eval $(call assert_boolean,TSP_INIT_ASYNC)) 50$(eval $(call add_define,TSP_INIT_ASYNC)) 51 52# Include the platform-specific TSP Makefile 53# If no platform-specific TSP Makefile exists, it means TSP is not supported 54# on this platform. 55TSP_PLAT_MAKEFILE := $(wildcard ${PLAT_DIR}/tsp/tsp-${PLAT}.mk) 56ifeq (,${TSP_PLAT_MAKEFILE}) 57 $(error TSP is not supported on platform ${PLAT}) 58else 59 include ${TSP_PLAT_MAKEFILE} 60endif 61