platform.mk 3.8 KB

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