platform.mk 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. #
  2. # Copyright (c) 2021-2023, Stephan Gerhold <stephan@gerhold.net>
  3. #
  4. # SPDX-License-Identifier: BSD-3-Clause
  5. #
  6. include drivers/arm/gic/v2/gicv2.mk
  7. include lib/xlat_tables_v2/xlat_tables.mk
  8. PLAT_BL_COMMON_SOURCES := ${GICV2_SOURCES} \
  9. ${XLAT_TABLES_LIB_SRCS} \
  10. drivers/delay_timer/delay_timer.c \
  11. drivers/delay_timer/generic_delay_timer.c \
  12. plat/common/plat_gicv2.c \
  13. plat/qti/msm8916/msm8916_gicv2.c \
  14. plat/qti/msm8916/msm8916_setup.c \
  15. plat/qti/msm8916/${ARCH}/msm8916_helpers.S \
  16. plat/qti/msm8916/${ARCH}/uartdm_console.S
  17. MSM8916_CPU := $(if ${ARM_CORTEX_A7},cortex_a7,cortex_a53)
  18. MSM8916_PM_SOURCES := drivers/arm/cci/cci.c \
  19. lib/cpus/${ARCH}/${MSM8916_CPU}.S \
  20. plat/common/plat_psci_common.c \
  21. plat/qti/msm8916/msm8916_config.c \
  22. plat/qti/msm8916/msm8916_cpu_boot.c \
  23. plat/qti/msm8916/msm8916_pm.c \
  24. plat/qti/msm8916/msm8916_topology.c
  25. BL31_SOURCES += ${MSM8916_PM_SOURCES} \
  26. plat/qti/msm8916/msm8916_bl31_setup.c
  27. PLAT_INCLUDES := -Iplat/qti/msm8916/include
  28. ifeq (${ARCH},aarch64)
  29. # arm_macros.S exists only on aarch64 currently
  30. PLAT_INCLUDES += -Iinclude/plat/arm/common/${ARCH}
  31. endif
  32. # Only BL31 is supported at the moment and is entered on a single CPU
  33. RESET_TO_BL31 := 1
  34. COLD_BOOT_SINGLE_CPU := 1
  35. # Have different sections for code and rodata
  36. SEPARATE_CODE_AND_RODATA := 1
  37. # Single cluster
  38. WARMBOOT_ENABLE_DCACHE_EARLY := 1
  39. # Disable features unsupported in ARMv8.0
  40. ENABLE_SPE_FOR_NS := 0
  41. ENABLE_SVE_FOR_NS := 0
  42. # Disable workarounds unnecessary for Cortex-A7/A53
  43. WORKAROUND_CVE_2017_5715 := 0
  44. WORKAROUND_CVE_2022_23960 := 0
  45. ifeq (${MSM8916_CPU},cortex_a53)
  46. # The Cortex-A53 revision varies depending on the SoC revision.
  47. # msm8916 uses r0p0, msm8939 uses r0p1 or r0p4. Enable all errata
  48. # and rely on the runtime detection to apply them only if needed.
  49. ERRATA_A53_819472 := 1
  50. ERRATA_A53_824069 := 1
  51. ERRATA_A53_826319 := 1
  52. ERRATA_A53_827319 := 1
  53. ERRATA_A53_835769 := 1
  54. ERRATA_A53_836870 := 1
  55. ERRATA_A53_843419 := 1
  56. ERRATA_A53_855873 := 1
  57. ERRATA_A53_1530924 := 1
  58. endif
  59. # Build config flags
  60. # ------------------
  61. BL31_BASE ?= 0x86500000
  62. PRELOADED_BL33_BASE ?= 0x8f600000
  63. ifeq (${ARCH},aarch64)
  64. BL32_BASE ?= BL31_LIMIT
  65. $(eval $(call add_define,BL31_BASE))
  66. else
  67. ifeq (${AARCH32_SP},none)
  68. $(error Variable AARCH32_SP has to be set for AArch32)
  69. endif
  70. # There is no BL31 on aarch32, so reuse its location for BL32
  71. BL32_BASE ?= $(BL31_BASE)
  72. endif
  73. $(eval $(call add_define,BL32_BASE))
  74. # UART number to use for TF-A output during early boot
  75. QTI_UART_NUM ?= 2
  76. $(eval $(call assert_numeric,QTI_UART_NUM))
  77. $(eval $(call add_define,QTI_UART_NUM))
  78. # Set to 1 on the command line to keep using UART after early boot.
  79. # Requires reserving the UART and related clocks inside the normal world.
  80. QTI_RUNTIME_UART ?= 0
  81. $(eval $(call assert_boolean,QTI_RUNTIME_UART))
  82. $(eval $(call add_define,QTI_RUNTIME_UART))