| 1 |
# |
| 2 |
# Copyright (c) 2013-2024, Arm Limited and Contributors. All rights reserved. |
| 3 |
# |
| 4 |
# SPDX-License-Identifier: BSD-3-Clause |
| 5 |
# |
| 6 |
|
| 7 |
INCLUDES += -Iinclude/bl32/tsp |
| 8 |
|
| 9 |
ifeq (${SPMC_AT_EL3},1) |
| 10 |
BL32_SOURCES += bl32/tsp/tsp_ffa_main.c \ |
| 11 |
bl32/tsp/ffa_helpers.c |
| 12 |
else |
| 13 |
BL32_SOURCES += bl32/tsp/tsp_main.c |
| 14 |
endif |
| 15 |
|
| 16 |
BL32_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 |
lib/locks/exclusive/aarch64/spinlock.S |
| 25 |
|
| 26 |
BL32_DEFAULT_LINKER_SCRIPT_SOURCE := bl32/tsp/tsp.ld.S |
| 27 |
|
| 28 |
ifeq ($($(ARCH)-ld-id),gnu-gcc) |
| 29 |
BL32_LDFLAGS += -Wl,--sort-section=alignment |
| 30 |
else ifneq ($(filter llvm-lld gnu-ld,$($(ARCH)-ld-id)),) |
| 31 |
BL32_LDFLAGS += --sort-section=alignment |
| 32 |
endif |
| 33 |
|
| 34 |
# This flag determines if the TSPD initializes BL32 in tspd_init() (synchronous |
| 35 |
# method) or configures BL31 to pass control to BL32 instead of BL33 |
| 36 |
# (asynchronous method). |
| 37 |
TSP_INIT_ASYNC := 0 |
| 38 |
|
| 39 |
$(eval $(call assert_boolean,TSP_INIT_ASYNC)) |
| 40 |
$(eval $(call add_define,TSP_INIT_ASYNC)) |
| 41 |
|
| 42 |
# Include the platform-specific TSP Makefile |
| 43 |
# If no platform-specific TSP Makefile exists, it means TSP is not supported |
| 44 |
# on this platform. |
| 45 |
TSP_PLAT_MAKEFILE := $(wildcard ${PLAT_DIR}/tsp/tsp-${PLAT}.mk) |
| 46 |
ifeq (,${TSP_PLAT_MAKEFILE}) |
| 47 |
$(error TSP is not supported on platform ${PLAT}) |
| 48 |
else |
| 49 |
include ${TSP_PLAT_MAKEFILE} |
| 50 |
endif |