platform.mk 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. #
  2. # Copyright (c) 2020-2023, Arm Limited. All rights reserved.
  3. #
  4. # SPDX-License-Identifier: BSD-3-Clause
  5. #
  6. # Making sure the Morello platform type is specified
  7. ifeq ($(filter ${TARGET_PLATFORM}, fvp soc),)
  8. $(error TARGET_PLATFORM must be fvp or soc)
  9. endif
  10. MORELLO_BASE := plat/arm/board/morello
  11. INTERCONNECT_SOURCES := ${MORELLO_BASE}/morello_interconnect.c
  12. PLAT_INCLUDES := -I${MORELLO_BASE}/include
  13. MORELLO_CPU_SOURCES := lib/cpus/aarch64/rainier.S
  14. # GIC-600 configuration
  15. GICV3_SUPPORT_GIC600 := 1
  16. # Include GICv3 driver files
  17. include drivers/arm/gic/v3/gicv3.mk
  18. MORELLO_GIC_SOURCES := ${GICV3_SOURCES} \
  19. plat/common/plat_gicv3.c \
  20. plat/arm/common/arm_gicv3.c \
  21. PLAT_BL_COMMON_SOURCES := ${MORELLO_BASE}/morello_plat.c \
  22. ${MORELLO_BASE}/aarch64/morello_helper.S
  23. BL1_SOURCES := ${MORELLO_CPU_SOURCES} \
  24. ${INTERCONNECT_SOURCES} \
  25. ${MORELLO_BASE}/morello_err.c \
  26. ${MORELLO_BASE}/morello_trusted_boot.c \
  27. ${MORELLO_BASE}/morello_bl1_setup.c \
  28. drivers/arm/sbsa/sbsa.c
  29. BL2_SOURCES := ${MORELLO_BASE}/morello_security.c \
  30. ${MORELLO_BASE}/morello_err.c \
  31. ${MORELLO_BASE}/morello_trusted_boot.c \
  32. ${MORELLO_BASE}/morello_bl2_setup.c \
  33. ${MORELLO_BASE}/morello_image_load.c \
  34. lib/utils/mem_region.c \
  35. drivers/arm/css/sds/sds.c
  36. BL31_SOURCES := ${MORELLO_CPU_SOURCES} \
  37. ${INTERCONNECT_SOURCES} \
  38. ${MORELLO_GIC_SOURCES} \
  39. ${MORELLO_BASE}/morello_bl31_setup.c \
  40. ${MORELLO_BASE}/morello_pm.c \
  41. ${MORELLO_BASE}/morello_topology.c \
  42. ${MORELLO_BASE}/morello_security.c \
  43. drivers/arm/css/sds/sds.c
  44. FDT_SOURCES += fdts/morello-${TARGET_PLATFORM}.dts \
  45. ${MORELLO_BASE}/fdts/morello_fw_config.dts \
  46. ${MORELLO_BASE}/fdts/morello_tb_fw_config.dts \
  47. ${MORELLO_BASE}/fdts/morello_nt_fw_config.dts
  48. FW_CONFIG := ${BUILD_PLAT}/fdts/morello_fw_config.dtb
  49. HW_CONFIG := ${BUILD_PLAT}/fdts/morello-${TARGET_PLATFORM}.dtb
  50. TB_FW_CONFIG := ${BUILD_PLAT}/fdts/morello_tb_fw_config.dtb
  51. NT_FW_CONFIG := ${BUILD_PLAT}/fdts/morello_nt_fw_config.dtb
  52. # Add the FW_CONFIG to FIP and specify the same to certtool
  53. $(eval $(call TOOL_ADD_PAYLOAD,${FW_CONFIG},--fw-config,${FW_CONFIG}))
  54. # Add the HW_CONFIG to FIP and specify the same to certtool
  55. $(eval $(call TOOL_ADD_PAYLOAD,${HW_CONFIG},--hw-config,${HW_CONFIG}))
  56. # Add the TB_FW_CONFIG to FIP and specify the same to certtool
  57. $(eval $(call TOOL_ADD_PAYLOAD,${TB_FW_CONFIG},--tb-fw-config,${TB_FW_CONFIG}))
  58. # Add the NT_FW_CONFIG to FIP and specify the same to certtool
  59. $(eval $(call TOOL_ADD_PAYLOAD,${NT_FW_CONFIG},--nt-fw-config,${NT_FW_CONFIG}))
  60. MORELLO_FW_NVCTR_VAL := 0
  61. TFW_NVCTR_VAL := ${MORELLO_FW_NVCTR_VAL}
  62. NTFW_NVCTR_VAL := ${MORELLO_FW_NVCTR_VAL}
  63. # TF-A not required to load the SCP Images
  64. override CSS_LOAD_SCP_IMAGES := 0
  65. override NEED_BL2U := no
  66. # 32 bit mode not supported
  67. override CTX_INCLUDE_AARCH32_REGS := 0
  68. override ARM_PLAT_MT := 1
  69. override ARM_BL31_IN_DRAM := 1
  70. override PSCI_EXTENDED_STATE_ID := 1
  71. override ARM_RECOM_STATE_ID_ENC := 1
  72. # Errata workarounds:
  73. ERRATA_N1_1868343 := 1
  74. # Select SCMI/SDS drivers instead of SCPI/BOM driver for communicating with the
  75. # SCP during power management operations and for SCP RAM Firmware transfer.
  76. CSS_USE_SCMI_SDS_DRIVER := 1
  77. # System coherency is managed in hardware
  78. HW_ASSISTED_COHERENCY := 1
  79. # When building for systems with hardware-assisted coherency, there's no need to
  80. # use USE_COHERENT_MEM. Require that USE_COHERENT_MEM must be set to 0 too.
  81. USE_COHERENT_MEM := 0
  82. # Add TARGET_PLATFORM to differentiate between Morello FVP and Morello SoC platform
  83. $(eval $(call add_define,TARGET_PLATFORM_$(call uppercase,${TARGET_PLATFORM})))
  84. # Add MORELLO_FW_NVCTR_VAL
  85. $(eval $(call add_define,MORELLO_FW_NVCTR_VAL))
  86. include plat/arm/common/arm_common.mk
  87. include plat/arm/css/common/css_common.mk
  88. include plat/arm/board/common/board_common.mk