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