Usama Arif | e97998f | 2018-11-30 15:43:56 +0000 | [diff] [blame] | 1 | # |
Louis Mayencourt | 5a15b2d | 2019-10-17 14:46:51 +0100 | [diff] [blame] | 2 | # Copyright (c) 2019-2020, Arm Limited. All rights reserved. |
Usama Arif | e97998f | 2018-11-30 15:43:56 +0000 | [diff] [blame] | 3 | # |
| 4 | # SPDX-License-Identifier: BSD-3-Clause |
| 5 | # |
| 6 | |
| 7 | ifdef ARM_CORTEX_A5 |
| 8 | # Use the SP804 timer instead of the generic one |
| 9 | FVP_VE_USE_SP804_TIMER := 1 |
| 10 | $(eval $(call add_define,FVP_VE_USE_SP804_TIMER)) |
| 11 | BL2_SOURCES += drivers/arm/sp804/sp804_delay_timer.c |
| 12 | endif |
| 13 | |
Alexei Fedorov | caa1802 | 2020-07-14 10:47:25 +0100 | [diff] [blame] | 14 | # Include GICv2 driver files |
| 15 | include drivers/arm/gic/v2/gicv2.mk |
| 16 | |
| 17 | FVP_VE_GIC_SOURCES := ${GICV2_SOURCES} \ |
| 18 | plat/common/plat_gicv2.c \ |
Usama Arif | e97998f | 2018-11-30 15:43:56 +0000 | [diff] [blame] | 19 | plat/arm/common/arm_gicv2.c |
| 20 | |
| 21 | FVP_VE_SECURITY_SOURCES := plat/arm/board/fvp_ve/fvp_ve_security.c |
| 22 | |
| 23 | PLAT_INCLUDES := -Iplat/arm/board/fvp_ve/include |
| 24 | |
| 25 | PLAT_BL_COMMON_SOURCES := plat/arm/board/fvp_ve/fvp_ve_common.c \ |
| 26 | plat/arm/common/${ARCH}/arm_helpers.S \ |
| 27 | plat/arm/common/arm_common.c \ |
| 28 | plat/arm/common/arm_console.c \ |
| 29 | drivers/arm/pl011/${ARCH}/pl011_console.S \ |
| 30 | plat/arm/board/common/${ARCH}/board_arm_helpers.S |
| 31 | |
| 32 | ifdef ARM_CORTEX_A5 |
| 33 | FVP_VE_CPU_LIBS := lib/cpus/aarch32/cortex_a5.S |
| 34 | else |
| 35 | FVP_VE_CPU_LIBS := lib/cpus/aarch32/cortex_a7.S |
| 36 | endif |
| 37 | |
| 38 | BL1_SOURCES += drivers/arm/sp805/sp805.c \ |
| 39 | drivers/io/io_fip.c \ |
| 40 | drivers/io/io_memmap.c \ |
| 41 | drivers/io/io_storage.c \ |
| 42 | plat/arm/common/arm_bl1_setup.c \ |
| 43 | plat/arm/common/arm_err.c \ |
Ambroise Vincent | fa42c9e | 2019-07-04 14:58:45 +0100 | [diff] [blame] | 44 | plat/arm/board/fvp_ve/fvp_ve_err.c \ |
Usama Arif | e97998f | 2018-11-30 15:43:56 +0000 | [diff] [blame] | 45 | plat/arm/common/arm_io_storage.c \ |
Louis Mayencourt | 6b232d9 | 2020-02-28 16:57:30 +0000 | [diff] [blame] | 46 | plat/arm/common/fconf/arm_fconf_io.c \ |
Usama Arif | e97998f | 2018-11-30 15:43:56 +0000 | [diff] [blame] | 47 | drivers/cfi/v2m/v2m_flash.c \ |
| 48 | plat/arm/board/fvp_ve/${ARCH}/fvp_ve_helpers.S \ |
| 49 | plat/arm/board/fvp_ve/fvp_ve_bl1_setup.c \ |
| 50 | lib/aarch32/arm32_aeabi_divmod.c \ |
| 51 | lib/aarch32/arm32_aeabi_divmod_a32.S \ |
| 52 | ${FVP_VE_CPU_LIBS} \ |
| 53 | ${DYN_CFG_SOURCES} |
| 54 | |
| 55 | BL2_SOURCES += plat/arm/board/fvp_ve/fvp_ve_bl2_setup.c \ |
| 56 | lib/aarch32/arm32_aeabi_divmod.c \ |
| 57 | lib/aarch32/arm32_aeabi_divmod_a32.S \ |
| 58 | drivers/delay_timer/delay_timer.c \ |
| 59 | drivers/delay_timer/generic_delay_timer.c \ |
| 60 | drivers/cfi/v2m/v2m_flash.c \ |
| 61 | drivers/io/io_fip.c \ |
| 62 | drivers/io/io_memmap.c \ |
| 63 | drivers/io/io_storage.c \ |
| 64 | plat/arm/common/arm_bl2_setup.c \ |
| 65 | plat/arm/common/arm_err.c \ |
Ambroise Vincent | fa42c9e | 2019-07-04 14:58:45 +0100 | [diff] [blame] | 66 | plat/arm/board/fvp_ve/fvp_ve_err.c \ |
Usama Arif | e97998f | 2018-11-30 15:43:56 +0000 | [diff] [blame] | 67 | plat/arm/common/arm_io_storage.c \ |
Louis Mayencourt | 6b232d9 | 2020-02-28 16:57:30 +0000 | [diff] [blame] | 68 | plat/arm/common/fconf/arm_fconf_io.c \ |
Usama Arif | e97998f | 2018-11-30 15:43:56 +0000 | [diff] [blame] | 69 | plat/arm/common/${ARCH}/arm_bl2_mem_params_desc.c \ |
| 70 | plat/arm/common/arm_image_load.c \ |
| 71 | common/desc_image_load.c \ |
| 72 | ${DYN_CFG_SOURCES} \ |
| 73 | ${FVP_VE_SECURITY_SOURCES} |
| 74 | |
| 75 | # Add the FDT_SOURCES and options for Dynamic Config (only for Unix env) |
| 76 | ifdef UNIX_MK |
| 77 | |
Manish V Badarkhe | 64616a5 | 2020-05-31 08:53:40 +0100 | [diff] [blame] | 78 | FDT_SOURCES += plat/arm/board/fvp_ve/fdts/fvp_ve_fw_config.dts \ |
| 79 | plat/arm/board/fvp_ve/fdts/fvp_ve_tb_fw_config.dts |
Usama Arif | e97998f | 2018-11-30 15:43:56 +0000 | [diff] [blame] | 80 | |
Manish V Badarkhe | 64616a5 | 2020-05-31 08:53:40 +0100 | [diff] [blame] | 81 | FVP_FW_CONFIG := ${BUILD_PLAT}/fdts/fvp_ve_fw_config.dtb |
| 82 | FVP_TB_FW_CONFIG := ${BUILD_PLAT}/fdts/fvp_ve_tb_fw_config.dtb |
Usama Arif | e97998f | 2018-11-30 15:43:56 +0000 | [diff] [blame] | 83 | |
Manish V Badarkhe | 64616a5 | 2020-05-31 08:53:40 +0100 | [diff] [blame] | 84 | # Add the FW_CONFIG to FIP and specify the same to certtool |
| 85 | $(eval $(call TOOL_ADD_PAYLOAD,${FVP_FW_CONFIG},--fw-config)) |
Usama Arif | e97998f | 2018-11-30 15:43:56 +0000 | [diff] [blame] | 86 | # Add the TB_FW_CONFIG to FIP and specify the same to certtool |
| 87 | $(eval $(call TOOL_ADD_PAYLOAD,${FVP_TB_FW_CONFIG},--tb-fw-config)) |
| 88 | |
| 89 | FDT_SOURCES += ${FVP_HW_CONFIG_DTS} |
| 90 | $(eval FVP_HW_CONFIG := ${BUILD_PLAT}/$(patsubst %.dts,%.dtb, \ |
| 91 | fdts/$(notdir ${FVP_HW_CONFIG_DTS}))) |
| 92 | # Add the HW_CONFIG to FIP and specify the same to certtool |
| 93 | $(eval $(call TOOL_ADD_PAYLOAD,${FVP_HW_CONFIG},--hw-config)) |
| 94 | endif |
| 95 | |
| 96 | NEED_BL32 := yes |
| 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 |
| 102 | ARM_DISABLE_TRUSTED_WDOG := 0 |
| 103 | ifeq (${SPIN_ON_BL1_EXIT}, 1) |
| 104 | ARM_DISABLE_TRUSTED_WDOG := 1 |
| 105 | endif |
| 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 |
| 110 | ifdef ARM_CORTEX_A5 |
| 111 | ARM_XLAT_TABLES_LIB_V1 := 1 |
| 112 | else |
| 113 | ARM_XLAT_TABLES_LIB_V1 := 0 |
| 114 | endif |
| 115 | $(eval $(call assert_boolean,ARM_XLAT_TABLES_LIB_V1)) |
| 116 | $(eval $(call add_define,ARM_XLAT_TABLES_LIB_V1)) |
| 117 | |
Usama Arif | e97998f | 2018-11-30 15:43:56 +0000 | [diff] [blame] | 118 | ifeq (${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 |
| 121 | else |
| 122 | include lib/xlat_tables_v2/xlat_tables.mk |
| 123 | PLAT_BL_COMMON_SOURCES += ${XLAT_TABLES_LIB_SRCS} |
| 124 | endif |
| 125 | |
Louis Mayencourt | 5a15b2d | 2019-10-17 14:46:51 +0100 | [diff] [blame] | 126 | # Firmware Configuration Framework sources |
| 127 | include lib/fconf/fconf.mk |
| 128 | |
Usama Arif | e97998f | 2018-11-30 15:43:56 +0000 | [diff] [blame] | 129 | # Add `libfdt` and Arm common helpers required for Dynamic Config |
| 130 | include lib/libfdt/libfdt.mk |
| 131 | |
| 132 | DYN_CFG_SOURCES += plat/arm/common/arm_dyn_cfg.c \ |
| 133 | plat/arm/common/arm_dyn_cfg_helpers.c \ |
| 134 | common/fdt_wrappers.c |
| 135 | |