tsp.mk 1.5 KB

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