1# 2# Copyright (c) 2019-2025, Arm Limited. All rights reserved. 3# 4# SPDX-License-Identifier: BSD-3-Clause 5# 6 7include common/fdt_wrappers.mk 8 9ifdef ARM_CORTEX_A5 10# Use the SP804 timer instead of the generic one 11USE_SP804_TIMER := 1 12BL2_SOURCES += drivers/arm/sp804/sp804_delay_timer.c 13endif 14 15USE_GIC_DRIVER := 2 16 17FVP_VE_SECURITY_SOURCES := plat/arm/board/fvp_ve/fvp_ve_security.c 18 19PLAT_INCLUDES := -Iplat/arm/board/fvp_ve/include 20 21PLAT_BL_COMMON_SOURCES := plat/arm/board/fvp_ve/fvp_ve_common.c \ 22 plat/arm/common/${ARCH}/arm_helpers.S \ 23 plat/arm/common/arm_common.c \ 24 plat/arm/common/arm_console.c \ 25 drivers/arm/pl011/${ARCH}/pl011_console.S \ 26 plat/arm/board/common/${ARCH}/board_arm_helpers.S 27 28ifdef ARM_CORTEX_A5 29FVP_VE_CPU_LIBS := lib/cpus/aarch32/cortex_a5.S 30else 31FVP_VE_CPU_LIBS := lib/cpus/aarch32/cortex_a7.S 32endif 33 34BL1_SOURCES += drivers/arm/sp805/sp805.c \ 35 drivers/io/io_fip.c \ 36 drivers/io/io_memmap.c \ 37 drivers/io/io_storage.c \ 38 plat/arm/common/arm_bl1_setup.c \ 39 plat/arm/common/arm_err.c \ 40 plat/arm/board/fvp_ve/fvp_ve_err.c \ 41 plat/arm/common/arm_io_storage.c \ 42 plat/arm/common/fconf/arm_fconf_io.c \ 43 drivers/cfi/v2m/v2m_flash.c \ 44 plat/arm/board/fvp_ve/${ARCH}/fvp_ve_helpers.S \ 45 plat/arm/board/fvp_ve/fvp_ve_bl1_setup.c \ 46 lib/aarch32/arm32_aeabi_divmod.c \ 47 lib/aarch32/arm32_aeabi_divmod_a32.S \ 48 ${FVP_VE_CPU_LIBS} \ 49 ${DYN_CFG_SOURCES} 50 51BL2_SOURCES += plat/arm/board/fvp_ve/fvp_ve_bl2_setup.c \ 52 lib/aarch32/arm32_aeabi_divmod.c \ 53 lib/aarch32/arm32_aeabi_divmod_a32.S \ 54 drivers/delay_timer/delay_timer.c \ 55 drivers/delay_timer/generic_delay_timer.c \ 56 drivers/cfi/v2m/v2m_flash.c \ 57 drivers/io/io_fip.c \ 58 drivers/io/io_memmap.c \ 59 drivers/io/io_storage.c \ 60 plat/arm/common/arm_bl2_setup.c \ 61 plat/arm/common/arm_err.c \ 62 plat/arm/board/fvp_ve/fvp_ve_err.c \ 63 plat/arm/common/arm_io_storage.c \ 64 plat/arm/common/fconf/arm_fconf_io.c \ 65 plat/arm/common/${ARCH}/arm_bl2_mem_params_desc.c \ 66 plat/arm/common/arm_image_load.c \ 67 common/desc_image_load.c \ 68 ${DYN_CFG_SOURCES} \ 69 ${FVP_VE_SECURITY_SOURCES} 70 71# Add the FDT_SOURCES and options for Dynamic Config (only for Unix env) 72ifdef UNIX_MK 73 74FDT_SOURCES += plat/arm/board/fvp_ve/fdts/fvp_ve_fw_config.dts \ 75 plat/arm/board/fvp_ve/fdts/fvp_ve_tb_fw_config.dts 76 77FVP_FW_CONFIG := ${BUILD_PLAT}/fdts/fvp_ve_fw_config.dtb 78FVP_TB_FW_CONFIG := ${BUILD_PLAT}/fdts/fvp_ve_tb_fw_config.dtb 79 80# Add the FW_CONFIG to FIP and specify the same to certtool 81$(eval $(call TOOL_ADD_PAYLOAD,${FVP_FW_CONFIG},--fw-config,${FVP_FW_CONFIG})) 82# Add the TB_FW_CONFIG to FIP and specify the same to certtool 83$(eval $(call TOOL_ADD_PAYLOAD,${FVP_TB_FW_CONFIG},--tb-fw-config,${FVP_TB_FW_CONFIG})) 84 85FDT_SOURCES += ${FVP_HW_CONFIG_DTS} 86$(eval FVP_HW_CONFIG := ${BUILD_PLAT}/$(patsubst %.dts,%.dtb, \ 87 fdts/$(notdir ${FVP_HW_CONFIG_DTS}))) 88# Add the HW_CONFIG to FIP and specify the same to certtool 89$(eval $(call TOOL_ADD_PAYLOAD,${FVP_HW_CONFIG},--hw-config,${FVP_HW_CONFIG})) 90endif 91 92NEED_BL32 := yes 93 94ifeq (${AARCH32_SP},none) 95 $(error Variable AARCH32_SP has to be set for AArch32) 96endif 97 98# Modification of arm_common.mk 99 100# Process ARM_DISABLE_TRUSTED_WDOG flag 101# By default, Trusted Watchdog is always enabled unless SPIN_ON_BL1_EXIT is set 102ARM_DISABLE_TRUSTED_WDOG := 0 103ifeq (${SPIN_ON_BL1_EXIT}, 1) 104ARM_DISABLE_TRUSTED_WDOG := 1 105endif 106$(eval $(call assert_boolean,ARM_DISABLE_TRUSTED_WDOG)) 107$(eval $(call add_define,ARM_DISABLE_TRUSTED_WDOG)) 108 109# Use translation tables library v1 if using Cortex-A5 110ifdef ARM_CORTEX_A5 111ARM_XLAT_TABLES_LIB_V1 := 1 112else 113ARM_XLAT_TABLES_LIB_V1 := 0 114endif 115$(eval $(call assert_boolean,ARM_XLAT_TABLES_LIB_V1)) 116$(eval $(call add_define,ARM_XLAT_TABLES_LIB_V1)) 117 118ifeq (${ARM_XLAT_TABLES_LIB_V1}, 1) 119 # Only use nonlpae version of xlatv1 otherwise use xlat v2 120 PLAT_BL_COMMON_SOURCES += lib/xlat_tables/${ARCH}/nonlpae_tables.c 121else 122 include lib/xlat_tables_v2/xlat_tables.mk 123 PLAT_BL_COMMON_SOURCES += ${XLAT_TABLES_LIB_SRCS} 124endif 125 126# Firmware Configuration Framework sources 127include lib/fconf/fconf.mk 128 129BL1_SOURCES += ${FCONF_SOURCES} ${FCONF_DYN_SOURCES} 130BL2_SOURCES += ${FCONF_SOURCES} ${FCONF_DYN_SOURCES} 131 132# Add `libfdt` and Arm common helpers required for Dynamic Config 133include lib/libfdt/libfdt.mk 134 135DYN_CFG_SOURCES += plat/arm/common/arm_dyn_cfg.c \ 136 plat/arm/common/arm_dyn_cfg_helpers.c 137 138DYN_CFG_SOURCES += ${FDT_WRAPPERS_SOURCES} 139