blob: 39509dd7e5d02c0e65583904132c02e6f2d39928 [file] [log] [blame]
laurenw-arm7c7b1982020-10-21 13:34:40 -05001#
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
8ARCH := aarch64
9
10# Override to exclude BL2, BL2U, BL31, and BL33 for FVP_R
11override NEED_BL2 := no
12override NEED_BL2U := no
13override NEED_BL31 := no
laurenw-arm56f1e3e2021-03-03 14:19:38 -060014
15override CTX_INCLUDE_AARCH32_REGS := 0
laurenw-arm7c7b1982020-10-21 13:34:40 -050016
17# Default cluster count for FVP_R
18FVP_R_CLUSTER_COUNT := 2
19
20# Default number of CPUs per cluster on FVP_R
21FVP_R_MAX_CPUS_PER_CLUSTER := 4
22
23# Default number of threads per CPU on FVP_R
24FVP_R_MAX_PE_PER_CPU := 1
25
Gary Morrison3d7f6542021-01-27 13:08:47 -060026# Use MPU-based memory management:
27XLAT_MPU_LIB_V1 := 1
28
laurenw-arm7c7b1982020-10-21 13:34:40 -050029# 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
40ifeq ($(FVP_R_CLUSTER_COUNT), 0)
41$(error "Incorrect cluster count specified for FVP_R port")
42else ifeq ($(FVP_R_CLUSTER_COUNT),$(filter $(FVP_R_CLUSTER_COUNT),1 2))
43FVP_R_INTERCONNECT_DRIVER := FVP_R_CCI
44else
45FVP_R_INTERCONNECT_DRIVER := FVP_R_CCN
46endif
47
48$(eval $(call add_define,FVP_R_INTERCONNECT_DRIVER))
49
50ifeq (${FVP_R_INTERCONNECT_DRIVER}, FVP_R_CCI)
51FVP_R_INTERCONNECT_SOURCES := drivers/arm/cci/cci.c
52else ifeq (${FVP_R_INTERCONNECT_DRIVER}, FVP_R_CCN)
53FVP_R_INTERCONNECT_SOURCES := drivers/arm/ccn/ccn.c \
54 plat/arm/common/arm_ccn.c
55else
56$(error "Incorrect CCN driver chosen on FVP_R port")
57endif
58
59PLAT_INCLUDES := -Iplat/arm/board/fvp_r/include
60
61PLAT_BL_COMMON_SOURCES := plat/arm/board/fvp_r/fvp_r_common.c
62
63FVP_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
67ifeq (${HW_ASSISTED_COHERENCY}, 0)
68# Cores used without DSU
69# FVP_R_CPU_LIBS += lib/cpus/aarch64/fvp_r.S
70else
71# Cores used with DSU only
72# FVP_R_CPU_LIBS += lib/cpus/aarch64/fvp_r.S
73endif
74
75BL1_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 Morrison3d7f6542021-01-27 13:08:47 -060080 plat/arm/board/fvp_r/fvp_r_bl1_arch_setup.c \
laurenw-arm7c7b1982020-10-21 13:34:40 -050081 plat/arm/board/fvp_r/fvp_r_bl1_setup.c \
Gary Morrison3d7f6542021-01-27 13:08:47 -060082 plat/arm/board/fvp_r/fvp_r_context_mgmt.c \
laurenw-arm7c7b1982020-10-21 13:34:40 -050083 plat/arm/board/fvp_r/fvp_r_err.c \
84 plat/arm/board/fvp_r/fvp_r_io_storage.c \
Gary Morrison3d7f6542021-01-27 13:08:47 -060085 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-arm56f1e3e2021-03-03 14:19:38 -060088 plat/arm/board/fvp_r/fvp_r_bl1_main.c \
Gary Morrison3d7f6542021-01-27 13:08:47 -060089 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-arm7c7b1982020-10-21 13:34:40 -050094 ${FVP_R_CPU_LIBS} \
95 ${FVP_R_INTERCONNECT_SOURCES}
96
97ifeq (${USE_SP804_TIMER},1)
98BL1_SOURCES += drivers/arm/sp804/sp804_delay_timer.c
99else
100BL1_SOURCES += drivers/delay_timer/generic_delay_timer.c
101endif
102
103# Enable Activity Monitor Unit extensions by default
104ENABLE_AMU := 1
105
106ifneq (${ENABLE_STACK_PROTECTOR},0)
107PLAT_BL_COMMON_SOURCES += plat/arm/board/fvp_r/fvp_r_stack_protector.c
108endif
109
Gary Morrison3d7f6542021-01-27 13:08:47 -0600110NEED_BL32 := no
laurenw-arm7c7b1982020-10-21 13:34:40 -0500111
112ifneq (${BL2_AT_EL3}, 0)
113 override BL1_SOURCES =
114endif
115
laurenw-arm56f1e3e2021-03-03 14:19:38 -0600116include plat/arm/board/common/board_common.mk
117include plat/arm/common/arm_common.mk
laurenw-arm7c7b1982020-10-21 13:34:40 -0500118
laurenw-arm56f1e3e2021-03-03 14:19:38 -0600119ifeq (${TRUSTED_BOARD_BOOT}, 1)
120BL1_SOURCES += plat/arm/board/fvp_r/fvp_r_trusted_boot.c
laurenw-arm7c7b1982020-10-21 13:34:40 -0500121
laurenw-arm56f1e3e2021-03-03 14:19:38 -0600122# FVP being a development platform, enable capability to disable Authentication
123# dynamically if TRUSTED_BOARD_BOOT is set.
124DYN_DISABLE_AUTH := 1
laurenw-arm7c7b1982020-10-21 13:34:40 -0500125endif