blob: 2110494fe303696d03eb57f8edd4ba60d820620f [file] [log] [blame]
Stephan Gerhold14fdf072021-12-01 20:01:11 +01001#
Stephan Gerhold69fabaa2023-03-14 11:09:44 +01002# Copyright (c) 2021-2023, Stephan Gerhold <stephan@gerhold.net>
Stephan Gerhold14fdf072021-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 Gerhold4bc53a12022-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 Gerhold14fdf072021-12-01 20:01:11 +010019
Stephan Gerholda7c85b22022-09-02 23:38:23 +020020MSM8916_CPU := $(if ${ARM_CORTEX_A7},cortex_a7,cortex_a53)
21MSM8916_PM_SOURCES := lib/cpus/${ARCH}/${MSM8916_CPU}.S \
Stephan Gerhold4bc53a12022-08-28 15:18:55 +020022 plat/common/plat_psci_common.c \
23 plat/qti/msm8916/msm8916_config.c \
24 plat/qti/msm8916/msm8916_cpu_boot.c \
25 plat/qti/msm8916/msm8916_pm.c \
26 plat/qti/msm8916/msm8916_topology.c
27
28BL31_SOURCES += ${MSM8916_PM_SOURCES} \
29 plat/qti/msm8916/msm8916_bl31_setup.c
Stephan Gerhold14fdf072021-12-01 20:01:11 +010030
Stephan Gerholdb68e4e92022-08-28 15:18:55 +020031PLAT_INCLUDES := -Iplat/qti/msm8916/include
32
33ifeq (${ARCH},aarch64)
34# arm_macros.S exists only on aarch64 currently
35PLAT_INCLUDES += -Iinclude/plat/arm/common/${ARCH}
36endif
Stephan Gerhold14fdf072021-12-01 20:01:11 +010037
38# Only BL31 is supported at the moment and is entered on a single CPU
39RESET_TO_BL31 := 1
40COLD_BOOT_SINGLE_CPU := 1
41
Stephan Gerhold14fdf072021-12-01 20:01:11 +010042# Have different sections for code and rodata
43SEPARATE_CODE_AND_RODATA := 1
44
45# Single cluster
46WARMBOOT_ENABLE_DCACHE_EARLY := 1
47
48# Disable features unsupported in ARMv8.0
Andre Przywara30661a92023-02-03 15:30:14 +000049ENABLE_SPE_FOR_NS := 0
Stephan Gerhold14fdf072021-12-01 20:01:11 +010050ENABLE_SVE_FOR_NS := 0
51
Stephan Gerholda7c85b22022-09-02 23:38:23 +020052# Disable workarounds unnecessary for Cortex-A7/A53
Stephan Gerhold69fabaa2023-03-14 11:09:44 +010053WORKAROUND_CVE_2017_5715 := 0
54WORKAROUND_CVE_2022_23960 := 0
55
Stephan Gerholda7c85b22022-09-02 23:38:23 +020056ifeq (${MSM8916_CPU},cortex_a53)
Stephan Gerhold14fdf072021-12-01 20:01:11 +010057# MSM8916 uses ARM Cortex-A53 r0p0 so likely all the errata apply
58ERRATA_A53_819472 := 1
59ERRATA_A53_824069 := 1
60ERRATA_A53_826319 := 1
61ERRATA_A53_827319 := 1
62ERRATA_A53_835769 := 1
63ERRATA_A53_836870 := 1
64ERRATA_A53_843419 := 1
65ERRATA_A53_855873 := 0 # Workaround works only for >= r0p3
66ERRATA_A53_1530924 := 1
Stephan Gerholda7c85b22022-09-02 23:38:23 +020067endif
Stephan Gerhold14fdf072021-12-01 20:01:11 +010068
Stephan Gerholdd0fed052023-03-24 19:18:51 +010069# Build config flags
70# ------------------
71BL31_BASE ?= 0x86500000
Stephan Gerholdd0fed052023-03-24 19:18:51 +010072PRELOADED_BL33_BASE ?= 0x8f600000
73
Stephan Gerholdb68e4e92022-08-28 15:18:55 +020074ifeq (${ARCH},aarch64)
75BL32_BASE ?= BL31_LIMIT
Stephan Gerhold14fdf072021-12-01 20:01:11 +010076$(eval $(call add_define,BL31_BASE))
Stephan Gerholdb68e4e92022-08-28 15:18:55 +020077else
78# There is no BL31 on aarch32, so reuse its location for BL32
79BL32_BASE ?= $(BL31_BASE)
80endif
Stephan Gerhold14fdf072021-12-01 20:01:11 +010081$(eval $(call add_define,BL32_BASE))
Stephan Gerhold71939dd2022-09-02 23:29:17 +020082
83# UART number to use for TF-A output during early boot
84QTI_UART_NUM ?= 2
85$(eval $(call assert_numeric,QTI_UART_NUM))
86$(eval $(call add_define,QTI_UART_NUM))
87
88# Set to 1 on the command line to keep using UART after early boot.
89# Requires reserving the UART and related clocks inside the normal world.
90QTI_RUNTIME_UART ?= 0
91$(eval $(call assert_boolean,QTI_RUNTIME_UART))
92$(eval $(call add_define,QTI_RUNTIME_UART))