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 |
laurenw-arm | 56f1e3e | 2021-03-03 14:19:38 -0600 | [diff] [blame] | 14 | |
| 15 | override CTX_INCLUDE_AARCH32_REGS := 0 |
laurenw-arm | 7c7b198 | 2020-10-21 13:34:40 -0500 | [diff] [blame] | 16 | |
| 17 | # Default cluster count for FVP_R |
| 18 | FVP_R_CLUSTER_COUNT := 2 |
| 19 | |
| 20 | # Default number of CPUs per cluster on FVP_R |
| 21 | FVP_R_MAX_CPUS_PER_CLUSTER := 4 |
| 22 | |
| 23 | # Default number of threads per CPU on FVP_R |
| 24 | FVP_R_MAX_PE_PER_CPU := 1 |
| 25 | |
Gary Morrison | 3d7f654 | 2021-01-27 13:08:47 -0600 | [diff] [blame] | 26 | # Use MPU-based memory management: |
| 27 | XLAT_MPU_LIB_V1 := 1 |
| 28 | |
laurenw-arm | 7c7b198 | 2020-10-21 13:34:40 -0500 | [diff] [blame] | 29 | # Pass FVP_R_CLUSTER_COUNT to the build system. |
| 30 | $(eval $(call add_define,FVP_R_CLUSTER_COUNT)) |
| 31 | |
| 32 | # Pass FVP_R_MAX_CPUS_PER_CLUSTER to the build system. |
| 33 | $(eval $(call add_define,FVP_R_MAX_CPUS_PER_CLUSTER)) |
| 34 | |
| 35 | # Pass FVP_R_MAX_PE_PER_CPU to the build system. |
| 36 | $(eval $(call add_define,FVP_R_MAX_PE_PER_CPU)) |
| 37 | |
| 38 | # Sanity check the cluster count and if FVP_R_CLUSTER_COUNT <= 2, |
| 39 | # choose the CCI driver , else the CCN driver |
| 40 | ifeq ($(FVP_R_CLUSTER_COUNT), 0) |
| 41 | $(error "Incorrect cluster count specified for FVP_R port") |
| 42 | else ifeq ($(FVP_R_CLUSTER_COUNT),$(filter $(FVP_R_CLUSTER_COUNT),1 2)) |
| 43 | FVP_R_INTERCONNECT_DRIVER := FVP_R_CCI |
| 44 | else |
| 45 | FVP_R_INTERCONNECT_DRIVER := FVP_R_CCN |
| 46 | endif |
| 47 | |
| 48 | $(eval $(call add_define,FVP_R_INTERCONNECT_DRIVER)) |
| 49 | |
| 50 | ifeq (${FVP_R_INTERCONNECT_DRIVER}, FVP_R_CCI) |
| 51 | FVP_R_INTERCONNECT_SOURCES := drivers/arm/cci/cci.c |
| 52 | else ifeq (${FVP_R_INTERCONNECT_DRIVER}, FVP_R_CCN) |
| 53 | FVP_R_INTERCONNECT_SOURCES := drivers/arm/ccn/ccn.c \ |
| 54 | plat/arm/common/arm_ccn.c |
| 55 | else |
| 56 | $(error "Incorrect CCN driver chosen on FVP_R port") |
| 57 | endif |
| 58 | |
| 59 | PLAT_INCLUDES := -Iplat/arm/board/fvp_r/include |
| 60 | |
| 61 | PLAT_BL_COMMON_SOURCES := plat/arm/board/fvp_r/fvp_r_common.c |
| 62 | |
| 63 | FVP_R_CPU_LIBS := lib/cpus/${ARCH}/aem_generic.S |
| 64 | |
| 65 | # select a different set of CPU files, depending on whether we compile for |
| 66 | # hardware assisted coherency cores or not |
| 67 | ifeq (${HW_ASSISTED_COHERENCY}, 0) |
| 68 | # Cores used without DSU |
| 69 | # FVP_R_CPU_LIBS += lib/cpus/aarch64/fvp_r.S |
| 70 | else |
| 71 | # Cores used with DSU only |
| 72 | # FVP_R_CPU_LIBS += lib/cpus/aarch64/fvp_r.S |
| 73 | endif |
| 74 | |
| 75 | BL1_SOURCES += drivers/arm/sp805/sp805.c \ |
| 76 | drivers/delay_timer/delay_timer.c \ |
| 77 | drivers/io/io_semihosting.c \ |
| 78 | lib/semihosting/semihosting.c \ |
| 79 | lib/semihosting/${ARCH}/semihosting_call.S \ |
Gary Morrison | 3d7f654 | 2021-01-27 13:08:47 -0600 | [diff] [blame] | 80 | plat/arm/board/fvp_r/fvp_r_bl1_arch_setup.c \ |
laurenw-arm | 7c7b198 | 2020-10-21 13:34:40 -0500 | [diff] [blame] | 81 | plat/arm/board/fvp_r/fvp_r_bl1_setup.c \ |
Gary Morrison | 3d7f654 | 2021-01-27 13:08:47 -0600 | [diff] [blame] | 82 | plat/arm/board/fvp_r/fvp_r_context_mgmt.c \ |
laurenw-arm | 7c7b198 | 2020-10-21 13:34:40 -0500 | [diff] [blame] | 83 | plat/arm/board/fvp_r/fvp_r_err.c \ |
| 84 | plat/arm/board/fvp_r/fvp_r_io_storage.c \ |
Gary Morrison | 3d7f654 | 2021-01-27 13:08:47 -0600 | [diff] [blame] | 85 | plat/arm/board/fvp_r/fvp_r_bl1_context_mgmt.c \ |
| 86 | plat/arm/board/fvp_r/fvp_r_bl1_entrypoint.S \ |
| 87 | plat/arm/board/fvp_r/fvp_r_bl1_exceptions.S \ |
laurenw-arm | 56f1e3e | 2021-03-03 14:19:38 -0600 | [diff] [blame] | 88 | plat/arm/board/fvp_r/fvp_r_bl1_main.c \ |
Gary Morrison | 3d7f654 | 2021-01-27 13:08:47 -0600 | [diff] [blame] | 89 | plat/arm/board/fvp_r/fvp_r_context.S \ |
| 90 | plat/arm/board/fvp_r/fvp_r_debug.S \ |
| 91 | plat/arm/board/fvp_r/fvp_r_helpers.S \ |
| 92 | plat/arm/board/fvp_r/fvp_r_misc_helpers.S \ |
| 93 | plat/arm/board/fvp_r/fvp_r_pauth_helpers.S \ |
laurenw-arm | 7c7b198 | 2020-10-21 13:34:40 -0500 | [diff] [blame] | 94 | ${FVP_R_CPU_LIBS} \ |
| 95 | ${FVP_R_INTERCONNECT_SOURCES} |
| 96 | |
| 97 | ifeq (${USE_SP804_TIMER},1) |
| 98 | BL1_SOURCES += drivers/arm/sp804/sp804_delay_timer.c |
| 99 | else |
| 100 | BL1_SOURCES += drivers/delay_timer/generic_delay_timer.c |
| 101 | endif |
| 102 | |
| 103 | # Enable Activity Monitor Unit extensions by default |
| 104 | ENABLE_AMU := 1 |
| 105 | |
| 106 | ifneq (${ENABLE_STACK_PROTECTOR},0) |
| 107 | PLAT_BL_COMMON_SOURCES += plat/arm/board/fvp_r/fvp_r_stack_protector.c |
| 108 | endif |
| 109 | |
Gary Morrison | 3d7f654 | 2021-01-27 13:08:47 -0600 | [diff] [blame] | 110 | NEED_BL32 := no |
laurenw-arm | 7c7b198 | 2020-10-21 13:34:40 -0500 | [diff] [blame] | 111 | |
| 112 | ifneq (${BL2_AT_EL3}, 0) |
| 113 | override BL1_SOURCES = |
| 114 | endif |
| 115 | |
laurenw-arm | 56f1e3e | 2021-03-03 14:19:38 -0600 | [diff] [blame] | 116 | include plat/arm/board/common/board_common.mk |
| 117 | include plat/arm/common/arm_common.mk |
laurenw-arm | 7c7b198 | 2020-10-21 13:34:40 -0500 | [diff] [blame] | 118 | |
laurenw-arm | 56f1e3e | 2021-03-03 14:19:38 -0600 | [diff] [blame] | 119 | ifeq (${TRUSTED_BOARD_BOOT}, 1) |
| 120 | BL1_SOURCES += plat/arm/board/fvp_r/fvp_r_trusted_boot.c |
laurenw-arm | 7c7b198 | 2020-10-21 13:34:40 -0500 | [diff] [blame] | 121 | |
laurenw-arm | 56f1e3e | 2021-03-03 14:19:38 -0600 | [diff] [blame] | 122 | # FVP being a development platform, enable capability to disable Authentication |
| 123 | # dynamically if TRUSTED_BOARD_BOOT is set. |
| 124 | DYN_DISABLE_AUTH := 1 |
laurenw-arm | 7c7b198 | 2020-10-21 13:34:40 -0500 | [diff] [blame] | 125 | endif |