blob: a755432e882acfb852e7d4daf5a37c623e9c1aa8 [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
14override NEED_BL33 := no
15
16# Default cluster count for FVP_R
17FVP_R_CLUSTER_COUNT := 2
18
19# Default number of CPUs per cluster on FVP_R
20FVP_R_MAX_CPUS_PER_CLUSTER := 4
21
22# Default number of threads per CPU on FVP_R
23FVP_R_MAX_PE_PER_CPU := 1
24
Gary Morrison3d7f6542021-01-27 13:08:47 -060025# Use MPU-based memory management:
26XLAT_MPU_LIB_V1 := 1
27
laurenw-arm7c7b1982020-10-21 13:34:40 -050028# Need to revisit this for FVP_R
29FVP_R_DT_PREFIX := fvp-base-gicv3-psci
30
31# Pass FVP_R_CLUSTER_COUNT to the build system.
32$(eval $(call add_define,FVP_R_CLUSTER_COUNT))
33
34# Pass FVP_R_MAX_CPUS_PER_CLUSTER to the build system.
35$(eval $(call add_define,FVP_R_MAX_CPUS_PER_CLUSTER))
36
37# Pass FVP_R_MAX_PE_PER_CPU to the build system.
38$(eval $(call add_define,FVP_R_MAX_PE_PER_CPU))
39
40# Sanity check the cluster count and if FVP_R_CLUSTER_COUNT <= 2,
41# choose the CCI driver , else the CCN driver
42ifeq ($(FVP_R_CLUSTER_COUNT), 0)
43$(error "Incorrect cluster count specified for FVP_R port")
44else ifeq ($(FVP_R_CLUSTER_COUNT),$(filter $(FVP_R_CLUSTER_COUNT),1 2))
45FVP_R_INTERCONNECT_DRIVER := FVP_R_CCI
46else
47FVP_R_INTERCONNECT_DRIVER := FVP_R_CCN
48endif
49
50$(eval $(call add_define,FVP_R_INTERCONNECT_DRIVER))
51
52ifeq (${FVP_R_INTERCONNECT_DRIVER}, FVP_R_CCI)
53FVP_R_INTERCONNECT_SOURCES := drivers/arm/cci/cci.c
54else ifeq (${FVP_R_INTERCONNECT_DRIVER}, FVP_R_CCN)
55FVP_R_INTERCONNECT_SOURCES := drivers/arm/ccn/ccn.c \
56 plat/arm/common/arm_ccn.c
57else
58$(error "Incorrect CCN driver chosen on FVP_R port")
59endif
60
61PLAT_INCLUDES := -Iplat/arm/board/fvp_r/include
62
63PLAT_BL_COMMON_SOURCES := plat/arm/board/fvp_r/fvp_r_common.c
64
65FVP_R_CPU_LIBS := lib/cpus/${ARCH}/aem_generic.S
66
67# select a different set of CPU files, depending on whether we compile for
68# hardware assisted coherency cores or not
69ifeq (${HW_ASSISTED_COHERENCY}, 0)
70# Cores used without DSU
71# FVP_R_CPU_LIBS += lib/cpus/aarch64/fvp_r.S
72else
73# Cores used with DSU only
74# FVP_R_CPU_LIBS += lib/cpus/aarch64/fvp_r.S
75endif
76
77BL1_SOURCES += drivers/arm/sp805/sp805.c \
78 drivers/delay_timer/delay_timer.c \
79 drivers/io/io_semihosting.c \
80 lib/semihosting/semihosting.c \
81 lib/semihosting/${ARCH}/semihosting_call.S \
Gary Morrison3d7f6542021-01-27 13:08:47 -060082 plat/arm/board/fvp_r/fvp_r_bl1_arch_setup.c \
laurenw-arm7c7b1982020-10-21 13:34:40 -050083 plat/arm/board/fvp_r/fvp_r_bl1_setup.c \
Gary Morrison3d7f6542021-01-27 13:08:47 -060084 plat/arm/board/fvp_r/fvp_r_context_mgmt.c \
laurenw-arm7c7b1982020-10-21 13:34:40 -050085 plat/arm/board/fvp_r/fvp_r_err.c \
86 plat/arm/board/fvp_r/fvp_r_io_storage.c \
Gary Morrison3d7f6542021-01-27 13:08:47 -060087 plat/arm/board/fvp_r/fvp_r_bl1_context_mgmt.c \
88 plat/arm/board/fvp_r/fvp_r_bl1_entrypoint.S \
89 plat/arm/board/fvp_r/fvp_r_bl1_exceptions.S \
90 plat/arm/board/fvp_r/fvp_r_bl1_main.c \
91 plat/arm/board/fvp_r/fvp_r_context.S \
92 plat/arm/board/fvp_r/fvp_r_debug.S \
93 plat/arm/board/fvp_r/fvp_r_helpers.S \
94 plat/arm/board/fvp_r/fvp_r_misc_helpers.S \
95 plat/arm/board/fvp_r/fvp_r_pauth_helpers.S \
laurenw-arm7c7b1982020-10-21 13:34:40 -050096 ${FVP_R_CPU_LIBS} \
97 ${FVP_R_INTERCONNECT_SOURCES}
98
99ifeq (${USE_SP804_TIMER},1)
100BL1_SOURCES += drivers/arm/sp804/sp804_delay_timer.c
101else
102BL1_SOURCES += drivers/delay_timer/generic_delay_timer.c
103endif
104
105# Enable Activity Monitor Unit extensions by default
106ENABLE_AMU := 1
107
108ifneq (${ENABLE_STACK_PROTECTOR},0)
109PLAT_BL_COMMON_SOURCES += plat/arm/board/fvp_r/fvp_r_stack_protector.c
110endif
111
Gary Morrison3d7f6542021-01-27 13:08:47 -0600112NEED_BL32 := no
laurenw-arm7c7b1982020-10-21 13:34:40 -0500113
114ifneq (${BL2_AT_EL3}, 0)
115 override BL1_SOURCES =
116endif
117
118# Add the FDT_SOURCES and options for Dynamic Config (only for Unix env)
119ifdef UNIX_MK
120FVP_R_HW_CONFIG_DTS := fdts/${FVP_R_DT_PREFIX}.dts
121FDT_SOURCES += $(addprefix plat/arm/board/fvp_r/fdts/, \
122 ${PLAT}_fw_config.dts \
123 ${PLAT}_nt_fw_config.dts \
124 )
125
126FVP_R_FW_CONFIG := ${BUILD_PLAT}/fdts/${PLAT}_fw_config.dtb
127FVP_R_NT_FW_CONFIG := ${BUILD_PLAT}/fdts/${PLAT}_nt_fw_config.dtb
128
129# Add the FW_CONFIG to FIP and specify the same to certtool
130$(eval $(call TOOL_ADD_PAYLOAD,${FVP_R_FW_CONFIG},--fw-config,${FVP_R_FW_CONFIG}))
131# Add the NT_FW_CONFIG to FIP and specify the same to certtool
132$(eval $(call TOOL_ADD_PAYLOAD,${FVP_R_NT_FW_CONFIG},--nt-fw-config,${FVP_R_NT_FW_CONFIG}))
133
134FDT_SOURCES += ${FVP_R_HW_CONFIG_DTS}
135$(eval FVP_R_HW_CONFIG := ${BUILD_PLAT}/$(patsubst %.dts,%.dtb,$(FVP_R_HW_CONFIG_DTS)))
136
137# Add the HW_CONFIG to FIP and specify the same to certtool
138$(eval $(call TOOL_ADD_PAYLOAD,${FVP_R_HW_CONFIG},--hw-config,${FVP_R_HW_CONFIG}))
139endif
140
141include plat/arm/board/common/board_common.mk
142include plat/arm/common/arm_common.mk