platform.mk 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. #
  2. # Copyright (c) 2019-2023, Arm Limited. All rights reserved.
  3. #
  4. # SPDX-License-Identifier: BSD-3-Clause
  5. #
  6. # Firmware Configuration Framework sources
  7. include common/fdt_wrappers.mk
  8. include lib/fconf/fconf.mk
  9. BL1_SOURCES += ${FCONF_SOURCES} ${FCONF_DYN_SOURCES}
  10. BL2_SOURCES += ${FCONF_SOURCES} ${FCONF_DYN_SOURCES}
  11. # Add `libfdt` and Arm common helpers required for Dynamic Config
  12. include lib/libfdt/libfdt.mk
  13. DYN_CFG_SOURCES += plat/arm/common/arm_dyn_cfg.c \
  14. plat/arm/common/arm_dyn_cfg_helpers.c
  15. DYN_CFG_SOURCES += ${FDT_WRAPPERS_SOURCES}
  16. # Include GICv2 driver files
  17. include drivers/arm/gic/v2/gicv2.mk
  18. A5DS_GIC_SOURCES := ${GICV2_SOURCES} \
  19. plat/common/plat_gicv2.c \
  20. plat/arm/common/arm_gicv2.c
  21. A5DS_SECURITY_SOURCES := plat/arm/board/a5ds/a5ds_security.c
  22. PLAT_INCLUDES := -Iplat/arm/board/a5ds/include
  23. PLAT_BL_COMMON_SOURCES := drivers/arm/pl011/${ARCH}/pl011_console.S \
  24. plat/arm/board/a5ds/a5ds_common.c \
  25. plat/arm/common/${ARCH}/arm_helpers.S \
  26. plat/arm/common/arm_common.c \
  27. plat/arm/common/arm_console.c \
  28. plat/arm/board/common/${ARCH}/board_arm_helpers.S
  29. A5DS_CPU_LIBS := lib/cpus/aarch32/cortex_a5.S
  30. BL1_SOURCES += drivers/io/io_fip.c \
  31. drivers/io/io_memmap.c \
  32. drivers/io/io_storage.c \
  33. drivers/cfi/v2m/v2m_flash.c \
  34. plat/arm/common/arm_bl1_setup.c \
  35. plat/arm/common/arm_err.c \
  36. plat/arm/board/a5ds/a5ds_err.c \
  37. plat/arm/common/arm_io_storage.c \
  38. plat/arm/common/fconf/arm_fconf_io.c \
  39. plat/arm/board/a5ds/${ARCH}/a5ds_helpers.S \
  40. plat/arm/board/a5ds/a5ds_bl1_setup.c \
  41. lib/aarch32/arm32_aeabi_divmod.c \
  42. lib/aarch32/arm32_aeabi_divmod_a32.S \
  43. ${A5DS_CPU_LIBS} \
  44. ${DYN_CFG_SOURCES}
  45. BL2_SOURCES += lib/aarch32/arm32_aeabi_divmod.c \
  46. lib/aarch32/arm32_aeabi_divmod_a32.S \
  47. drivers/delay_timer/delay_timer.c \
  48. drivers/delay_timer/generic_delay_timer.c \
  49. drivers/cfi/v2m/v2m_flash.c \
  50. drivers/io/io_fip.c \
  51. drivers/io/io_memmap.c \
  52. drivers/io/io_storage.c \
  53. plat/arm/board/a5ds/a5ds_bl2_setup.c \
  54. plat/arm/common/arm_bl2_setup.c \
  55. plat/arm/common/arm_err.c \
  56. plat/arm/board/a5ds/a5ds_err.c \
  57. plat/arm/common/arm_io_storage.c \
  58. plat/arm/common/fconf/arm_fconf_io.c \
  59. plat/arm/common/${ARCH}/arm_bl2_mem_params_desc.c \
  60. plat/arm/common/arm_image_load.c \
  61. common/desc_image_load.c \
  62. ${DYN_CFG_SOURCES} \
  63. ${A5DS_SECURITY_SOURCES}
  64. # Add the FDT_SOURCES and options for Dynamic Config (only for Unix env)
  65. ifdef UNIX_MK
  66. FW_CONFIG := ${BUILD_PLAT}/fdts/a5ds_fw_config.dtb
  67. TB_FW_CONFIG := ${BUILD_PLAT}/fdts/a5ds_tb_fw_config.dtb
  68. # Add the TB_FW_CONFIG to FIP and specify the same to certtool
  69. $(eval $(call TOOL_ADD_PAYLOAD,${TB_FW_CONFIG},--tb-fw-config,${TB_FW_CONFIG}))
  70. # Add the FW_CONFIG to FIP and specify the same to certtool
  71. $(eval $(call TOOL_ADD_PAYLOAD,${FW_CONFIG},--fw-config,${FW_CONFIG}))
  72. $(eval FVP_HW_CONFIG := ${BUILD_PLAT}/$(patsubst %.dts,%.dtb, \
  73. fdts/$(notdir ${FVP_HW_CONFIG_DTS})))
  74. # Add the HW_CONFIG to FIP and specify the same to certtool
  75. $(eval $(call TOOL_ADD_PAYLOAD,${FVP_HW_CONFIG},--hw-config,${FVP_HW_CONFIG}))
  76. FDT_SOURCES += plat/arm/board/a5ds/fdts/a5ds_fw_config.dts \
  77. plat/arm/board/a5ds/fdts/a5ds_tb_fw_config.dts \
  78. ${FVP_HW_CONFIG_DTS}
  79. endif
  80. NEED_BL32 := yes
  81. ifeq (${AARCH32_SP},none)
  82. $(error Variable AARCH32_SP has to be set for AArch32)
  83. endif
  84. ARM_DISABLE_TRUSTED_WDOG := 1
  85. PLAT_BL_COMMON_SOURCES += lib/xlat_tables/aarch32/nonlpae_tables.c
  86. # Use translation tables library v1 when using Cortex-A5
  87. ARM_XLAT_TABLES_LIB_V1 := 1
  88. $(eval $(call assert_boolean,ARM_XLAT_TABLES_LIB_V1))
  89. $(eval $(call add_define,ARM_XLAT_TABLES_LIB_V1))
  90. $(eval $(call assert_boolean,ARM_DISABLE_TRUSTED_WDOG))
  91. $(eval $(call add_define,ARM_DISABLE_TRUSTED_WDOG))