platform.mk 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. #
  2. # Copyright (c) 2017-2018, ARM Limited and Contributors. All rights reserved.
  3. #
  4. # SPDX-License-Identifier: BSD-3-Clause
  5. #
  6. # On Poplar, the TSP can execute from TZC secure area in DRAM.
  7. POPLAR_TSP_RAM_LOCATION ?= dram
  8. ifeq (${POPLAR_TSP_RAM_LOCATION}, dram)
  9. POPLAR_TSP_RAM_LOCATION_ID = POPLAR_DRAM_ID
  10. else ifeq (${POPLAR_TSP_RAM_LOCATION}, sram)
  11. POPLAR_TSP_RAM_LOCATION_ID = POPLAR_SRAM_ID
  12. else
  13. $(error "Currently unsupported POPLAR_TSP_RAM_LOCATION value")
  14. endif
  15. $(eval $(call add_define,POPLAR_TSP_RAM_LOCATION_ID))
  16. POPLAR_DRAM_SIZE ?= two_gig
  17. ifeq (${POPLAR_DRAM_SIZE}, two_gig)
  18. POPLAR_DRAM_SIZE_ID = POPLAR_DRAM_SIZE_2G
  19. else ifeq (${POPLAR_DRAM_SIZE}, one_gig)
  20. POPLAR_DRAM_SIZE_ID = POPLAR_DRAM_SIZE_1G
  21. else
  22. $(error "Currently unsupported POPLAR_DRAM_SIZE value")
  23. endif
  24. $(eval $(call add_define,POPLAR_DRAM_SIZE_ID))
  25. POPLAR_RECOVERY := 0
  26. $(eval $(call add_define,POPLAR_RECOVERY))
  27. # Add the build options to pack Trusted OS Extra1 and Trusted OS Extra2 images
  28. # in the FIP if the platform requires.
  29. ifneq ($(BL32_EXTRA1),)
  30. $(eval $(call TOOL_ADD_IMG,BL32_EXTRA1,--tos-fw-extra1))
  31. endif
  32. ifneq ($(BL32_EXTRA2),)
  33. $(eval $(call TOOL_ADD_IMG,BL32_EXTRA2,--tos-fw-extra2))
  34. endif
  35. NEED_BL33 := yes
  36. COLD_BOOT_SINGLE_CPU := 1
  37. PROGRAMMABLE_RESET_ADDRESS := 1
  38. CTX_INCLUDE_FPREGS := 1
  39. ERRATA_A53_855873 := 1
  40. ERRATA_A53_835769 := 1
  41. ERRATA_A53_843419 := 1
  42. ENABLE_SVE_FOR_NS := 0
  43. WORKAROUND_CVE_2017_5715 := 0
  44. PLAT_PL061_MAX_GPIOS := 104
  45. $(eval $(call add_define,PLAT_PL061_MAX_GPIOS))
  46. PLAT_INCLUDES := -Iplat/hisilicon/poplar/include \
  47. -Iplat/hisilicon/poplar
  48. PLAT_BL_COMMON_SOURCES := \
  49. lib/xlat_tables/aarch64/xlat_tables.c \
  50. lib/xlat_tables/xlat_tables_common.c \
  51. drivers/delay_timer/generic_delay_timer.c \
  52. drivers/arm/gic/common/gic_common.c \
  53. drivers/arm/gic/v2/gicv2_helpers.c \
  54. drivers/delay_timer/delay_timer.c \
  55. drivers/arm/pl011/aarch64/pl011_console.S \
  56. drivers/arm/gic/v2/gicv2_main.c \
  57. plat/common/plat_gicv2.c \
  58. plat/hisilicon/poplar/aarch64/platform_common.c \
  59. plat/hisilicon/poplar/aarch64/poplar_helpers.S \
  60. plat/hisilicon/poplar/poplar_gicv2.c
  61. BL1_SOURCES += \
  62. lib/cpus/aarch64/cortex_a53.S \
  63. drivers/arm/pl061/pl061_gpio.c \
  64. drivers/mmc/mmc.c \
  65. drivers/synopsys/emmc/dw_mmc.c \
  66. drivers/io/io_storage.c \
  67. drivers/io/io_block.c \
  68. drivers/gpio/gpio.c \
  69. drivers/io/io_fip.c \
  70. drivers/io/io_memmap.c \
  71. plat/hisilicon/poplar/bl1_plat_setup.c \
  72. plat/hisilicon/poplar/plat_storage.c
  73. BL2_SOURCES += \
  74. drivers/arm/pl061/pl061_gpio.c \
  75. drivers/mmc/mmc.c \
  76. drivers/synopsys/emmc/dw_mmc.c \
  77. drivers/io/io_storage.c \
  78. drivers/io/io_block.c \
  79. drivers/io/io_fip.c \
  80. drivers/gpio/gpio.c \
  81. drivers/io/io_memmap.c \
  82. plat/hisilicon/poplar/bl2_plat_setup.c \
  83. plat/hisilicon/poplar/plat_storage.c
  84. BL2_SOURCES += \
  85. plat/hisilicon/poplar/bl2_plat_mem_params_desc.c \
  86. plat/hisilicon/poplar/poplar_image_load.c \
  87. common/desc_image_load.c
  88. ifeq (${SPD},opteed)
  89. BL2_SOURCES += \
  90. lib/optee/optee_utils.c
  91. endif
  92. BL31_SOURCES += \
  93. lib/cpus/aarch64/aem_generic.S \
  94. lib/cpus/aarch64/cortex_a53.S \
  95. plat/common/plat_psci_common.c \
  96. plat/hisilicon/poplar/bl31_plat_setup.c \
  97. plat/hisilicon/poplar/plat_topology.c \
  98. plat/hisilicon/poplar/plat_pm.c