blob: 528a1d44167662c6e87bad6e3d7abe6a0d17a17c [file] [log] [blame]
Saurabh Gorecha43987c52021-05-24 17:35:34 +05301#
2# Copyright (c) 2017-2018, Arm Limited and Contributors. All rights reserved.
3# Copyright (c) 2018-2021, The Linux Foundation. All rights reserved.
4#
5# SPDX-License-Identifier: BSD-3-Clause
6#
7
8# Make for SC7280 QTI platform.
9
10QTI_PLAT_PATH := plat/qti
11CHIPSET := ${PLAT}
12
13# Turn On Separate code & data.
14SEPARATE_CODE_AND_RODATA := 1
Saurabh Gorechab8493012022-04-05 00:11:52 +053015USE_COHERENT_MEM := 0
Saurabh Gorecha43987c52021-05-24 17:35:34 +053016WARMBOOT_ENABLE_DCACHE_EARLY := 1
Saurabh Gorechab8493012022-04-05 00:11:52 +053017HW_ASSISTED_COHERENCY := 1
18
19#Enable errata configs for cortex_a78 and cortex_a55
20ERRATA_A55_1530923 := 1
21ERRATA_A78_1941498 := 1
22ERRATA_A78_1951500 := 1
23ERRATA_A78_2132060 := 1
Saurabh Gorecha43987c52021-05-24 17:35:34 +053024
25# Disable the PSCI platform compatibility layer
26ENABLE_PLAT_COMPAT := 0
27
28# Enable PSCI v1.0 extended state ID format
29PSCI_EXTENDED_STATE_ID := 1
30ARM_RECOM_STATE_ID_ENC := 1
Maulik Shah8388dea2023-02-14 13:03:24 +053031PSCI_OS_INIT_MODE := 1
Saurabh Gorecha43987c52021-05-24 17:35:34 +053032
33COLD_BOOT_SINGLE_CPU := 1
34PROGRAMMABLE_RESET_ADDRESS := 1
35
36RESET_TO_BL31 := 0
37
38MULTI_CONSOLE_API := 1
39
40QTI_SDI_BUILD := 0
41$(eval $(call assert_boolean,QTI_SDI_BUILD))
42$(eval $(call add_define,QTI_SDI_BUILD))
43
44#disable CTX_INCLUDE_AARCH32_REGS to support sc7280 gold cores
45override CTX_INCLUDE_AARCH32_REGS := 0
46WORKAROUND_CVE_2017_5715 := 0
47DYNAMIC_WORKAROUND_CVE_2018_3639 := 1
48# Enable stack protector.
49ENABLE_STACK_PROTECTOR := strong
50
51
52QTI_EXTERNAL_INCLUDES := -I${QTI_PLAT_PATH}/${CHIPSET}/inc \
53 -I${QTI_PLAT_PATH}/common/inc \
54 -I${QTI_PLAT_PATH}/common/inc/$(ARCH) \
55 -I${QTI_PLAT_PATH}/qtiseclib/inc \
56 -I${QTI_PLAT_PATH}/qtiseclib/inc/${CHIPSET} \
57
58QTI_BL31_SOURCES := $(QTI_PLAT_PATH)/common/src/$(ARCH)/qti_helpers.S \
59 $(QTI_PLAT_PATH)/common/src/$(ARCH)/qti_kryo6_silver.S \
60 $(QTI_PLAT_PATH)/common/src/$(ARCH)/qti_kryo6_gold.S \
61 $(QTI_PLAT_PATH)/common/src/$(ARCH)/qti_uart_console.S \
Shelley Chen68afc062021-10-01 18:34:07 -070062 $(QTI_PLAT_PATH)/common/src/pm_ps_hold.c \
Saurabh Gorecha43987c52021-05-24 17:35:34 +053063 $(QTI_PLAT_PATH)/common/src/qti_stack_protector.c \
64 $(QTI_PLAT_PATH)/common/src/qti_common.c \
65 $(QTI_PLAT_PATH)/common/src/qti_bl31_setup.c \
66 $(QTI_PLAT_PATH)/common/src/qti_gic_v3.c \
67 $(QTI_PLAT_PATH)/common/src/qti_interrupt_svc.c \
68 $(QTI_PLAT_PATH)/common/src/qti_syscall.c \
69 $(QTI_PLAT_PATH)/common/src/qti_topology.c \
70 $(QTI_PLAT_PATH)/common/src/qti_pm.c \
71 $(QTI_PLAT_PATH)/common/src/qti_rng.c \
72 $(QTI_PLAT_PATH)/common/src/spmi_arb.c \
73 $(QTI_PLAT_PATH)/qtiseclib/src/qtiseclib_cb_interface.c \
74
75
76PLAT_INCLUDES := -Iinclude/plat/common/ \
77
78PLAT_INCLUDES += ${QTI_EXTERNAL_INCLUDES}
79
80include lib/xlat_tables_v2/xlat_tables.mk
81PLAT_BL_COMMON_SOURCES += ${XLAT_TABLES_LIB_SRCS} \
82 plat/common/aarch64/crash_console_helpers.S \
83 common/desc_image_load.c \
84 lib/bl_aux_params/bl_aux_params.c \
85
86include lib/coreboot/coreboot.mk
87
88#PSCI Sources.
89PSCI_SOURCES := plat/common/plat_psci_common.c \
90
91# GIC-600 configuration
92GICV3_SUPPORT_GIC600 := 1
93# Include GICv3 driver files
94include drivers/arm/gic/v3/gicv3.mk
95
96#Timer sources
97TIMER_SOURCES := drivers/delay_timer/generic_delay_timer.c \
98 drivers/delay_timer/delay_timer.c \
99
100#GIC sources.
101GIC_SOURCES := plat/common/plat_gicv3.c \
102 ${GICV3_SOURCES} \
103
Saurabh Gorechab8493012022-04-05 00:11:52 +0530104CPU_SOURCES := lib/cpus/aarch64/cortex_a78.S \
105 lib/cpus/aarch64/cortex_a55.S \
106
107BL31_SOURCES += ${QTI_BL31_SOURCES} \
108 ${PSCI_SOURCES} \
109 ${GIC_SOURCES} \
110 ${TIMER_SOURCES} \
111 ${CPU_SOURCES} \
Saurabh Gorecha43987c52021-05-24 17:35:34 +0530112
113LIB_QTI_PATH := ${QTI_PLAT_PATH}/qtiseclib/lib/${CHIPSET}
114
115
116# Override this on the command line to point to the qtiseclib library which
117# will be available in coreboot.org
118QTISECLIB_PATH ?=
119
120ifeq ($(QTISECLIB_PATH),)
121# if No lib then use stub implementation for qtiseclib interface
122$(warning QTISECLIB_PATH is not provided while building, using stub implementation. \
123 Please refer docs/plat/qti.rst for more details \
124 THIS FIRMWARE WILL NOT BOOT!)
125BL31_SOURCES += plat/qti/qtiseclib/src/qtiseclib_interface_stub.c
126else
127# use library provided by QTISECLIB_PATH
128LDFLAGS += -L $(dir $(QTISECLIB_PATH))
129LDLIBS += -l$(patsubst lib%.a,%,$(notdir $(QTISECLIB_PATH)))
130endif
131