tsp.mk 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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. bl32/tsp/tsp_context.c \
  20. common/aarch64/early_exceptions.S \
  21. lib/locks/exclusive/aarch64/spinlock.S
  22. BL32_DEFAULT_LINKER_SCRIPT_SOURCE := bl32/tsp/tsp.ld.S
  23. ifeq ($($(ARCH)-ld-id),gnu-gcc)
  24. BL32_LDFLAGS += -Wl,--sort-section=alignment
  25. else ifneq ($(filter llvm-lld gnu-ld,$($(ARCH)-ld-id)),)
  26. BL32_LDFLAGS += --sort-section=alignment
  27. endif
  28. # This flag determines if the TSPD initializes BL32 in tspd_init() (synchronous
  29. # method) or configures BL31 to pass control to BL32 instead of BL33
  30. # (asynchronous method).
  31. TSP_INIT_ASYNC := 0
  32. $(eval $(call assert_boolean,TSP_INIT_ASYNC))
  33. $(eval $(call add_define,TSP_INIT_ASYNC))
  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.
  37. TSP_PLAT_MAKEFILE := $(wildcard ${PLAT_DIR}/tsp/tsp-${PLAT}.mk)
  38. ifeq (,${TSP_PLAT_MAKEFILE})
  39. $(error TSP is not supported on platform ${PLAT})
  40. else
  41. include ${TSP_PLAT_MAKEFILE}
  42. endif