blob: 8f5878fd94ccd9abf65df222d17720bb9f678330 [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
Manish Pandeye2a6b352021-10-04 13:38:56 +010014NEED_BL32 := no
laurenw-arm56f1e3e2021-03-03 14:19:38 -060015
16override CTX_INCLUDE_AARCH32_REGS := 0
laurenw-arm7c7b1982020-10-21 13:34:40 -050017
18# Default cluster count for FVP_R
19FVP_R_CLUSTER_COUNT := 2
20
21# Default number of CPUs per cluster on FVP_R
22FVP_R_MAX_CPUS_PER_CLUSTER := 4
23
24# Default number of threads per CPU on FVP_R
25FVP_R_MAX_PE_PER_CPU := 1
26
Gary Morrison3d7f6542021-01-27 13:08:47 -060027# Use MPU-based memory management:
28XLAT_MPU_LIB_V1 := 1
29
laurenw-arm7c7b1982020-10-21 13:34:40 -050030# 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
41ifeq ($(FVP_R_CLUSTER_COUNT), 0)
42$(error "Incorrect cluster count specified for FVP_R port")
43else ifeq ($(FVP_R_CLUSTER_COUNT),$(filter $(FVP_R_CLUSTER_COUNT),1 2))
44FVP_R_INTERCONNECT_DRIVER := FVP_R_CCI
45else
46FVP_R_INTERCONNECT_DRIVER := FVP_R_CCN
47endif
48
49$(eval $(call add_define,FVP_R_INTERCONNECT_DRIVER))
50
51ifeq (${FVP_R_INTERCONNECT_DRIVER}, FVP_R_CCI)
52FVP_R_INTERCONNECT_SOURCES := drivers/arm/cci/cci.c
53else ifeq (${FVP_R_INTERCONNECT_DRIVER}, FVP_R_CCN)
54FVP_R_INTERCONNECT_SOURCES := drivers/arm/ccn/ccn.c \
55 plat/arm/common/arm_ccn.c
56else
57$(error "Incorrect CCN driver chosen on FVP_R port")
58endif
59
Manish Pandeye2a6b352021-10-04 13:38:56 +010060include plat/arm/board/common/board_common.mk
61include plat/arm/common/arm_common.mk
laurenw-arm7c7b1982020-10-21 13:34:40 -050062
Manish Pandeye2a6b352021-10-04 13:38:56 +010063PLAT_INCLUDES := -Iplat/arm/board/fvp_r/include
laurenw-arm7c7b1982020-10-21 13:34:40 -050064
Manish Pandeye2a6b352021-10-04 13:38:56 +010065FVP_R_BL_COMMON_SOURCES := plat/arm/board/fvp_r/fvp_r_common.c \
Gary Morrison3d7f6542021-01-27 13:08:47 -060066 plat/arm/board/fvp_r/fvp_r_context_mgmt.c \
Manish Pandeye2a6b352021-10-04 13:38:56 +010067 plat/arm/board/fvp_r/fvp_r_context.S \
68 plat/arm/board/fvp_r/fvp_r_debug.S \
laurenw-arm7c7b1982020-10-21 13:34:40 -050069 plat/arm/board/fvp_r/fvp_r_err.c \
Manish Pandeye2a6b352021-10-04 13:38:56 +010070 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
74FVP_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-arm7c7b1982020-10-21 13:34:40 -050076 plat/arm/board/fvp_r/fvp_r_io_storage.c \
Gary Morrison3d7f6542021-01-27 13:08:47 -060077 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 Pandeye2a6b352021-10-04 13:38:56 +010080 plat/arm/board/fvp_r/fvp_r_bl1_main.c
81
82FVP_R_CPU_LIBS := lib/cpus/${ARCH}/aem_generic.S
83
84FVP_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
89ifeq (${TRUSTED_BOARD_BOOT},1)
90FVP_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
103FVP_R_BL1_SOURCES += ${MBEDTLS_SOURCES} \
104 ${FVP_R_AUTH_SOURCES}
105endif
laurenw-arm7c7b1982020-10-21 13:34:40 -0500106
107ifeq (${USE_SP804_TIMER},1)
Manish Pandeye2a6b352021-10-04 13:38:56 +0100108FVP_R_BL_COMMON_SOURCES += drivers/arm/sp804/sp804_delay_timer.c
laurenw-arm7c7b1982020-10-21 13:34:40 -0500109else
Manish Pandeye2a6b352021-10-04 13:38:56 +0100110FVP_R_BL_COMMON_SOURCES += drivers/delay_timer/generic_delay_timer.c
laurenw-arm7c7b1982020-10-21 13:34:40 -0500111endif
112
113# Enable Activity Monitor Unit extensions by default
114ENABLE_AMU := 1
115
116ifneq (${ENABLE_STACK_PROTECTOR},0)
Manish Pandeye2a6b352021-10-04 13:38:56 +0100117FVP_R_BL_COMMON_SOURCES += plat/arm/board/fvp_r/fvp_r_stack_protector.c
laurenw-arm7c7b1982020-10-21 13:34:40 -0500118endif
119
Manish Pandeye2a6b352021-10-04 13:38:56 +0100120override 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}