bl2.mk 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. #
  2. # Copyright (c) 2013-2023, Arm Limited and Contributors. All rights reserved.
  3. #
  4. # SPDX-License-Identifier: BSD-3-Clause
  5. #
  6. BL2_SOURCES += bl2/bl2_image_load_v2.c \
  7. bl2/bl2_main.c \
  8. bl2/${ARCH}/bl2_arch_setup.c \
  9. lib/locks/exclusive/${ARCH}/spinlock.S \
  10. plat/common/${ARCH}/platform_up_stack.S \
  11. ${MBEDTLS_SOURCES}
  12. ifeq (${ARCH},aarch64)
  13. BL2_SOURCES += common/aarch64/early_exceptions.S
  14. endif
  15. ifeq (${ENABLE_RME},1)
  16. # Using RME, run BL2 at EL3
  17. include lib/gpt_rme/gpt_rme.mk
  18. BL2_SOURCES += bl2/${ARCH}/bl2_rme_entrypoint.S \
  19. bl2/${ARCH}/bl2_el3_exceptions.S \
  20. bl2/${ARCH}/bl2_run_next_image.S \
  21. ${GPT_LIB_SRCS}
  22. BL2_DEFAULT_LINKER_SCRIPT_SOURCE := bl2/bl2.ld.S
  23. else ifeq (${RESET_TO_BL2},0)
  24. # Normal operation, no RME, no BL2 at EL3
  25. BL2_SOURCES += bl2/${ARCH}/bl2_entrypoint.S
  26. BL2_DEFAULT_LINKER_SCRIPT_SOURCE := bl2/bl2.ld.S
  27. else
  28. # BL2 at EL3, no RME
  29. BL2_SOURCES += bl2/${ARCH}/bl2_el3_entrypoint.S \
  30. bl2/${ARCH}/bl2_el3_exceptions.S \
  31. bl2/${ARCH}/bl2_run_next_image.S \
  32. lib/cpus/${ARCH}/cpu_helpers.S \
  33. lib/cpus/errata_report.c
  34. ifeq (${DISABLE_MTPMU},1)
  35. BL2_SOURCES += lib/extensions/mtpmu/${ARCH}/mtpmu.S
  36. endif
  37. ifeq (${ARCH},aarch64)
  38. BL2_SOURCES += lib/cpus/aarch64/dsu_helpers.S
  39. endif
  40. BL2_DEFAULT_LINKER_SCRIPT_SOURCE := bl2/bl2_el3.ld.S
  41. endif