blob: df07bc4a7a27b8149554fab32d68e3d223a7544f [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
31
32COLD_BOOT_SINGLE_CPU := 1
33PROGRAMMABLE_RESET_ADDRESS := 1
34
35RESET_TO_BL31 := 0
36
37MULTI_CONSOLE_API := 1
38
39QTI_SDI_BUILD := 0
40$(eval $(call assert_boolean,QTI_SDI_BUILD))
41$(eval $(call add_define,QTI_SDI_BUILD))
42
43#disable CTX_INCLUDE_AARCH32_REGS to support sc7280 gold cores
44override CTX_INCLUDE_AARCH32_REGS := 0
45WORKAROUND_CVE_2017_5715 := 0
46DYNAMIC_WORKAROUND_CVE_2018_3639 := 1
47# Enable stack protector.
48ENABLE_STACK_PROTECTOR := strong
49
50
51QTI_EXTERNAL_INCLUDES := -I${QTI_PLAT_PATH}/${CHIPSET}/inc \
52 -I${QTI_PLAT_PATH}/common/inc \
53 -I${QTI_PLAT_PATH}/common/inc/$(ARCH) \
54 -I${QTI_PLAT_PATH}/qtiseclib/inc \
55 -I${QTI_PLAT_PATH}/qtiseclib/inc/${CHIPSET} \
56
57QTI_BL31_SOURCES := $(QTI_PLAT_PATH)/common/src/$(ARCH)/qti_helpers.S \
58 $(QTI_PLAT_PATH)/common/src/$(ARCH)/qti_kryo6_silver.S \
59 $(QTI_PLAT_PATH)/common/src/$(ARCH)/qti_kryo6_gold.S \
60 $(QTI_PLAT_PATH)/common/src/$(ARCH)/qti_uart_console.S \
Shelley Chen68afc062021-10-01 18:34:07 -070061 $(QTI_PLAT_PATH)/common/src/pm_ps_hold.c \
Saurabh Gorecha43987c52021-05-24 17:35:34 +053062 $(QTI_PLAT_PATH)/common/src/qti_stack_protector.c \
63 $(QTI_PLAT_PATH)/common/src/qti_common.c \
64 $(QTI_PLAT_PATH)/common/src/qti_bl31_setup.c \
65 $(QTI_PLAT_PATH)/common/src/qti_gic_v3.c \
66 $(QTI_PLAT_PATH)/common/src/qti_interrupt_svc.c \
67 $(QTI_PLAT_PATH)/common/src/qti_syscall.c \
68 $(QTI_PLAT_PATH)/common/src/qti_topology.c \
69 $(QTI_PLAT_PATH)/common/src/qti_pm.c \
70 $(QTI_PLAT_PATH)/common/src/qti_rng.c \
71 $(QTI_PLAT_PATH)/common/src/spmi_arb.c \
72 $(QTI_PLAT_PATH)/qtiseclib/src/qtiseclib_cb_interface.c \
73
74
75PLAT_INCLUDES := -Iinclude/plat/common/ \
76
77PLAT_INCLUDES += ${QTI_EXTERNAL_INCLUDES}
78
79include lib/xlat_tables_v2/xlat_tables.mk
80PLAT_BL_COMMON_SOURCES += ${XLAT_TABLES_LIB_SRCS} \
81 plat/common/aarch64/crash_console_helpers.S \
82 common/desc_image_load.c \
83 lib/bl_aux_params/bl_aux_params.c \
84
85include lib/coreboot/coreboot.mk
86
87#PSCI Sources.
88PSCI_SOURCES := plat/common/plat_psci_common.c \
89
90# GIC-600 configuration
91GICV3_SUPPORT_GIC600 := 1
92# Include GICv3 driver files
93include drivers/arm/gic/v3/gicv3.mk
94
95#Timer sources
96TIMER_SOURCES := drivers/delay_timer/generic_delay_timer.c \
97 drivers/delay_timer/delay_timer.c \
98
99#GIC sources.
100GIC_SOURCES := plat/common/plat_gicv3.c \
101 ${GICV3_SOURCES} \
102
Saurabh Gorechab8493012022-04-05 00:11:52 +0530103CPU_SOURCES := lib/cpus/aarch64/cortex_a78.S \
104 lib/cpus/aarch64/cortex_a55.S \
105
106BL31_SOURCES += ${QTI_BL31_SOURCES} \
107 ${PSCI_SOURCES} \
108 ${GIC_SOURCES} \
109 ${TIMER_SOURCES} \
110 ${CPU_SOURCES} \
Saurabh Gorecha43987c52021-05-24 17:35:34 +0530111
112LIB_QTI_PATH := ${QTI_PLAT_PATH}/qtiseclib/lib/${CHIPSET}
113
114
115# Override this on the command line to point to the qtiseclib library which
116# will be available in coreboot.org
117QTISECLIB_PATH ?=
118
119ifeq ($(QTISECLIB_PATH),)
120# if No lib then use stub implementation for qtiseclib interface
121$(warning QTISECLIB_PATH is not provided while building, using stub implementation. \
122 Please refer docs/plat/qti.rst for more details \
123 THIS FIRMWARE WILL NOT BOOT!)
124BL31_SOURCES += plat/qti/qtiseclib/src/qtiseclib_interface_stub.c
125else
126# use library provided by QTISECLIB_PATH
127LDFLAGS += -L $(dir $(QTISECLIB_PATH))
128LDLIBS += -l$(patsubst lib%.a,%,$(notdir $(QTISECLIB_PATH)))
129endif
130