Olivier Deprez | 7e5597c | 2022-07-20 17:37:23 +0200 | [diff] [blame] | 1 | # Copyright (c) 2021-2022, Arm Limited. All rights reserved. |
Usama Arif | f151362 | 2021-04-09 17:07:41 +0100 | [diff] [blame] | 2 | # |
| 3 | # SPDX-License-Identifier: BSD-3-Clause |
| 4 | # |
| 5 | |
Chris Kay | e927215 | 2021-09-28 15:52:14 +0100 | [diff] [blame] | 6 | include common/fdt_wrappers.mk |
| 7 | |
Rupinderjit Singh | 820b3b6 | 2022-04-04 17:28:41 +0100 | [diff] [blame] | 8 | ifeq ($(shell expr $(TARGET_PLATFORM) \<= 2), 0) |
| 9 | $(error TARGET_PLATFORM must be less than or equal to 2) |
Usama Arif | f151362 | 2021-04-09 17:07:41 +0100 | [diff] [blame] | 10 | endif |
| 11 | |
Olivier Deprez | 7e5597c | 2022-07-20 17:37:23 +0200 | [diff] [blame] | 12 | $(eval $(call add_define,TARGET_PLATFORM)) |
| 13 | |
Usama Arif | f151362 | 2021-04-09 17:07:41 +0100 | [diff] [blame] | 14 | CSS_LOAD_SCP_IMAGES := 1 |
| 15 | |
| 16 | CSS_USE_SCMI_SDS_DRIVER := 1 |
| 17 | |
| 18 | RAS_EXTENSION := 0 |
| 19 | |
| 20 | SDEI_SUPPORT := 0 |
| 21 | |
| 22 | EL3_EXCEPTION_HANDLING := 0 |
| 23 | |
| 24 | HANDLE_EA_EL3_FIRST := 0 |
| 25 | |
| 26 | # System coherency is managed in hardware |
| 27 | HW_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. |
| 31 | USE_COHERENT_MEM := 0 |
| 32 | |
| 33 | GIC_ENABLE_V4_EXTN := 1 |
| 34 | |
| 35 | # GIC-600 configuration |
| 36 | GICV3_SUPPORT_GIC600 := 1 |
| 37 | |
Usama Arif | 1925c78 | 2021-08-20 20:53:34 +0100 | [diff] [blame] | 38 | # Enable SVE |
| 39 | ENABLE_SVE_FOR_NS := 1 |
| 40 | ENABLE_SVE_FOR_SWD := 1 |
Usama Arif | f151362 | 2021-04-09 17:07:41 +0100 | [diff] [blame] | 41 | |
Davidson K | 6536105 | 2021-10-13 18:49:41 +0530 | [diff] [blame] | 42 | # enable trace buffer control registers access to NS by default |
| 43 | ENABLE_TRBE_FOR_NS := 1 |
| 44 | |
| 45 | # enable trace system registers access to NS by default |
| 46 | ENABLE_SYS_REG_TRACE_FOR_NS := 1 |
| 47 | |
| 48 | # enable trace filter control registers access to NS by default |
| 49 | ENABLE_TRF_FOR_NS := 1 |
| 50 | |
Usama Arif | f151362 | 2021-04-09 17:07:41 +0100 | [diff] [blame] | 51 | # Include GICv3 driver files |
| 52 | include drivers/arm/gic/v3/gicv3.mk |
| 53 | |
| 54 | ENT_GIC_SOURCES := ${GICV3_SOURCES} \ |
| 55 | plat/common/plat_gicv3.c \ |
| 56 | plat/arm/common/arm_gicv3.c |
| 57 | |
| 58 | override NEED_BL2U := no |
| 59 | |
| 60 | override ARM_PLAT_MT := 1 |
| 61 | |
| 62 | TC_BASE = plat/arm/board/tc |
| 63 | |
| 64 | PLAT_INCLUDES += -I${TC_BASE}/include/ |
| 65 | |
Usama Arif | f151362 | 2021-04-09 17:07:41 +0100 | [diff] [blame] | 66 | # CPU libraries for TARGET_PLATFORM=0 |
| 67 | ifeq (${TARGET_PLATFORM}, 0) |
Rupinderjit Singh | 820b3b6 | 2022-04-04 17:28:41 +0100 | [diff] [blame] | 68 | TC_CPU_SOURCES += lib/cpus/aarch64/cortex_a510.S \ |
| 69 | lib/cpus/aarch64/cortex_a710.S \ |
Usama Arif | f151362 | 2021-04-09 17:07:41 +0100 | [diff] [blame] | 70 | lib/cpus/aarch64/cortex_x2.S |
| 71 | endif |
| 72 | |
| 73 | # CPU libraries for TARGET_PLATFORM=1 |
| 74 | ifeq (${TARGET_PLATFORM}, 1) |
Rupinderjit Singh | 820b3b6 | 2022-04-04 17:28:41 +0100 | [diff] [blame] | 75 | TC_CPU_SOURCES += lib/cpus/aarch64/cortex_a510.S \ |
Rupinderjit Singh | 7e46555 | 2022-08-23 11:55:27 +0100 | [diff] [blame] | 76 | lib/cpus/aarch64/cortex_a715.S \ |
| 77 | lib/cpus/aarch64/cortex_x3.S |
Usama Arif | f151362 | 2021-04-09 17:07:41 +0100 | [diff] [blame] | 78 | endif |
| 79 | |
Rupinderjit Singh | 820b3b6 | 2022-04-04 17:28:41 +0100 | [diff] [blame] | 80 | # CPU libraries for TARGET_PLATFORM=2 |
| 81 | ifeq (${TARGET_PLATFORM}, 2) |
| 82 | TC_CPU_SOURCES += lib/cpus/aarch64/cortex_hayes.S \ |
| 83 | lib/cpus/aarch64/cortex_hunter.S |
| 84 | endif |
| 85 | |
Usama Arif | f151362 | 2021-04-09 17:07:41 +0100 | [diff] [blame] | 86 | INTERCONNECT_SOURCES := ${TC_BASE}/tc_interconnect.c |
| 87 | |
| 88 | PLAT_BL_COMMON_SOURCES += ${TC_BASE}/tc_plat.c \ |
| 89 | ${TC_BASE}/include/tc_helpers.S |
| 90 | |
| 91 | BL1_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 Arif | f151362 | 2021-04-09 17:07:41 +0100 | [diff] [blame] | 97 | BL2_SOURCES += ${TC_BASE}/tc_security.c \ |
| 98 | ${TC_BASE}/tc_err.c \ |
| 99 | ${TC_BASE}/tc_trusted_boot.c \ |
Usama Arif | a49bd49 | 2021-08-17 17:57:10 +0100 | [diff] [blame] | 100 | ${TC_BASE}/tc_bl2_setup.c \ |
Usama Arif | f151362 | 2021-04-09 17:07:41 +0100 | [diff] [blame] | 101 | 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 | |
| 106 | BL31_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 Arif | a49bd49 | 2021-08-17 17:57:10 +0100 | [diff] [blame] | 111 | lib/fconf/fconf.c \ |
| 112 | lib/fconf/fconf_dyn_cfg_getter.c \ |
Usama Arif | f151362 | 2021-04-09 17:07:41 +0100 | [diff] [blame] | 113 | drivers/cfi/v2m/v2m_flash.c \ |
| 114 | lib/utils/mem_region.c \ |
| 115 | plat/arm/common/arm_nor_psci_mem_protect.c |
| 116 | |
Chris Kay | e927215 | 2021-09-28 15:52:14 +0100 | [diff] [blame] | 117 | BL31_SOURCES += ${FDT_WRAPPERS_SOURCES} |
| 118 | |
Usama Arif | f151362 | 2021-04-09 17:07:41 +0100 | [diff] [blame] | 119 | # Add the FDT_SOURCES and options for Dynamic Config |
| 120 | FDT_SOURCES += ${TC_BASE}/fdts/${PLAT}_fw_config.dts \ |
| 121 | ${TC_BASE}/fdts/${PLAT}_tb_fw_config.dts |
| 122 | FW_CONFIG := ${BUILD_PLAT}/fdts/${PLAT}_fw_config.dtb |
| 123 | TB_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 | |
| 130 | ifeq (${SPD},spmd) |
| 131 | ifeq ($(ARM_SPMC_MANIFEST_DTS),) |
| 132 | ARM_SPMC_MANIFEST_DTS := ${TC_BASE}/fdts/${PLAT}_spmc_manifest.dts |
| 133 | endif |
| 134 | |
| 135 | FDT_SOURCES += ${ARM_SPMC_MANIFEST_DTS} |
| 136 | TC_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})) |
| 140 | endif |
| 141 | |
| 142 | #Device tree |
| 143 | TC_HW_CONFIG_DTS := fdts/tc.dts |
| 144 | TC_HW_CONFIG := ${BUILD_PLAT}/fdts/${PLAT}.dtb |
| 145 | FDT_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 | |
| 151 | override CTX_INCLUDE_AARCH32_REGS := 0 |
| 152 | |
| 153 | override CTX_INCLUDE_PAUTH_REGS := 1 |
| 154 | |
| 155 | override ENABLE_SPE_FOR_LOWER_ELS := 0 |
| 156 | |
| 157 | override ENABLE_AMU := 1 |
Chris Kay | c2d29ba | 2021-05-18 18:49:51 +0100 | [diff] [blame] | 158 | override ENABLE_AMU_AUXILIARY_COUNTERS := 1 |
| 159 | override ENABLE_AMU_FCONF := 1 |
| 160 | |
| 161 | override ENABLE_MPMM := 1 |
| 162 | override ENABLE_MPMM_FCONF := 1 |
Usama Arif | f151362 | 2021-04-09 17:07:41 +0100 | [diff] [blame] | 163 | |
Tamas Ban | ede4f05 | 2022-09-16 16:26:15 +0200 | [diff] [blame^] | 164 | # 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. |
| 167 | ifeq (${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 | |
| 186 | PLAT_INCLUDES += -Iinclude/lib/psa |
| 187 | |
| 188 | endif |
| 189 | |
Usama Arif | f151362 | 2021-04-09 17:07:41 +0100 | [diff] [blame] | 190 | include plat/arm/common/arm_common.mk |
| 191 | include plat/arm/css/common/css_common.mk |
| 192 | include plat/arm/soc/common/soc_css.mk |
| 193 | include plat/arm/board/common/board_common.mk |