blob: 4f962cd6b9df6bf08e31ee4c6294c67b01098fe6 [file] [log] [blame]
Olivier Deprez7e5597c2022-07-20 17:37:23 +02001# Copyright (c) 2021-2022, Arm Limited. All rights reserved.
Usama Ariff1513622021-04-09 17:07:41 +01002#
3# SPDX-License-Identifier: BSD-3-Clause
4#
5
Chris Kaye9272152021-09-28 15:52:14 +01006include common/fdt_wrappers.mk
7
Rupinderjit Singh820b3b62022-04-04 17:28:41 +01008ifeq ($(shell expr $(TARGET_PLATFORM) \<= 2), 0)
9 $(error TARGET_PLATFORM must be less than or equal to 2)
Usama Ariff1513622021-04-09 17:07:41 +010010endif
11
Olivier Deprez7e5597c2022-07-20 17:37:23 +020012$(eval $(call add_define,TARGET_PLATFORM))
13
Usama Ariff1513622021-04-09 17:07:41 +010014CSS_LOAD_SCP_IMAGES := 1
15
16CSS_USE_SCMI_SDS_DRIVER := 1
17
18RAS_EXTENSION := 0
19
20SDEI_SUPPORT := 0
21
22EL3_EXCEPTION_HANDLING := 0
23
24HANDLE_EA_EL3_FIRST := 0
25
26# System coherency is managed in hardware
27HW_ASSISTED_COHERENCY := 1
28
29# When building for systems with hardware-assisted coherency, there's no need to
30# use USE_COHERENT_MEM. Require that USE_COHERENT_MEM must be set to 0 too.
31USE_COHERENT_MEM := 0
32
33GIC_ENABLE_V4_EXTN := 1
34
35# GIC-600 configuration
36GICV3_SUPPORT_GIC600 := 1
37
Usama Arif1925c782021-08-20 20:53:34 +010038# Enable SVE
39ENABLE_SVE_FOR_NS := 1
40ENABLE_SVE_FOR_SWD := 1
Usama Ariff1513622021-04-09 17:07:41 +010041
Davidson K65361052021-10-13 18:49:41 +053042# enable trace buffer control registers access to NS by default
43ENABLE_TRBE_FOR_NS := 1
44
45# enable trace system registers access to NS by default
46ENABLE_SYS_REG_TRACE_FOR_NS := 1
47
48# enable trace filter control registers access to NS by default
49ENABLE_TRF_FOR_NS := 1
50
Usama Ariff1513622021-04-09 17:07:41 +010051# Include GICv3 driver files
52include drivers/arm/gic/v3/gicv3.mk
53
54ENT_GIC_SOURCES := ${GICV3_SOURCES} \
55 plat/common/plat_gicv3.c \
56 plat/arm/common/arm_gicv3.c
57
58override NEED_BL2U := no
59
60override ARM_PLAT_MT := 1
61
62TC_BASE = plat/arm/board/tc
63
64PLAT_INCLUDES += -I${TC_BASE}/include/
65
Usama Ariff1513622021-04-09 17:07:41 +010066# CPU libraries for TARGET_PLATFORM=0
67ifeq (${TARGET_PLATFORM}, 0)
Rupinderjit Singh820b3b62022-04-04 17:28:41 +010068TC_CPU_SOURCES += lib/cpus/aarch64/cortex_a510.S \
69 lib/cpus/aarch64/cortex_a710.S \
Usama Ariff1513622021-04-09 17:07:41 +010070 lib/cpus/aarch64/cortex_x2.S
71endif
72
73# CPU libraries for TARGET_PLATFORM=1
74ifeq (${TARGET_PLATFORM}, 1)
Rupinderjit Singh820b3b62022-04-04 17:28:41 +010075TC_CPU_SOURCES += lib/cpus/aarch64/cortex_a510.S \
Rupinderjit Singh7e465552022-08-23 11:55:27 +010076 lib/cpus/aarch64/cortex_a715.S \
77 lib/cpus/aarch64/cortex_x3.S
Usama Ariff1513622021-04-09 17:07:41 +010078endif
79
Rupinderjit Singh820b3b62022-04-04 17:28:41 +010080# CPU libraries for TARGET_PLATFORM=2
81ifeq (${TARGET_PLATFORM}, 2)
82TC_CPU_SOURCES += lib/cpus/aarch64/cortex_hayes.S \
83 lib/cpus/aarch64/cortex_hunter.S
84endif
85
Usama Ariff1513622021-04-09 17:07:41 +010086INTERCONNECT_SOURCES := ${TC_BASE}/tc_interconnect.c
87
88PLAT_BL_COMMON_SOURCES += ${TC_BASE}/tc_plat.c \
89 ${TC_BASE}/include/tc_helpers.S
90
91BL1_SOURCES += ${INTERCONNECT_SOURCES} \
92 ${TC_CPU_SOURCES} \
93 ${TC_BASE}/tc_trusted_boot.c \
94 ${TC_BASE}/tc_err.c \
95 drivers/arm/sbsa/sbsa.c
96
Usama Ariff1513622021-04-09 17:07:41 +010097BL2_SOURCES += ${TC_BASE}/tc_security.c \
98 ${TC_BASE}/tc_err.c \
99 ${TC_BASE}/tc_trusted_boot.c \
Usama Arifa49bd492021-08-17 17:57:10 +0100100 ${TC_BASE}/tc_bl2_setup.c \
Usama Ariff1513622021-04-09 17:07:41 +0100101 lib/utils/mem_region.c \
102 drivers/arm/tzc/tzc400.c \
103 plat/arm/common/arm_tzc400.c \
104 plat/arm/common/arm_nor_psci_mem_protect.c
105
106BL31_SOURCES += ${INTERCONNECT_SOURCES} \
107 ${TC_CPU_SOURCES} \
108 ${ENT_GIC_SOURCES} \
109 ${TC_BASE}/tc_bl31_setup.c \
110 ${TC_BASE}/tc_topology.c \
Usama Arifa49bd492021-08-17 17:57:10 +0100111 lib/fconf/fconf.c \
112 lib/fconf/fconf_dyn_cfg_getter.c \
Usama Ariff1513622021-04-09 17:07:41 +0100113 drivers/cfi/v2m/v2m_flash.c \
114 lib/utils/mem_region.c \
115 plat/arm/common/arm_nor_psci_mem_protect.c
116
Chris Kaye9272152021-09-28 15:52:14 +0100117BL31_SOURCES += ${FDT_WRAPPERS_SOURCES}
118
Usama Ariff1513622021-04-09 17:07:41 +0100119# Add the FDT_SOURCES and options for Dynamic Config
120FDT_SOURCES += ${TC_BASE}/fdts/${PLAT}_fw_config.dts \
121 ${TC_BASE}/fdts/${PLAT}_tb_fw_config.dts
122FW_CONFIG := ${BUILD_PLAT}/fdts/${PLAT}_fw_config.dtb
123TB_FW_CONFIG := ${BUILD_PLAT}/fdts/${PLAT}_tb_fw_config.dtb
124
125# Add the FW_CONFIG to FIP and specify the same to certtool
126$(eval $(call TOOL_ADD_PAYLOAD,${FW_CONFIG},--fw-config,${FW_CONFIG}))
127# Add the TB_FW_CONFIG to FIP and specify the same to certtool
128$(eval $(call TOOL_ADD_PAYLOAD,${TB_FW_CONFIG},--tb-fw-config,${TB_FW_CONFIG}))
129
130ifeq (${SPD},spmd)
131ifeq ($(ARM_SPMC_MANIFEST_DTS),)
132ARM_SPMC_MANIFEST_DTS := ${TC_BASE}/fdts/${PLAT}_spmc_manifest.dts
133endif
134
135FDT_SOURCES += ${ARM_SPMC_MANIFEST_DTS}
136TC_TOS_FW_CONFIG := ${BUILD_PLAT}/fdts/$(notdir $(basename ${ARM_SPMC_MANIFEST_DTS})).dtb
137
138# Add the TOS_FW_CONFIG to FIP and specify the same to certtool
139$(eval $(call TOOL_ADD_PAYLOAD,${TC_TOS_FW_CONFIG},--tos-fw-config,${TC_TOS_FW_CONFIG}))
140endif
141
142#Device tree
143TC_HW_CONFIG_DTS := fdts/tc.dts
144TC_HW_CONFIG := ${BUILD_PLAT}/fdts/${PLAT}.dtb
145FDT_SOURCES += ${TC_HW_CONFIG_DTS}
146$(eval TC_HW_CONFIG := ${BUILD_PLAT}/$(patsubst %.dts,%.dtb,$(TC_HW_CONFIG_DTS)))
147
148# Add the HW_CONFIG to FIP and specify the same to certtool
149$(eval $(call TOOL_ADD_PAYLOAD,${TC_HW_CONFIG},--hw-config,${TC_HW_CONFIG}))
150
151override CTX_INCLUDE_AARCH32_REGS := 0
152
153override CTX_INCLUDE_PAUTH_REGS := 1
154
155override ENABLE_SPE_FOR_LOWER_ELS := 0
156
157override ENABLE_AMU := 1
Chris Kayc2d29ba2021-05-18 18:49:51 +0100158override ENABLE_AMU_AUXILIARY_COUNTERS := 1
159override ENABLE_AMU_FCONF := 1
160
161override ENABLE_MPMM := 1
162override ENABLE_MPMM_FCONF := 1
Usama Ariff1513622021-04-09 17:07:41 +0100163
Tamas Banede4f052022-09-16 16:26:15 +0200164# Include Measured Boot makefile before any Crypto library makefile.
165# Crypto library makefile may need default definitions of Measured Boot build
166# flags present in Measured Boot makefile.
167ifeq (${MEASURED_BOOT},1)
168 MEASURED_BOOT_MK := drivers/measured_boot/rss/rss_measured_boot.mk
169 $(info Including ${MEASURED_BOOT_MK})
170 include ${MEASURED_BOOT_MK}
171 $(info Including rss_comms.mk)
172 include drivers/arm/rss/rss_comms.mk
173
174 BL1_SOURCES += ${MEASURED_BOOT_SOURCES} \
175 plat/arm/board/tc/tc_common_measured_boot.c \
176 plat/arm/board/tc/tc_bl1_measured_boot.c \
177 lib/psa/measured_boot.c \
178 ${RSS_COMMS_SOURCES}
179
180 BL2_SOURCES += ${MEASURED_BOOT_SOURCES} \
181 plat/arm/board/tc/tc_common_measured_boot.c \
182 plat/arm/board/tc/tc_bl2_measured_boot.c \
183 lib/psa/measured_boot.c \
184 ${RSS_COMMS_SOURCES}
185
186PLAT_INCLUDES += -Iinclude/lib/psa
187
188endif
189
Usama Ariff1513622021-04-09 17:07:41 +0100190include plat/arm/common/arm_common.mk
191include plat/arm/css/common/css_common.mk
192include plat/arm/soc/common/soc_css.mk
193include plat/arm/board/common/board_common.mk