Usama Arif | f151362 | 2021-04-09 17:07:41 +0100 | [diff] [blame] | 1 | # Copyright (c) 2021, Arm Limited. All rights reserved. |
| 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 | |
Usama Arif | f151362 | 2021-04-09 17:07:41 +0100 | [diff] [blame] | 8 | ifeq ($(filter ${TARGET_PLATFORM}, 0 1),) |
| 9 | $(error TARGET_PLATFORM must be 0 or 1) |
| 10 | endif |
| 11 | |
| 12 | CSS_LOAD_SCP_IMAGES := 1 |
| 13 | |
| 14 | CSS_USE_SCMI_SDS_DRIVER := 1 |
| 15 | |
| 16 | RAS_EXTENSION := 0 |
| 17 | |
| 18 | SDEI_SUPPORT := 0 |
| 19 | |
| 20 | EL3_EXCEPTION_HANDLING := 0 |
| 21 | |
| 22 | HANDLE_EA_EL3_FIRST := 0 |
| 23 | |
| 24 | # System coherency is managed in hardware |
| 25 | HW_ASSISTED_COHERENCY := 1 |
| 26 | |
| 27 | # When building for systems with hardware-assisted coherency, there's no need to |
| 28 | # use USE_COHERENT_MEM. Require that USE_COHERENT_MEM must be set to 0 too. |
| 29 | USE_COHERENT_MEM := 0 |
| 30 | |
| 31 | GIC_ENABLE_V4_EXTN := 1 |
| 32 | |
| 33 | # GIC-600 configuration |
| 34 | GICV3_SUPPORT_GIC600 := 1 |
| 35 | |
Usama Arif | 1925c78 | 2021-08-20 20:53:34 +0100 | [diff] [blame] | 36 | # Enable SVE |
| 37 | ENABLE_SVE_FOR_NS := 1 |
| 38 | ENABLE_SVE_FOR_SWD := 1 |
Usama Arif | f151362 | 2021-04-09 17:07:41 +0100 | [diff] [blame] | 39 | |
Davidson K | 6536105 | 2021-10-13 18:49:41 +0530 | [diff] [blame] | 40 | # enable trace buffer control registers access to NS by default |
| 41 | ENABLE_TRBE_FOR_NS := 1 |
| 42 | |
| 43 | # enable trace system registers access to NS by default |
| 44 | ENABLE_SYS_REG_TRACE_FOR_NS := 1 |
| 45 | |
| 46 | # enable trace filter control registers access to NS by default |
| 47 | ENABLE_TRF_FOR_NS := 1 |
| 48 | |
Usama Arif | f151362 | 2021-04-09 17:07:41 +0100 | [diff] [blame] | 49 | # Include GICv3 driver files |
| 50 | include drivers/arm/gic/v3/gicv3.mk |
| 51 | |
| 52 | ENT_GIC_SOURCES := ${GICV3_SOURCES} \ |
| 53 | plat/common/plat_gicv3.c \ |
| 54 | plat/arm/common/arm_gicv3.c |
| 55 | |
| 56 | override NEED_BL2U := no |
| 57 | |
| 58 | override ARM_PLAT_MT := 1 |
| 59 | |
| 60 | TC_BASE = plat/arm/board/tc |
| 61 | |
| 62 | PLAT_INCLUDES += -I${TC_BASE}/include/ |
| 63 | |
| 64 | # Common CPU libraries |
| 65 | TC_CPU_SOURCES := lib/cpus/aarch64/cortex_a510.S |
| 66 | |
| 67 | # CPU libraries for TARGET_PLATFORM=0 |
| 68 | ifeq (${TARGET_PLATFORM}, 0) |
| 69 | TC_CPU_SOURCES += lib/cpus/aarch64/cortex_a710.S \ |
| 70 | lib/cpus/aarch64/cortex_x2.S |
| 71 | endif |
| 72 | |
| 73 | # CPU libraries for TARGET_PLATFORM=1 |
| 74 | ifeq (${TARGET_PLATFORM}, 1) |
| 75 | TC_CPU_SOURCES += lib/cpus/aarch64/cortex_makalu.S \ |
| 76 | lib/cpus/aarch64/cortex_makalu_elp_arm.S |
| 77 | endif |
| 78 | |
| 79 | INTERCONNECT_SOURCES := ${TC_BASE}/tc_interconnect.c |
| 80 | |
| 81 | PLAT_BL_COMMON_SOURCES += ${TC_BASE}/tc_plat.c \ |
| 82 | ${TC_BASE}/include/tc_helpers.S |
| 83 | |
| 84 | BL1_SOURCES += ${INTERCONNECT_SOURCES} \ |
| 85 | ${TC_CPU_SOURCES} \ |
| 86 | ${TC_BASE}/tc_trusted_boot.c \ |
| 87 | ${TC_BASE}/tc_err.c \ |
| 88 | drivers/arm/sbsa/sbsa.c |
| 89 | |
| 90 | |
| 91 | BL2_SOURCES += ${TC_BASE}/tc_security.c \ |
| 92 | ${TC_BASE}/tc_err.c \ |
| 93 | ${TC_BASE}/tc_trusted_boot.c \ |
Usama Arif | a49bd49 | 2021-08-17 17:57:10 +0100 | [diff] [blame] | 94 | ${TC_BASE}/tc_bl2_setup.c \ |
Usama Arif | f151362 | 2021-04-09 17:07:41 +0100 | [diff] [blame] | 95 | lib/utils/mem_region.c \ |
| 96 | drivers/arm/tzc/tzc400.c \ |
| 97 | plat/arm/common/arm_tzc400.c \ |
| 98 | plat/arm/common/arm_nor_psci_mem_protect.c |
| 99 | |
| 100 | BL31_SOURCES += ${INTERCONNECT_SOURCES} \ |
| 101 | ${TC_CPU_SOURCES} \ |
| 102 | ${ENT_GIC_SOURCES} \ |
| 103 | ${TC_BASE}/tc_bl31_setup.c \ |
| 104 | ${TC_BASE}/tc_topology.c \ |
Usama Arif | a49bd49 | 2021-08-17 17:57:10 +0100 | [diff] [blame] | 105 | lib/fconf/fconf.c \ |
| 106 | lib/fconf/fconf_dyn_cfg_getter.c \ |
Usama Arif | f151362 | 2021-04-09 17:07:41 +0100 | [diff] [blame] | 107 | drivers/cfi/v2m/v2m_flash.c \ |
| 108 | lib/utils/mem_region.c \ |
| 109 | plat/arm/common/arm_nor_psci_mem_protect.c |
| 110 | |
Chris Kay | e927215 | 2021-09-28 15:52:14 +0100 | [diff] [blame] | 111 | BL31_SOURCES += ${FDT_WRAPPERS_SOURCES} |
| 112 | |
Usama Arif | f151362 | 2021-04-09 17:07:41 +0100 | [diff] [blame] | 113 | # Add the FDT_SOURCES and options for Dynamic Config |
| 114 | FDT_SOURCES += ${TC_BASE}/fdts/${PLAT}_fw_config.dts \ |
| 115 | ${TC_BASE}/fdts/${PLAT}_tb_fw_config.dts |
| 116 | FW_CONFIG := ${BUILD_PLAT}/fdts/${PLAT}_fw_config.dtb |
| 117 | TB_FW_CONFIG := ${BUILD_PLAT}/fdts/${PLAT}_tb_fw_config.dtb |
| 118 | |
| 119 | # Add the FW_CONFIG to FIP and specify the same to certtool |
| 120 | $(eval $(call TOOL_ADD_PAYLOAD,${FW_CONFIG},--fw-config,${FW_CONFIG})) |
| 121 | # Add the TB_FW_CONFIG to FIP and specify the same to certtool |
| 122 | $(eval $(call TOOL_ADD_PAYLOAD,${TB_FW_CONFIG},--tb-fw-config,${TB_FW_CONFIG})) |
| 123 | |
| 124 | ifeq (${SPD},spmd) |
| 125 | ifeq ($(ARM_SPMC_MANIFEST_DTS),) |
| 126 | ARM_SPMC_MANIFEST_DTS := ${TC_BASE}/fdts/${PLAT}_spmc_manifest.dts |
| 127 | endif |
| 128 | |
| 129 | FDT_SOURCES += ${ARM_SPMC_MANIFEST_DTS} |
| 130 | TC_TOS_FW_CONFIG := ${BUILD_PLAT}/fdts/$(notdir $(basename ${ARM_SPMC_MANIFEST_DTS})).dtb |
| 131 | |
| 132 | # Add the TOS_FW_CONFIG to FIP and specify the same to certtool |
| 133 | $(eval $(call TOOL_ADD_PAYLOAD,${TC_TOS_FW_CONFIG},--tos-fw-config,${TC_TOS_FW_CONFIG})) |
| 134 | endif |
| 135 | |
| 136 | #Device tree |
| 137 | TC_HW_CONFIG_DTS := fdts/tc.dts |
| 138 | TC_HW_CONFIG := ${BUILD_PLAT}/fdts/${PLAT}.dtb |
| 139 | FDT_SOURCES += ${TC_HW_CONFIG_DTS} |
| 140 | $(eval TC_HW_CONFIG := ${BUILD_PLAT}/$(patsubst %.dts,%.dtb,$(TC_HW_CONFIG_DTS))) |
| 141 | |
| 142 | # Add the HW_CONFIG to FIP and specify the same to certtool |
| 143 | $(eval $(call TOOL_ADD_PAYLOAD,${TC_HW_CONFIG},--hw-config,${TC_HW_CONFIG})) |
| 144 | |
| 145 | override CTX_INCLUDE_AARCH32_REGS := 0 |
| 146 | |
| 147 | override CTX_INCLUDE_PAUTH_REGS := 1 |
| 148 | |
| 149 | override ENABLE_SPE_FOR_LOWER_ELS := 0 |
| 150 | |
| 151 | override ENABLE_AMU := 1 |
Chris Kay | c2d29ba | 2021-05-18 18:49:51 +0100 | [diff] [blame] | 152 | override ENABLE_AMU_AUXILIARY_COUNTERS := 1 |
| 153 | override ENABLE_AMU_FCONF := 1 |
| 154 | |
| 155 | override ENABLE_MPMM := 1 |
| 156 | override ENABLE_MPMM_FCONF := 1 |
Usama Arif | f151362 | 2021-04-09 17:07:41 +0100 | [diff] [blame] | 157 | |
| 158 | include plat/arm/common/arm_common.mk |
| 159 | include plat/arm/css/common/css_common.mk |
| 160 | include plat/arm/soc/common/soc_css.mk |
| 161 | include plat/arm/board/common/board_common.mk |