blob: 9432435a1a9bddb148591f2396c8294262cb2701 [file] [log] [blame]
Stephan Gerholddddba192021-12-01 20:01:11 +01001#
Stephan Gerhold4a3e2cb2023-03-14 11:09:44 +01002# Copyright (c) 2021-2023, Stephan Gerhold <stephan@gerhold.net>
Stephan Gerholddddba192021-12-01 20:01:11 +01003#
4# SPDX-License-Identifier: BSD-3-Clause
5#
6
7include drivers/arm/gic/v2/gicv2.mk
8include lib/xlat_tables_v2/xlat_tables.mk
9
Stephan Gerhold840831b2022-08-28 15:18:55 +020010PLAT_BL_COMMON_SOURCES := ${GICV2_SOURCES} \
11 ${XLAT_TABLES_LIB_SRCS} \
12 drivers/delay_timer/delay_timer.c \
13 drivers/delay_timer/generic_delay_timer.c \
14 plat/common/plat_gicv2.c \
15 plat/qti/msm8916/msm8916_gicv2.c \
16 plat/qti/msm8916/msm8916_setup.c \
17 plat/qti/msm8916/${ARCH}/msm8916_helpers.S \
18 plat/qti/msm8916/${ARCH}/uartdm_console.S
Stephan Gerholddddba192021-12-01 20:01:11 +010019
Stephan Gerholdcf0a75f2022-09-02 23:38:23 +020020MSM8916_CPU := $(if ${ARM_CORTEX_A7},cortex_a7,cortex_a53)
Stephan Gerhold1240dc72022-09-16 20:42:49 +020021MSM8916_PM_SOURCES := drivers/arm/cci/cci.c \
22 lib/cpus/${ARCH}/${MSM8916_CPU}.S \
Stephan Gerhold840831b2022-08-28 15:18:55 +020023 plat/common/plat_psci_common.c \
24 plat/qti/msm8916/msm8916_config.c \
25 plat/qti/msm8916/msm8916_cpu_boot.c \
26 plat/qti/msm8916/msm8916_pm.c \
27 plat/qti/msm8916/msm8916_topology.c
Stephan Gerholddddba192021-12-01 20:01:11 +010028
Stephan Gerhold840831b2022-08-28 15:18:55 +020029BL31_SOURCES += ${MSM8916_PM_SOURCES} \
30 plat/qti/msm8916/msm8916_bl31_setup.c
31
Stephan Gerhold45b2bd02022-08-28 15:18:55 +020032PLAT_INCLUDES := -Iplat/qti/msm8916/include
33
34ifeq (${ARCH},aarch64)
35# arm_macros.S exists only on aarch64 currently
36PLAT_INCLUDES += -Iinclude/plat/arm/common/${ARCH}
37endif
Stephan Gerholddddba192021-12-01 20:01:11 +010038
39# Only BL31 is supported at the moment and is entered on a single CPU
40RESET_TO_BL31 := 1
41COLD_BOOT_SINGLE_CPU := 1
42
Stephan Gerholddddba192021-12-01 20:01:11 +010043# Have different sections for code and rodata
44SEPARATE_CODE_AND_RODATA := 1
45
46# Single cluster
47WARMBOOT_ENABLE_DCACHE_EARLY := 1
48
49# Disable features unsupported in ARMv8.0
Andre Przywara90118bb2023-02-03 15:30:14 +000050ENABLE_SPE_FOR_NS := 0
Stephan Gerholddddba192021-12-01 20:01:11 +010051ENABLE_SVE_FOR_NS := 0
52
Stephan Gerholdcf0a75f2022-09-02 23:38:23 +020053# Disable workarounds unnecessary for Cortex-A7/A53
Stephan Gerhold4a3e2cb2023-03-14 11:09:44 +010054WORKAROUND_CVE_2017_5715 := 0
55WORKAROUND_CVE_2022_23960 := 0
56
Stephan Gerholdcf0a75f2022-09-02 23:38:23 +020057ifeq (${MSM8916_CPU},cortex_a53)
Stephan Gerholddddba192021-12-01 20:01:11 +010058# MSM8916 uses ARM Cortex-A53 r0p0 so likely all the errata apply
59ERRATA_A53_819472 := 1
60ERRATA_A53_824069 := 1
61ERRATA_A53_826319 := 1
62ERRATA_A53_827319 := 1
63ERRATA_A53_835769 := 1
64ERRATA_A53_836870 := 1
65ERRATA_A53_843419 := 1
66ERRATA_A53_855873 := 0 # Workaround works only for >= r0p3
67ERRATA_A53_1530924 := 1
Stephan Gerholdcf0a75f2022-09-02 23:38:23 +020068endif
Stephan Gerholddddba192021-12-01 20:01:11 +010069
Stephan Gerhold4181ec82023-03-24 19:18:51 +010070# Build config flags
71# ------------------
72BL31_BASE ?= 0x86500000
Stephan Gerhold4181ec82023-03-24 19:18:51 +010073PRELOADED_BL33_BASE ?= 0x8f600000
74
Stephan Gerhold45b2bd02022-08-28 15:18:55 +020075ifeq (${ARCH},aarch64)
76BL32_BASE ?= BL31_LIMIT
Stephan Gerholddddba192021-12-01 20:01:11 +010077$(eval $(call add_define,BL31_BASE))
Stephan Gerhold45b2bd02022-08-28 15:18:55 +020078else
79# There is no BL31 on aarch32, so reuse its location for BL32
80BL32_BASE ?= $(BL31_BASE)
81endif
Stephan Gerholddddba192021-12-01 20:01:11 +010082$(eval $(call add_define,BL32_BASE))
Stephan Gerholdaad23f12022-09-02 23:29:17 +020083
84# UART number to use for TF-A output during early boot
85QTI_UART_NUM ?= 2
86$(eval $(call assert_numeric,QTI_UART_NUM))
87$(eval $(call add_define,QTI_UART_NUM))
88
89# Set to 1 on the command line to keep using UART after early boot.
90# Requires reserving the UART and related clocks inside the normal world.
91QTI_RUNTIME_UART ?= 0
92$(eval $(call assert_boolean,QTI_RUNTIME_UART))
93$(eval $(call add_define,QTI_RUNTIME_UART))