platform.mk 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. # Copyright (c) 2018-2022, Arm Limited and Contributors. All rights reserved.
  2. # Copyright (c) 2021-2022, Xilinx, Inc. All rights reserved.
  3. # Copyright (c) 2022-2024, Advanced Micro Devices, Inc. All rights reserved.
  4. #
  5. # SPDX-License-Identifier: BSD-3-Clause
  6. PLAT_PATH := plat/amd/versal2
  7. override NEED_BL1 := no
  8. override NEED_BL2 := no
  9. # A78 Erratum for SoC
  10. ERRATA_A78_AE_1941500 := 1
  11. ERRATA_A78_AE_1951502 := 1
  12. ERRATA_A78_AE_2376748 := 1
  13. ERRATA_A78_AE_2395408 := 1
  14. ERRATA_ABI_SUPPORT := 1
  15. # Platform Supports Armv8.2 extensions
  16. ARM_ARCH_MAJOR := 8
  17. ARM_ARCH_MINOR := 2
  18. override PROGRAMMABLE_RESET_ADDRESS := 1
  19. PSCI_EXTENDED_STATE_ID := 1
  20. SEPARATE_CODE_AND_RODATA := 1
  21. override RESET_TO_BL31 := 1
  22. PL011_GENERIC_UART := 1
  23. IPI_CRC_CHECK := 0
  24. GIC_ENABLE_V4_EXTN := 0
  25. GICV3_SUPPORT_GIC600 := 1
  26. override CTX_INCLUDE_AARCH32_REGS := 0
  27. # Platform to support Dynamic XLAT Table by default
  28. override PLAT_XLAT_TABLES_DYNAMIC := 1
  29. $(eval $(call add_define,PLAT_XLAT_TABLES_DYNAMIC))
  30. ifdef MEM_BASE
  31. $(eval $(call add_define,MEM_BASE))
  32. ifndef MEM_SIZE
  33. $(error "MEM_BASE defined without MEM_SIZE")
  34. endif
  35. $(eval $(call add_define,MEM_SIZE))
  36. ifdef MEM_PROGBITS_SIZE
  37. $(eval $(call add_define,MEM_PROGBITS_SIZE))
  38. endif
  39. endif
  40. ifdef BL32_MEM_BASE
  41. $(eval $(call add_define,BL32_MEM_BASE))
  42. ifndef BL32_MEM_SIZE
  43. $(error "BL32_MEM_BASE defined without BL32_MEM_SIZE")
  44. endif
  45. $(eval $(call add_define,BL32_MEM_SIZE))
  46. endif
  47. ifdef IPI_CRC_CHECK
  48. $(eval $(call add_define,IPI_CRC_CHECK))
  49. endif
  50. USE_COHERENT_MEM := 0
  51. HW_ASSISTED_COHERENCY := 1
  52. VERSAL2_CONSOLE ?= pl011
  53. ifeq (${VERSAL2_CONSOLE}, $(filter ${VERSAL2_CONSOLE},pl011 pl011_0 pl011_1 dcc dtb none))
  54. else
  55. $(error "Please define VERSAL2_CONSOLE")
  56. endif
  57. $(eval $(call add_define_val,VERSAL2_CONSOLE,VERSAL2_CONSOLE_ID_${VERSAL2_CONSOLE}))
  58. # Runtime console in default console in DEBUG build
  59. ifeq ($(DEBUG), 1)
  60. CONSOLE_RUNTIME ?= pl011
  61. endif
  62. # Runtime console
  63. ifdef CONSOLE_RUNTIME
  64. ifeq (${CONSOLE_RUNTIME}, $(filter ${CONSOLE_RUNTIME},pl011 pl011_0 pl011_1 dcc dtb))
  65. $(eval $(call add_define_val,CONSOLE_RUNTIME,RT_CONSOLE_ID_${CONSOLE_RUNTIME}))
  66. else
  67. $(error "Please define CONSOLE_RUNTIME")
  68. endif
  69. endif
  70. ifdef XILINX_OF_BOARD_DTB_ADDR
  71. $(eval $(call add_define,XILINX_OF_BOARD_DTB_ADDR))
  72. endif
  73. PLAT_INCLUDES := -Iinclude/plat/arm/common/ \
  74. -Iplat/xilinx/common/include/ \
  75. -Iplat/xilinx/common/ipi_mailbox_service/ \
  76. -I${PLAT_PATH}/include/ \
  77. -Iplat/xilinx/versal/pm_service/
  78. # Include GICv3 driver files
  79. include drivers/arm/gic/v3/gicv3.mk
  80. include lib/xlat_tables_v2/xlat_tables.mk
  81. include lib/libfdt/libfdt.mk
  82. PLAT_BL_COMMON_SOURCES := \
  83. drivers/arm/dcc/dcc_console.c \
  84. drivers/delay_timer/delay_timer.c \
  85. drivers/delay_timer/generic_delay_timer.c \
  86. ${GICV3_SOURCES} \
  87. drivers/arm/pl011/aarch64/pl011_console.S \
  88. plat/common/aarch64/crash_console_helpers.S \
  89. plat/arm/common/arm_common.c \
  90. plat/common/plat_gicv3.c \
  91. ${PLAT_PATH}/aarch64/helpers.S \
  92. ${PLAT_PATH}/aarch64/common.c \
  93. ${PLAT_PATH}/plat_topology.c \
  94. ${XLAT_TABLES_LIB_SRCS}
  95. BL31_SOURCES += drivers/arm/cci/cci.c \
  96. lib/cpus/aarch64/cortex_a78_ae.S \
  97. lib/cpus/aarch64/cortex_a78.S \
  98. plat/common/plat_psci_common.c \
  99. drivers/scmi-msg/base.c \
  100. drivers/scmi-msg/entry.c \
  101. drivers/scmi-msg/smt.c \
  102. drivers/scmi-msg/clock.c \
  103. drivers/scmi-msg/power_domain.c \
  104. drivers/scmi-msg/reset_domain.c \
  105. ${PLAT_PATH}/scmi.c
  106. BL31_SOURCES += ${PLAT_PATH}/plat_psci.c
  107. BL31_SOURCES += plat/xilinx/common/plat_fdt.c \
  108. common/fdt_wrappers.c \
  109. plat/xilinx/common/plat_fdt.c \
  110. plat/xilinx/common/plat_console.c \
  111. plat/xilinx/common/plat_startup.c \
  112. plat/xilinx/common/ipi.c \
  113. plat/xilinx/common/ipi_mailbox_service/ipi_mailbox_svc.c \
  114. ${PLAT_PATH}/soc_ipi.c \
  115. plat/xilinx/common/versal.c \
  116. ${PLAT_PATH}/bl31_setup.c \
  117. common/fdt_fixup.c \
  118. common/fdt_wrappers.c \
  119. ${LIBFDT_SRCS} \
  120. ${PLAT_PATH}/sip_svc_setup.c \
  121. ${PLAT_PATH}/gicv3.c
  122. ifeq (${ERRATA_ABI_SUPPORT}, 1)
  123. # enable the cpu macros for errata abi interface
  124. CORTEX_A78_AE_H_INC := 1
  125. $(eval $(call add_define, CORTEX_A78_AE_H_INC))
  126. endif
  127. # Enable Handoff protocol using transfer lists
  128. TRANSFER_LIST := 1
  129. include lib/transfer_list/transfer_list.mk
  130. BL31_SOURCES += plat/xilinx/common/plat_xfer_list.c