platform.mk 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. #
  2. # Copyright (c) 2018-2023, Arm Limited. All rights reserved.
  3. #
  4. # SPDX-License-Identifier: BSD-3-Clause
  5. #
  6. N1SDP_BASE := plat/arm/board/n1sdp
  7. INTERCONNECT_SOURCES := ${N1SDP_BASE}/n1sdp_interconnect.c
  8. PLAT_INCLUDES := -I${N1SDP_BASE}/include
  9. N1SDP_CPU_SOURCES := lib/cpus/aarch64/neoverse_n1.S
  10. # Neoverse N1 cores support Armv8.2 extensions
  11. ARM_ARCH_MAJOR := 8
  12. ARM_ARCH_MINOR := 2
  13. # GIC-600 configuration
  14. GICV3_SUPPORT_GIC600 := 1
  15. GICV3_IMPL_GIC600_MULTICHIP := 1
  16. # Include GICv3 driver files
  17. include drivers/arm/gic/v3/gicv3.mk
  18. N1SDP_GIC_SOURCES := ${GICV3_SOURCES} \
  19. plat/common/plat_gicv3.c \
  20. plat/arm/common/arm_gicv3.c \
  21. PLAT_BL_COMMON_SOURCES := ${N1SDP_BASE}/n1sdp_plat.c \
  22. ${N1SDP_BASE}/aarch64/n1sdp_helper.S
  23. BL1_SOURCES := ${N1SDP_CPU_SOURCES} \
  24. ${INTERCONNECT_SOURCES} \
  25. ${N1SDP_BASE}/n1sdp_err.c \
  26. ${N1SDP_BASE}/n1sdp_trusted_boot.c \
  27. ${N1SDP_BASE}/n1sdp_bl1_setup.c \
  28. drivers/arm/sbsa/sbsa.c
  29. BL2_SOURCES := ${N1SDP_BASE}/n1sdp_security.c \
  30. ${N1SDP_BASE}/n1sdp_err.c \
  31. ${N1SDP_BASE}/n1sdp_trusted_boot.c \
  32. lib/utils/mem_region.c \
  33. ${N1SDP_BASE}/n1sdp_bl2_setup.c \
  34. ${N1SDP_BASE}/n1sdp_image_load.c \
  35. drivers/arm/css/sds/sds.c
  36. BL31_SOURCES := ${N1SDP_CPU_SOURCES} \
  37. ${INTERCONNECT_SOURCES} \
  38. ${N1SDP_GIC_SOURCES} \
  39. ${N1SDP_BASE}/n1sdp_bl31_setup.c \
  40. ${N1SDP_BASE}/n1sdp_pm.c \
  41. ${N1SDP_BASE}/n1sdp_topology.c \
  42. ${N1SDP_BASE}/n1sdp_security.c \
  43. drivers/arm/css/sds/sds.c
  44. FDT_SOURCES += fdts/${PLAT}-single-chip.dts \
  45. fdts/${PLAT}-multi-chip.dts \
  46. ${N1SDP_BASE}/fdts/n1sdp_fw_config.dts \
  47. ${N1SDP_BASE}/fdts/n1sdp_tb_fw_config.dts \
  48. ${N1SDP_BASE}/fdts/n1sdp_nt_fw_config.dts
  49. FW_CONFIG := ${BUILD_PLAT}/fdts/n1sdp_fw_config.dtb
  50. TB_FW_CONFIG := ${BUILD_PLAT}/fdts/n1sdp_tb_fw_config.dtb
  51. NT_FW_CONFIG := ${BUILD_PLAT}/fdts/n1sdp_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 TB_FW_CONFIG to FIP and specify the same to certtool
  55. $(eval $(call TOOL_ADD_PAYLOAD,${TB_FW_CONFIG},--tb-fw-config,${TB_FW_CONFIG}))
  56. # Add the NT_FW_CONFIG to FIP and specify the same to certtool
  57. $(eval $(call TOOL_ADD_PAYLOAD,${NT_FW_CONFIG},--nt-fw-config,${NT_FW_CONFIG}))
  58. N1SDP_SPMC_MANIFEST_DTS := ${N1SDP_BASE}/fdts/${PLAT}_optee_spmc_manifest.dts
  59. FDT_SOURCES += ${N1SDP_SPMC_MANIFEST_DTS}
  60. N1SDP_TOS_FW_CONFIG := ${BUILD_PLAT}/fdts/${PLAT}_optee_spmc_manifest.dtb
  61. # Add the TOS_FW_CONFIG to FIP and specify the same to certtool
  62. $(eval $(call TOOL_ADD_PAYLOAD,${N1SDP_TOS_FW_CONFIG},--tos-fw-config,${N1SDP_TOS_FW_CONFIG}))
  63. # Setting to 0 as no NVCTR in N1SDP
  64. N1SDP_FW_NVCTR_VAL := 0
  65. TFW_NVCTR_VAL := ${N1SDP_FW_NVCTR_VAL}
  66. NTFW_NVCTR_VAL := ${N1SDP_FW_NVCTR_VAL}
  67. # Add N1SDP_FW_NVCTR_VAL
  68. $(eval $(call add_define,N1SDP_FW_NVCTR_VAL))
  69. # TF-A not required to load the SCP Images
  70. override CSS_LOAD_SCP_IMAGES := 0
  71. override NEED_BL2U := no
  72. # 32 bit mode not supported
  73. override CTX_INCLUDE_AARCH32_REGS := 0
  74. override ARM_PLAT_MT := 1
  75. # Select SCMI/SDS drivers instead of SCPI/BOM driver for communicating with the
  76. # SCP during power management operations and for SCP RAM Firmware transfer.
  77. CSS_USE_SCMI_SDS_DRIVER := 1
  78. # System coherency is managed in hardware
  79. HW_ASSISTED_COHERENCY := 1
  80. # When building for systems with hardware-assisted coherency, there's no need to
  81. # use USE_COHERENT_MEM. Require that USE_COHERENT_MEM must be set to 0 too.
  82. USE_COHERENT_MEM := 0
  83. # Enable the flag since N1SDP has a system level cache
  84. NEOVERSE_Nx_EXTERNAL_LLC := 1
  85. include plat/arm/common/arm_common.mk
  86. include plat/arm/css/common/css_common.mk
  87. include plat/arm/board/common/board_common.mk