platform.mk 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. #
  2. # Copyright (c) 2017-2018, Arm Limited and Contributors. All rights reserved.
  3. # Copyright (c) 2018-2021, The Linux Foundation. All rights reserved.
  4. #
  5. # SPDX-License-Identifier: BSD-3-Clause
  6. #
  7. # Make for SC7280 QTI platform.
  8. QTI_PLAT_PATH := plat/qti
  9. CHIPSET := ${PLAT}
  10. # Turn On Separate code & data.
  11. SEPARATE_CODE_AND_RODATA := 1
  12. USE_COHERENT_MEM := 0
  13. WARMBOOT_ENABLE_DCACHE_EARLY := 1
  14. HW_ASSISTED_COHERENCY := 1
  15. #Enable errata configs for cortex_a78 and cortex_a55
  16. ERRATA_A55_1530923 := 1
  17. ERRATA_A78_1941498 := 1
  18. ERRATA_A78_1951500 := 1
  19. ERRATA_A78_2132060 := 1
  20. # Disable the PSCI platform compatibility layer
  21. ENABLE_PLAT_COMPAT := 0
  22. # Enable PSCI v1.0 extended state ID format
  23. PSCI_EXTENDED_STATE_ID := 1
  24. ARM_RECOM_STATE_ID_ENC := 1
  25. PSCI_OS_INIT_MODE := 1
  26. COLD_BOOT_SINGLE_CPU := 1
  27. PROGRAMMABLE_RESET_ADDRESS := 1
  28. RESET_TO_BL31 := 0
  29. QTI_SDI_BUILD := 0
  30. $(eval $(call assert_boolean,QTI_SDI_BUILD))
  31. $(eval $(call add_define,QTI_SDI_BUILD))
  32. #disable CTX_INCLUDE_AARCH32_REGS to support sc7280 gold cores
  33. override CTX_INCLUDE_AARCH32_REGS := 0
  34. WORKAROUND_CVE_2017_5715 := 0
  35. DYNAMIC_WORKAROUND_CVE_2018_3639 := 1
  36. # Enable stack protector.
  37. ENABLE_STACK_PROTECTOR := strong
  38. QTI_EXTERNAL_INCLUDES := -I${QTI_PLAT_PATH}/${CHIPSET}/inc \
  39. -I${QTI_PLAT_PATH}/common/inc \
  40. -I${QTI_PLAT_PATH}/common/inc/$(ARCH) \
  41. -I${QTI_PLAT_PATH}/qtiseclib/inc \
  42. -I${QTI_PLAT_PATH}/qtiseclib/inc/${CHIPSET} \
  43. QTI_BL31_SOURCES := $(QTI_PLAT_PATH)/common/src/$(ARCH)/qti_helpers.S \
  44. $(QTI_PLAT_PATH)/common/src/$(ARCH)/qti_kryo6_silver.S \
  45. $(QTI_PLAT_PATH)/common/src/$(ARCH)/qti_kryo6_gold.S \
  46. $(QTI_PLAT_PATH)/common/src/$(ARCH)/qti_uart_console.S \
  47. $(QTI_PLAT_PATH)/common/src/pm_ps_hold.c \
  48. $(QTI_PLAT_PATH)/common/src/qti_stack_protector.c \
  49. $(QTI_PLAT_PATH)/common/src/qti_common.c \
  50. $(QTI_PLAT_PATH)/common/src/qti_bl31_setup.c \
  51. $(QTI_PLAT_PATH)/common/src/qti_gic_v3.c \
  52. $(QTI_PLAT_PATH)/common/src/qti_interrupt_svc.c \
  53. $(QTI_PLAT_PATH)/common/src/qti_syscall.c \
  54. $(QTI_PLAT_PATH)/common/src/qti_topology.c \
  55. $(QTI_PLAT_PATH)/common/src/qti_pm.c \
  56. $(QTI_PLAT_PATH)/common/src/qti_rng.c \
  57. $(QTI_PLAT_PATH)/common/src/spmi_arb.c \
  58. $(QTI_PLAT_PATH)/qtiseclib/src/qtiseclib_cb_interface.c \
  59. PLAT_INCLUDES := -Iinclude/plat/common/ \
  60. PLAT_INCLUDES += ${QTI_EXTERNAL_INCLUDES}
  61. include lib/xlat_tables_v2/xlat_tables.mk
  62. PLAT_BL_COMMON_SOURCES += ${XLAT_TABLES_LIB_SRCS} \
  63. plat/common/aarch64/crash_console_helpers.S \
  64. common/desc_image_load.c \
  65. lib/bl_aux_params/bl_aux_params.c \
  66. include lib/coreboot/coreboot.mk
  67. #PSCI Sources.
  68. PSCI_SOURCES := plat/common/plat_psci_common.c \
  69. # GIC-600 configuration
  70. GICV3_SUPPORT_GIC600 := 1
  71. # Include GICv3 driver files
  72. include drivers/arm/gic/v3/gicv3.mk
  73. #Timer sources
  74. TIMER_SOURCES := drivers/delay_timer/generic_delay_timer.c \
  75. drivers/delay_timer/delay_timer.c \
  76. #GIC sources.
  77. GIC_SOURCES := plat/common/plat_gicv3.c \
  78. ${GICV3_SOURCES} \
  79. CPU_SOURCES := lib/cpus/aarch64/cortex_a78.S \
  80. lib/cpus/aarch64/cortex_a55.S \
  81. BL31_SOURCES += ${QTI_BL31_SOURCES} \
  82. ${PSCI_SOURCES} \
  83. ${GIC_SOURCES} \
  84. ${TIMER_SOURCES} \
  85. ${CPU_SOURCES} \
  86. LIB_QTI_PATH := ${QTI_PLAT_PATH}/qtiseclib/lib/${CHIPSET}
  87. # Override this on the command line to point to the qtiseclib library which
  88. # will be available in coreboot.org
  89. QTISECLIB_PATH ?=
  90. ifeq ($(QTISECLIB_PATH),)
  91. # if No lib then use stub implementation for qtiseclib interface
  92. $(warning QTISECLIB_PATH is not provided while building, using stub implementation. \
  93. Please refer docs/plat/qti.rst for more details \
  94. THIS FIRMWARE WILL NOT BOOT!)
  95. BL31_SOURCES += plat/qti/qtiseclib/src/qtiseclib_interface_stub.c
  96. else
  97. # use library provided by QTISECLIB_PATH
  98. LDFLAGS += -L $(dir $(QTISECLIB_PATH))
  99. LDLIBS += -l$(patsubst lib%.a,%,$(notdir $(QTISECLIB_PATH)))
  100. endif