platform.mk 3.8 KB

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