blob: ac45d57eebd9111d284883de8600e56a3886c7d0 [file] [log] [blame]
Usama Arife97998f2018-11-30 15:43:56 +00001#
Louis Mayencourt5a15b2d2019-10-17 14:46:51 +01002# Copyright (c) 2019-2020, Arm Limited. All rights reserved.
Usama Arife97998f2018-11-30 15:43:56 +00003#
4# SPDX-License-Identifier: BSD-3-Clause
5#
6
7ifdef ARM_CORTEX_A5
8# Use the SP804 timer instead of the generic one
Madhukar Pappireddy7a554a12020-08-12 13:18:19 -05009USE_SP804_TIMER := 1
Usama Arife97998f2018-11-30 15:43:56 +000010BL2_SOURCES += drivers/arm/sp804/sp804_delay_timer.c
11endif
12
Alexei Fedorovcaa18022020-07-14 10:47:25 +010013# Include GICv2 driver files
14include drivers/arm/gic/v2/gicv2.mk
15
16FVP_VE_GIC_SOURCES := ${GICV2_SOURCES} \
17 plat/common/plat_gicv2.c \
Usama Arife97998f2018-11-30 15:43:56 +000018 plat/arm/common/arm_gicv2.c
19
20FVP_VE_SECURITY_SOURCES := plat/arm/board/fvp_ve/fvp_ve_security.c
21
22PLAT_INCLUDES := -Iplat/arm/board/fvp_ve/include
23
24PLAT_BL_COMMON_SOURCES := plat/arm/board/fvp_ve/fvp_ve_common.c \
25 plat/arm/common/${ARCH}/arm_helpers.S \
26 plat/arm/common/arm_common.c \
27 plat/arm/common/arm_console.c \
28 drivers/arm/pl011/${ARCH}/pl011_console.S \
29 plat/arm/board/common/${ARCH}/board_arm_helpers.S
30
31ifdef ARM_CORTEX_A5
32FVP_VE_CPU_LIBS := lib/cpus/aarch32/cortex_a5.S
33else
34FVP_VE_CPU_LIBS := lib/cpus/aarch32/cortex_a7.S
35endif
36
37BL1_SOURCES += drivers/arm/sp805/sp805.c \
38 drivers/io/io_fip.c \
39 drivers/io/io_memmap.c \
40 drivers/io/io_storage.c \
41 plat/arm/common/arm_bl1_setup.c \
42 plat/arm/common/arm_err.c \
Ambroise Vincentfa42c9e2019-07-04 14:58:45 +010043 plat/arm/board/fvp_ve/fvp_ve_err.c \
Usama Arife97998f2018-11-30 15:43:56 +000044 plat/arm/common/arm_io_storage.c \
Louis Mayencourt6b232d92020-02-28 16:57:30 +000045 plat/arm/common/fconf/arm_fconf_io.c \
Usama Arife97998f2018-11-30 15:43:56 +000046 drivers/cfi/v2m/v2m_flash.c \
47 plat/arm/board/fvp_ve/${ARCH}/fvp_ve_helpers.S \
48 plat/arm/board/fvp_ve/fvp_ve_bl1_setup.c \
49 lib/aarch32/arm32_aeabi_divmod.c \
50 lib/aarch32/arm32_aeabi_divmod_a32.S \
51 ${FVP_VE_CPU_LIBS} \
52 ${DYN_CFG_SOURCES}
53
54BL2_SOURCES += plat/arm/board/fvp_ve/fvp_ve_bl2_setup.c \
55 lib/aarch32/arm32_aeabi_divmod.c \
56 lib/aarch32/arm32_aeabi_divmod_a32.S \
57 drivers/delay_timer/delay_timer.c \
58 drivers/delay_timer/generic_delay_timer.c \
59 drivers/cfi/v2m/v2m_flash.c \
60 drivers/io/io_fip.c \
61 drivers/io/io_memmap.c \
62 drivers/io/io_storage.c \
63 plat/arm/common/arm_bl2_setup.c \
64 plat/arm/common/arm_err.c \
Ambroise Vincentfa42c9e2019-07-04 14:58:45 +010065 plat/arm/board/fvp_ve/fvp_ve_err.c \
Usama Arife97998f2018-11-30 15:43:56 +000066 plat/arm/common/arm_io_storage.c \
Louis Mayencourt6b232d92020-02-28 16:57:30 +000067 plat/arm/common/fconf/arm_fconf_io.c \
Usama Arife97998f2018-11-30 15:43:56 +000068 plat/arm/common/${ARCH}/arm_bl2_mem_params_desc.c \
69 plat/arm/common/arm_image_load.c \
70 common/desc_image_load.c \
71 ${DYN_CFG_SOURCES} \
72 ${FVP_VE_SECURITY_SOURCES}
73
74# Add the FDT_SOURCES and options for Dynamic Config (only for Unix env)
75ifdef UNIX_MK
76
Manish V Badarkhe64616a52020-05-31 08:53:40 +010077FDT_SOURCES += plat/arm/board/fvp_ve/fdts/fvp_ve_fw_config.dts \
78 plat/arm/board/fvp_ve/fdts/fvp_ve_tb_fw_config.dts
Usama Arife97998f2018-11-30 15:43:56 +000079
Manish V Badarkhe64616a52020-05-31 08:53:40 +010080FVP_FW_CONFIG := ${BUILD_PLAT}/fdts/fvp_ve_fw_config.dtb
81FVP_TB_FW_CONFIG := ${BUILD_PLAT}/fdts/fvp_ve_tb_fw_config.dtb
Usama Arife97998f2018-11-30 15:43:56 +000082
Manish V Badarkhe64616a52020-05-31 08:53:40 +010083# Add the FW_CONFIG to FIP and specify the same to certtool
Anders Dellien3f694742020-08-23 19:32:48 +010084$(eval $(call TOOL_ADD_PAYLOAD,${FVP_FW_CONFIG},--fw-config,${FVP_FW_CONFIG}))
Usama Arife97998f2018-11-30 15:43:56 +000085# Add the TB_FW_CONFIG to FIP and specify the same to certtool
Anders Dellien3f694742020-08-23 19:32:48 +010086$(eval $(call TOOL_ADD_PAYLOAD,${FVP_TB_FW_CONFIG},--tb-fw-config,${FVP_TB_FW_CONFIG}))
Usama Arife97998f2018-11-30 15:43:56 +000087
88FDT_SOURCES += ${FVP_HW_CONFIG_DTS}
89$(eval FVP_HW_CONFIG := ${BUILD_PLAT}/$(patsubst %.dts,%.dtb, \
90 fdts/$(notdir ${FVP_HW_CONFIG_DTS})))
91# Add the HW_CONFIG to FIP and specify the same to certtool
Anders Dellien3f694742020-08-23 19:32:48 +010092$(eval $(call TOOL_ADD_PAYLOAD,${FVP_HW_CONFIG},--hw-config,${FVP_HW_CONFIG}))
Usama Arife97998f2018-11-30 15:43:56 +000093endif
94
95NEED_BL32 := yes
96
97# Modification of arm_common.mk
98
99# Process ARM_DISABLE_TRUSTED_WDOG flag
100# By default, Trusted Watchdog is always enabled unless SPIN_ON_BL1_EXIT is set
101ARM_DISABLE_TRUSTED_WDOG := 0
102ifeq (${SPIN_ON_BL1_EXIT}, 1)
103ARM_DISABLE_TRUSTED_WDOG := 1
104endif
105$(eval $(call assert_boolean,ARM_DISABLE_TRUSTED_WDOG))
106$(eval $(call add_define,ARM_DISABLE_TRUSTED_WDOG))
107
108# Use translation tables library v1 if using Cortex-A5
109ifdef ARM_CORTEX_A5
110ARM_XLAT_TABLES_LIB_V1 := 1
111else
112ARM_XLAT_TABLES_LIB_V1 := 0
113endif
114$(eval $(call assert_boolean,ARM_XLAT_TABLES_LIB_V1))
115$(eval $(call add_define,ARM_XLAT_TABLES_LIB_V1))
116
Usama Arife97998f2018-11-30 15:43:56 +0000117ifeq (${ARM_XLAT_TABLES_LIB_V1}, 1)
118 # Only use nonlpae version of xlatv1 otherwise use xlat v2
119 PLAT_BL_COMMON_SOURCES += lib/xlat_tables/${ARCH}/nonlpae_tables.c
120else
121 include lib/xlat_tables_v2/xlat_tables.mk
122 PLAT_BL_COMMON_SOURCES += ${XLAT_TABLES_LIB_SRCS}
123endif
124
Louis Mayencourt5a15b2d2019-10-17 14:46:51 +0100125# Firmware Configuration Framework sources
126include lib/fconf/fconf.mk
127
Usama Arife97998f2018-11-30 15:43:56 +0000128# Add `libfdt` and Arm common helpers required for Dynamic Config
129include lib/libfdt/libfdt.mk
130
131DYN_CFG_SOURCES += plat/arm/common/arm_dyn_cfg.c \
132 plat/arm/common/arm_dyn_cfg_helpers.c \
133 common/fdt_wrappers.c
134