blob: 0b6e1da54ae983b8805a1aa0deaa357a7eb64df3 [file] [log] [blame]
Ryan Harkin25cff832014-01-13 12:37:03 +00001#
Douglas Raillard306593d2017-02-24 18:14:15 +00002# Copyright (c) 2013-2017, ARM Limited and Contributors. All rights reserved.
Ryan Harkin25cff832014-01-13 12:37:03 +00003#
dp-armfa3cf0b2017-05-03 09:38:09 +01004# SPDX-License-Identifier: BSD-3-Clause
Ryan Harkin25cff832014-01-13 12:37:03 +00005#
6
Soby Mathewb6f3b1f2016-04-07 17:40:04 +01007# Use the GICv3 driver on the FVP by default
8FVP_USE_GIC_DRIVER := FVP_GICV3
Jeenu Viswambharan528d21b2016-11-15 13:53:57 +00009
Antonio Nino Diaz664adb62016-05-17 09:48:10 +010010# Use the SP804 timer instead of the generic one
11FVP_USE_SP804_TIMER := 0
12
Jeenu Viswambharan528d21b2016-11-15 13:53:57 +000013# Default cluster count for FVP
14FVP_CLUSTER_COUNT := 2
15
16# Default number of threads per CPU on FVP
17FVP_MAX_PE_PER_CPU := 1
18
Antonio Nino Diaz664adb62016-05-17 09:48:10 +010019$(eval $(call assert_boolean,FVP_USE_SP804_TIMER))
20$(eval $(call add_define,FVP_USE_SP804_TIMER))
Achin Gupta1fa7eb62015-11-03 14:18:34 +000021
22# The FVP platform depends on this macro to build with correct GIC driver.
23$(eval $(call add_define,FVP_USE_GIC_DRIVER))
24
Jeenu Viswambharan528d21b2016-11-15 13:53:57 +000025# Pass FVP_CLUSTER_COUNT to the build system.
Soby Mathew47e43f22016-02-01 14:04:34 +000026$(eval $(call add_define,FVP_CLUSTER_COUNT))
Soby Mathew7356b1e2016-03-24 10:12:42 +000027
Jeenu Viswambharan528d21b2016-11-15 13:53:57 +000028# Pass FVP_MAX_PE_PER_CPU to the build system.
29$(eval $(call add_define,FVP_MAX_PE_PER_CPU))
30
Soby Mathew7356b1e2016-03-24 10:12:42 +000031# Sanity check the cluster count and if FVP_CLUSTER_COUNT <= 2,
32# choose the CCI driver , else the CCN driver
33ifeq ($(FVP_CLUSTER_COUNT), 0)
34$(error "Incorrect cluster count specified for FVP port")
35else ifeq ($(FVP_CLUSTER_COUNT),$(filter $(FVP_CLUSTER_COUNT),1 2))
36FVP_INTERCONNECT_DRIVER := FVP_CCI
37else
38FVP_INTERCONNECT_DRIVER := FVP_CCN
Soby Mathew47e43f22016-02-01 14:04:34 +000039endif
40
Soby Mathew7356b1e2016-03-24 10:12:42 +000041$(eval $(call add_define,FVP_INTERCONNECT_DRIVER))
42
Jeenu Viswambharand7a901e2016-12-06 16:15:22 +000043FVP_GICV3_SOURCES := drivers/arm/gic/common/gic_common.c \
Achin Gupta1fa7eb62015-11-03 14:18:34 +000044 drivers/arm/gic/v3/gicv3_main.c \
45 drivers/arm/gic/v3/gicv3_helpers.c \
46 plat/common/plat_gicv3.c \
47 plat/arm/common/arm_gicv3.c
Jeenu Viswambharand7a901e2016-12-06 16:15:22 +000048
49# Choose the GIC sources depending upon the how the FVP will be invoked
50ifeq (${FVP_USE_GIC_DRIVER}, FVP_GICV3)
51FVP_GIC_SOURCES := ${FVP_GICV3_SOURCES}
52else ifeq (${FVP_USE_GIC_DRIVER},FVP_GIC600)
53FVP_GIC_SOURCES := ${FVP_GICV3_SOURCES} \
54 drivers/arm/gic/v3/gic600.c
Achin Gupta1fa7eb62015-11-03 14:18:34 +000055else ifeq (${FVP_USE_GIC_DRIVER}, FVP_GICV2)
56FVP_GIC_SOURCES := drivers/arm/gic/common/gic_common.c \
57 drivers/arm/gic/v2/gicv2_main.c \
58 drivers/arm/gic/v2/gicv2_helpers.c \
59 plat/common/plat_gicv2.c \
60 plat/arm/common/arm_gicv2.c
61else ifeq (${FVP_USE_GIC_DRIVER}, FVP_GICV3_LEGACY)
Soby Mathew0d268dc2016-07-11 14:13:56 +010062 ifeq (${ARCH}, aarch32)
63 $(error "GICV3 Legacy driver not supported for AArch32 build")
64 endif
Achin Gupta1fa7eb62015-11-03 14:18:34 +000065FVP_GIC_SOURCES := drivers/arm/gic/arm_gic.c \
66 drivers/arm/gic/gic_v2.c \
67 drivers/arm/gic/gic_v3.c \
68 plat/common/plat_gic.c \
69 plat/arm/common/arm_gicv3_legacy.c
70else
71$(error "Incorrect GIC driver chosen on FVP port")
72endif
73
Soby Mathew7356b1e2016-03-24 10:12:42 +000074ifeq (${FVP_INTERCONNECT_DRIVER}, FVP_CCI)
Jeenu Viswambharan9e78b922017-07-18 15:42:50 +010075FVP_INTERCONNECT_SOURCES := drivers/arm/cci/cci.c
Soby Mathew7356b1e2016-03-24 10:12:42 +000076else ifeq (${FVP_INTERCONNECT_DRIVER}, FVP_CCN)
77FVP_INTERCONNECT_SOURCES := drivers/arm/ccn/ccn.c \
78 plat/arm/common/arm_ccn.c
79else
80$(error "Incorrect CCN driver chosen on FVP port")
81endif
Vikram Kanigirifbb13012016-02-15 11:54:14 +000082
Soby Mathew9c708b52016-02-26 14:23:19 +000083FVP_SECURITY_SOURCES := drivers/arm/tzc/tzc400.c \
Vikram Kanigiri70752bb2016-02-10 14:50:53 +000084 plat/arm/board/fvp/fvp_security.c \
85 plat/arm/common/arm_tzc400.c
86
Vikram Kanigirifbb13012016-02-15 11:54:14 +000087
Juan Castillo31a68f02015-04-14 12:49:03 +010088PLAT_INCLUDES := -Iplat/arm/board/fvp/include
Sandrine Bailleuxe701e302014-05-20 17:28:25 +010089
Ryan Harkin25cff832014-01-13 12:37:03 +000090
Soby Mathewcc037c12016-04-08 16:42:58 +010091PLAT_BL_COMMON_SOURCES := plat/arm/board/fvp/fvp_common.c
Ryan Harkin25cff832014-01-13 12:37:03 +000092
Soby Mathew0d268dc2016-07-11 14:13:56 +010093FVP_CPU_LIBS := lib/cpus/${ARCH}/aem_generic.S
94
95ifeq (${ARCH}, aarch64)
96FVP_CPU_LIBS += lib/cpus/aarch64/cortex_a35.S \
Soby Mathewc704cbc2014-08-14 11:33:56 +010097 lib/cpus/aarch64/cortex_a53.S \
David Wang805c2c72016-11-09 16:29:02 +000098 lib/cpus/aarch64/cortex_a55.S \
Soby Mathewc704cbc2014-08-14 11:33:56 +010099 lib/cpus/aarch64/cortex_a57.S \
Yatharth Kochar63af6872016-02-09 12:00:03 +0000100 lib/cpus/aarch64/cortex_a72.S \
David Wang805c2c72016-11-09 16:29:02 +0000101 lib/cpus/aarch64/cortex_a73.S \
102 lib/cpus/aarch64/cortex_a75.S
Yatharth Kochara4c219a2016-07-12 15:47:03 +0100103else
104FVP_CPU_LIBS += lib/cpus/aarch32/cortex_a32.S
Soby Mathew0d268dc2016-07-11 14:13:56 +0100105endif
Sandrine Bailleuxdd505792016-01-13 09:04:26 +0000106
107BL1_SOURCES += drivers/io/io_semihosting.c \
Dan Handley2b6b5742015-03-19 19:17:53 +0000108 lib/semihosting/semihosting.c \
Yatharth Kochar88ac53b2016-07-04 11:03:49 +0100109 lib/semihosting/${ARCH}/semihosting_call.S \
110 plat/arm/board/fvp/${ARCH}/fvp_helpers.S \
Dan Handleyd617f662015-04-27 19:17:18 +0100111 plat/arm/board/fvp/fvp_bl1_setup.c \
Juan Castillob6132f12015-10-06 14:01:35 +0100112 plat/arm/board/fvp/fvp_err.c \
Vikram Kanigirifbb13012016-02-15 11:54:14 +0000113 plat/arm/board/fvp/fvp_io_storage.c \
Antonio Nino Diaz9d602fe2016-05-20 14:14:16 +0100114 plat/arm/board/fvp/fvp_trusted_boot.c \
Vikram Kanigirifbb13012016-02-15 11:54:14 +0000115 ${FVP_CPU_LIBS} \
116 ${FVP_INTERCONNECT_SOURCES}
117
Ryan Harkin25cff832014-01-13 12:37:03 +0000118
Antonio Nino Diaz664adb62016-05-17 09:48:10 +0100119BL2_SOURCES += drivers/io/io_semihosting.c \
Ryan Harkinf96fc8f2015-03-17 14:54:01 +0000120 drivers/delay_timer/delay_timer.c \
Dan Handley2b6b5742015-03-19 19:17:53 +0000121 lib/semihosting/semihosting.c \
Yatharth Kochara5f77d32016-07-04 11:26:14 +0100122 lib/semihosting/${ARCH}/semihosting_call.S \
Dan Handleyd617f662015-04-27 19:17:18 +0100123 plat/arm/board/fvp/fvp_bl2_setup.c \
Juan Castillob6132f12015-10-06 14:01:35 +0100124 plat/arm/board/fvp/fvp_err.c \
Dan Handleyd617f662015-04-27 19:17:18 +0100125 plat/arm/board/fvp/fvp_io_storage.c \
Antonio Nino Diaz9d602fe2016-05-20 14:14:16 +0100126 plat/arm/board/fvp/fvp_trusted_boot.c \
Vikram Kanigiri70752bb2016-02-10 14:50:53 +0000127 ${FVP_SECURITY_SOURCES}
Ryan Harkin25cff832014-01-13 12:37:03 +0000128
Antonio Nino Diaz664adb62016-05-17 09:48:10 +0100129ifeq (${FVP_USE_SP804_TIMER},1)
130BL2_SOURCES += drivers/arm/sp804/sp804_delay_timer.c
131else
132BL2_SOURCES += drivers/delay_timer/generic_delay_timer.c
133endif
134
Yatharth Kochar3a11eda2015-10-14 15:28:11 +0100135BL2U_SOURCES += plat/arm/board/fvp/fvp_bl2u_setup.c \
Vikram Kanigiri70752bb2016-02-10 14:50:53 +0000136 ${FVP_SECURITY_SOURCES}
Yatharth Kochar3a11eda2015-10-14 15:28:11 +0100137
Jeenu Viswambharan9e78b922017-07-18 15:42:50 +0100138BL31_SOURCES += drivers/arm/smmu/smmu_v3.c \
139 plat/arm/board/fvp/fvp_bl31_setup.c \
Dan Handleyd617f662015-04-27 19:17:18 +0100140 plat/arm/board/fvp/fvp_pm.c \
Dan Handleyd617f662015-04-27 19:17:18 +0100141 plat/arm/board/fvp/fvp_topology.c \
142 plat/arm/board/fvp/aarch64/fvp_helpers.S \
Achin Gupta1fa7eb62015-11-03 14:18:34 +0000143 plat/arm/board/fvp/drivers/pwrc/fvp_pwrc.c \
Vikram Kanigirifbb13012016-02-15 11:54:14 +0000144 ${FVP_CPU_LIBS} \
Vikram Kanigiri70752bb2016-02-10 14:50:53 +0000145 ${FVP_GIC_SOURCES} \
Vikram Kanigirifbb13012016-02-15 11:54:14 +0000146 ${FVP_INTERCONNECT_SOURCES} \
Vikram Kanigiri70752bb2016-02-10 14:50:53 +0000147 ${FVP_SECURITY_SOURCES}
Juan Castillo5e29c752015-01-07 10:39:25 +0000148
Soby Mathewfec4eb72015-07-01 16:16:20 +0100149# Disable the PSCI platform compatibility layer
150ENABLE_PLAT_COMPAT := 0
151
Douglas Raillard306593d2017-02-24 18:14:15 +0000152ifneq (${ENABLE_STACK_PROTECTOR},0)
153PLAT_BL_COMMON_SOURCES += plat/arm/board/fvp/fvp_stack_protector.c
154endif
155
dp-armcdd03cb2017-02-15 11:07:55 +0000156ifeq (${ARCH},aarch32)
157 NEED_BL32 := yes
158endif
159
Juan Castillo31a68f02015-04-14 12:49:03 +0100160include plat/arm/board/common/board_common.mk
Dan Handley2b6b5742015-03-19 19:17:53 +0000161include plat/arm/common/arm_common.mk