css_common.mk 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. #
  2. # Copyright (c) 2015-2022, Arm Limited and Contributors. All rights reserved.
  3. #
  4. # SPDX-License-Identifier: BSD-3-Clause
  5. #
  6. # By default, SCP images are needed by CSS platforms.
  7. CSS_LOAD_SCP_IMAGES ?= 1
  8. # By default, SCMI driver is disabled for CSS platforms
  9. CSS_USE_SCMI_SDS_DRIVER ?= 0
  10. PLAT_INCLUDES += -Iinclude/plat/arm/css/common/aarch64
  11. PLAT_BL_COMMON_SOURCES += plat/arm/css/common/${ARCH}/css_helpers.S
  12. BL1_SOURCES += plat/arm/css/common/css_bl1_setup.c
  13. BL2_SOURCES += plat/arm/css/common/css_bl2_setup.c
  14. BL2U_SOURCES += plat/arm/css/common/css_bl2u_setup.c
  15. BL31_SOURCES += plat/arm/css/common/css_pm.c \
  16. plat/arm/css/common/css_topology.c
  17. ifeq (${CSS_USE_SCMI_SDS_DRIVER},0)
  18. BL31_SOURCES += drivers/arm/css/mhu/css_mhu.c \
  19. drivers/arm/css/scp/css_pm_scpi.c \
  20. drivers/arm/css/scpi/css_scpi.c
  21. else
  22. BL31_SOURCES += drivers/arm/css/mhu/css_mhu_doorbell.c \
  23. drivers/arm/css/scmi/scmi_ap_core_proto.c \
  24. drivers/arm/css/scmi/scmi_common.c \
  25. drivers/arm/css/scmi/scmi_pwr_dmn_proto.c \
  26. drivers/arm/css/scmi/scmi_sys_pwr_proto.c \
  27. drivers/delay_timer/delay_timer.c \
  28. drivers/arm/css/scp/css_pm_scmi.c
  29. endif
  30. # Process CSS_LOAD_SCP_IMAGES flag
  31. $(eval $(call assert_boolean,CSS_LOAD_SCP_IMAGES))
  32. $(eval $(call add_define,CSS_LOAD_SCP_IMAGES))
  33. ifeq (${CSS_LOAD_SCP_IMAGES},1)
  34. NEED_SCP_BL2 := yes
  35. ifneq (${TRUSTED_BOARD_BOOT},0)
  36. $(eval $(call TOOL_ADD_IMG,scp_bl2u,--scp-fwu-cfg,FWU_))
  37. endif
  38. ifeq (${CSS_USE_SCMI_SDS_DRIVER},1)
  39. BL2U_SOURCES += drivers/arm/css/scp/css_sds.c \
  40. drivers/arm/css/sds/sds.c
  41. BL2_SOURCES += drivers/arm/css/scp/css_sds.c \
  42. drivers/arm/css/sds/sds.c
  43. else
  44. BL2U_SOURCES += drivers/arm/css/mhu/css_mhu.c \
  45. drivers/arm/css/scp/css_bom_bootloader.c \
  46. drivers/arm/css/scpi/css_scpi.c
  47. BL2_SOURCES += drivers/arm/css/mhu/css_mhu.c \
  48. drivers/arm/css/scp/css_bom_bootloader.c \
  49. drivers/arm/css/scpi/css_scpi.c
  50. # Enable option to detect whether the SCP ROM firmware in use predates version
  51. # 1.7.0 and therefore, is incompatible.
  52. CSS_DETECT_PRE_1_7_0_SCP := 1
  53. # Process CSS_DETECT_PRE_1_7_0_SCP flag
  54. $(eval $(call assert_boolean,CSS_DETECT_PRE_1_7_0_SCP))
  55. $(eval $(call add_define,CSS_DETECT_PRE_1_7_0_SCP))
  56. endif
  57. endif
  58. ifeq (${CSS_USE_SCMI_SDS_DRIVER},1)
  59. PLAT_BL_COMMON_SOURCES += drivers/arm/css/sds/${ARCH}/sds_helpers.S
  60. endif
  61. # Process CSS_USE_SCMI_SDS_DRIVER flag
  62. $(eval $(call assert_boolean,CSS_USE_SCMI_SDS_DRIVER))
  63. $(eval $(call add_define,CSS_USE_SCMI_SDS_DRIVER))
  64. # Process CSS_NON_SECURE_UART flag
  65. # This undocumented build option is only to enable debug access to the UART
  66. # from non secure code, which is useful on some platforms.
  67. # Default (obviously) is off.
  68. CSS_NON_SECURE_UART := 0
  69. $(eval $(call assert_boolean,CSS_NON_SECURE_UART))
  70. $(eval $(call add_define,CSS_NON_SECURE_UART))
  71. # Process CSS_SYSTEM_GRACEFUL_RESET flag
  72. # This build option can be used on CSS platforms that require all the CPUs
  73. # to execute the CPU specific power down sequence to complete a warm reboot
  74. # sequence in which only the CPUs are power cycled.
  75. CSS_SYSTEM_GRACEFUL_RESET := 0
  76. $(eval $(call add_define,CSS_SYSTEM_GRACEFUL_RESET))