laurenw-arm | 7c7b198 | 2020-10-21 13:34:40 -0500 | [diff] [blame] | 1 | # |
| 2 | # Copyright (c) 2021, ARM Limited and Contributors. All rights reserved. |
| 3 | # |
| 4 | # SPDX-License-Identifier: BSD-3-Clause |
| 5 | # |
| 6 | |
| 7 | # Only aarch64 ARCH supported for FVP_R |
| 8 | ARCH := aarch64 |
| 9 | |
| 10 | # Override to exclude BL2, BL2U, BL31, and BL33 for FVP_R |
| 11 | override NEED_BL2 := no |
| 12 | override NEED_BL2U := no |
| 13 | override NEED_BL31 := no |
Manish Pandey | e2a6b35 | 2021-10-04 13:38:56 +0100 | [diff] [blame] | 14 | NEED_BL32 := no |
laurenw-arm | 56f1e3e | 2021-03-03 14:19:38 -0600 | [diff] [blame] | 15 | |
| 16 | override CTX_INCLUDE_AARCH32_REGS := 0 |
laurenw-arm | 7c7b198 | 2020-10-21 13:34:40 -0500 | [diff] [blame] | 17 | |
| 18 | # Default cluster count for FVP_R |
| 19 | FVP_R_CLUSTER_COUNT := 2 |
| 20 | |
| 21 | # Default number of CPUs per cluster on FVP_R |
| 22 | FVP_R_MAX_CPUS_PER_CLUSTER := 4 |
| 23 | |
| 24 | # Default number of threads per CPU on FVP_R |
| 25 | FVP_R_MAX_PE_PER_CPU := 1 |
| 26 | |
Gary Morrison | 3d7f654 | 2021-01-27 13:08:47 -0600 | [diff] [blame] | 27 | # Use MPU-based memory management: |
| 28 | XLAT_MPU_LIB_V1 := 1 |
| 29 | |
laurenw-arm | 7c7b198 | 2020-10-21 13:34:40 -0500 | [diff] [blame] | 30 | # Pass FVP_R_CLUSTER_COUNT to the build system. |
| 31 | $(eval $(call add_define,FVP_R_CLUSTER_COUNT)) |
| 32 | |
| 33 | # Pass FVP_R_MAX_CPUS_PER_CLUSTER to the build system. |
| 34 | $(eval $(call add_define,FVP_R_MAX_CPUS_PER_CLUSTER)) |
| 35 | |
| 36 | # Pass FVP_R_MAX_PE_PER_CPU to the build system. |
| 37 | $(eval $(call add_define,FVP_R_MAX_PE_PER_CPU)) |
| 38 | |
| 39 | # Sanity check the cluster count and if FVP_R_CLUSTER_COUNT <= 2, |
| 40 | # choose the CCI driver , else the CCN driver |
| 41 | ifeq ($(FVP_R_CLUSTER_COUNT), 0) |
| 42 | $(error "Incorrect cluster count specified for FVP_R port") |
| 43 | else ifeq ($(FVP_R_CLUSTER_COUNT),$(filter $(FVP_R_CLUSTER_COUNT),1 2)) |
| 44 | FVP_R_INTERCONNECT_DRIVER := FVP_R_CCI |
| 45 | else |
| 46 | FVP_R_INTERCONNECT_DRIVER := FVP_R_CCN |
| 47 | endif |
| 48 | |
| 49 | $(eval $(call add_define,FVP_R_INTERCONNECT_DRIVER)) |
| 50 | |
| 51 | ifeq (${FVP_R_INTERCONNECT_DRIVER}, FVP_R_CCI) |
| 52 | FVP_R_INTERCONNECT_SOURCES := drivers/arm/cci/cci.c |
| 53 | else ifeq (${FVP_R_INTERCONNECT_DRIVER}, FVP_R_CCN) |
| 54 | FVP_R_INTERCONNECT_SOURCES := drivers/arm/ccn/ccn.c \ |
| 55 | plat/arm/common/arm_ccn.c |
| 56 | else |
| 57 | $(error "Incorrect CCN driver chosen on FVP_R port") |
| 58 | endif |
| 59 | |
Manish Pandey | e2a6b35 | 2021-10-04 13:38:56 +0100 | [diff] [blame] | 60 | include plat/arm/board/common/board_common.mk |
| 61 | include plat/arm/common/arm_common.mk |
laurenw-arm | 7c7b198 | 2020-10-21 13:34:40 -0500 | [diff] [blame] | 62 | |
Manish Pandey | e2a6b35 | 2021-10-04 13:38:56 +0100 | [diff] [blame] | 63 | PLAT_INCLUDES := -Iplat/arm/board/fvp_r/include |
laurenw-arm | 7c7b198 | 2020-10-21 13:34:40 -0500 | [diff] [blame] | 64 | |
Manish Pandey | e2a6b35 | 2021-10-04 13:38:56 +0100 | [diff] [blame] | 65 | FVP_R_BL_COMMON_SOURCES := plat/arm/board/fvp_r/fvp_r_common.c \ |
Gary Morrison | 3d7f654 | 2021-01-27 13:08:47 -0600 | [diff] [blame] | 66 | plat/arm/board/fvp_r/fvp_r_context_mgmt.c \ |
Manish Pandey | e2a6b35 | 2021-10-04 13:38:56 +0100 | [diff] [blame] | 67 | plat/arm/board/fvp_r/fvp_r_context.S \ |
| 68 | plat/arm/board/fvp_r/fvp_r_debug.S \ |
laurenw-arm | 7c7b198 | 2020-10-21 13:34:40 -0500 | [diff] [blame] | 69 | plat/arm/board/fvp_r/fvp_r_err.c \ |
Manish Pandey | e2a6b35 | 2021-10-04 13:38:56 +0100 | [diff] [blame] | 70 | plat/arm/board/fvp_r/fvp_r_helpers.S \ |
| 71 | plat/arm/board/fvp_r/fvp_r_misc_helpers.S \ |
| 72 | plat/arm/board/fvp_r/fvp_r_pauth_helpers.S |
| 73 | |
| 74 | FVP_R_BL1_SOURCES := plat/arm/board/fvp_r/fvp_r_bl1_arch_setup.c \ |
| 75 | plat/arm/board/fvp_r/fvp_r_bl1_setup.c \ |
laurenw-arm | 7c7b198 | 2020-10-21 13:34:40 -0500 | [diff] [blame] | 76 | plat/arm/board/fvp_r/fvp_r_io_storage.c \ |
Gary Morrison | 3d7f654 | 2021-01-27 13:08:47 -0600 | [diff] [blame] | 77 | plat/arm/board/fvp_r/fvp_r_bl1_context_mgmt.c \ |
| 78 | plat/arm/board/fvp_r/fvp_r_bl1_entrypoint.S \ |
| 79 | plat/arm/board/fvp_r/fvp_r_bl1_exceptions.S \ |
Manish Pandey | e2a6b35 | 2021-10-04 13:38:56 +0100 | [diff] [blame] | 80 | plat/arm/board/fvp_r/fvp_r_bl1_main.c |
| 81 | |
| 82 | FVP_R_CPU_LIBS := lib/cpus/${ARCH}/aem_generic.S |
| 83 | |
| 84 | FVP_R_DYNC_CFG_SOURCES := common/fdt_wrappers.c \ |
| 85 | common/uuid.c \ |
| 86 | plat/arm/common/arm_dyn_cfg.c \ |
| 87 | plat/arm/common/arm_dyn_cfg_helpers.c |
| 88 | |
| 89 | ifeq (${TRUSTED_BOARD_BOOT},1) |
| 90 | FVP_R_AUTH_SOURCES := drivers/auth/auth_mod.c \ |
| 91 | drivers/auth/crypto_mod.c \ |
| 92 | drivers/auth/img_parser_mod.c \ |
| 93 | lib/fconf/fconf_tbbr_getter.c \ |
| 94 | bl1/tbbr/tbbr_img_desc.c \ |
| 95 | plat/arm/common/arm_bl1_fwu.c \ |
| 96 | plat/common/tbbr/plat_tbbr.c \ |
| 97 | drivers/auth/tbbr/tbbr_cot_bl1_r64.c \ |
| 98 | drivers/auth/tbbr/tbbr_cot_common.c \ |
| 99 | plat/arm/board/common/board_arm_trusted_boot.c \ |
| 100 | plat/arm/board/common/rotpk/arm_dev_rotpk.S \ |
| 101 | plat/arm/board/fvp_r/fvp_r_trusted_boot.c |
| 102 | |
| 103 | FVP_R_BL1_SOURCES += ${MBEDTLS_SOURCES} \ |
| 104 | ${FVP_R_AUTH_SOURCES} |
| 105 | endif |
laurenw-arm | 7c7b198 | 2020-10-21 13:34:40 -0500 | [diff] [blame] | 106 | |
| 107 | ifeq (${USE_SP804_TIMER},1) |
Manish Pandey | e2a6b35 | 2021-10-04 13:38:56 +0100 | [diff] [blame] | 108 | FVP_R_BL_COMMON_SOURCES += drivers/arm/sp804/sp804_delay_timer.c |
laurenw-arm | 7c7b198 | 2020-10-21 13:34:40 -0500 | [diff] [blame] | 109 | else |
Manish Pandey | e2a6b35 | 2021-10-04 13:38:56 +0100 | [diff] [blame] | 110 | FVP_R_BL_COMMON_SOURCES += drivers/delay_timer/generic_delay_timer.c |
laurenw-arm | 7c7b198 | 2020-10-21 13:34:40 -0500 | [diff] [blame] | 111 | endif |
| 112 | |
| 113 | # Enable Activity Monitor Unit extensions by default |
| 114 | ENABLE_AMU := 1 |
| 115 | |
| 116 | ifneq (${ENABLE_STACK_PROTECTOR},0) |
Manish Pandey | e2a6b35 | 2021-10-04 13:38:56 +0100 | [diff] [blame] | 117 | FVP_R_BL_COMMON_SOURCES += plat/arm/board/fvp_r/fvp_r_stack_protector.c |
laurenw-arm | 7c7b198 | 2020-10-21 13:34:40 -0500 | [diff] [blame] | 118 | endif |
| 119 | |
Manish Pandey | e2a6b35 | 2021-10-04 13:38:56 +0100 | [diff] [blame] | 120 | override BL1_SOURCES := drivers/arm/sp805/sp805.c \ |
| 121 | drivers/cfi/v2m/v2m_flash.c \ |
| 122 | drivers/delay_timer/delay_timer.c \ |
| 123 | drivers/io/io_fip.c \ |
| 124 | drivers/io/io_memmap.c \ |
| 125 | drivers/io/io_storage.c \ |
| 126 | drivers/io/io_semihosting.c \ |
| 127 | lib/cpus/aarch64/cpu_helpers.S \ |
| 128 | lib/cpus/errata_report.c \ |
| 129 | lib/cpus/aarch64/dsu_helpers.S \ |
| 130 | lib/el3_runtime/aarch64/context.S \ |
| 131 | lib/el3_runtime/aarch64/context_mgmt.c \ |
| 132 | lib/fconf/fconf.c \ |
| 133 | lib/fconf/fconf_dyn_cfg_getter.c \ |
| 134 | lib/semihosting/semihosting.c \ |
| 135 | lib/semihosting/${ARCH}/semihosting_call.S \ |
| 136 | plat/arm/common/arm_bl1_setup.c \ |
| 137 | plat/arm/common/arm_err.c \ |
| 138 | plat/arm/common/arm_io_storage.c \ |
| 139 | plat/arm/common/fconf/arm_fconf_io.c \ |
| 140 | plat/common/plat_bl1_common.c \ |
| 141 | plat/common/aarch64/platform_up_stack.S \ |
| 142 | ${FVP_R_BL1_SOURCES} \ |
| 143 | ${FVP_R_BL_COMMON_SOURCES} \ |
| 144 | ${FVP_R_CPU_LIBS} \ |
| 145 | ${FVP_R_DYNC_CFG_SOURCES} \ |
| 146 | ${FVP_R_INTERCONNECT_SOURCES} |