Usama Arif | e97998f | 2018-11-30 15:43:56 +0000 | [diff] [blame] | 1 | # |
| 2 | # Copyright (c) 2019, Arm Limited. All rights reserved. |
| 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 | |
| 14 | FVP_VE_GIC_SOURCES := drivers/arm/gic/common/gic_common.c \ |
| 15 | drivers/arm/gic/v2/gicv2_main.c \ |
| 16 | drivers/arm/gic/v2/gicv2_helpers.c \ |
| 17 | plat/common/plat_gicv2.c \ |
| 18 | plat/arm/common/arm_gicv2.c |
| 19 | |
| 20 | FVP_VE_SECURITY_SOURCES := plat/arm/board/fvp_ve/fvp_ve_security.c |
| 21 | |
| 22 | PLAT_INCLUDES := -Iplat/arm/board/fvp_ve/include |
| 23 | |
| 24 | PLAT_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 | |
| 31 | ifdef ARM_CORTEX_A5 |
| 32 | FVP_VE_CPU_LIBS := lib/cpus/aarch32/cortex_a5.S |
| 33 | else |
| 34 | FVP_VE_CPU_LIBS := lib/cpus/aarch32/cortex_a7.S |
| 35 | endif |
| 36 | |
| 37 | BL1_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 Vincent | fa42c9e | 2019-07-04 14:58:45 +0100 | [diff] [blame] | 43 | plat/arm/board/fvp_ve/fvp_ve_err.c \ |
Usama Arif | e97998f | 2018-11-30 15:43:56 +0000 | [diff] [blame] | 44 | plat/arm/common/arm_io_storage.c \ |
| 45 | drivers/cfi/v2m/v2m_flash.c \ |
| 46 | plat/arm/board/fvp_ve/${ARCH}/fvp_ve_helpers.S \ |
| 47 | plat/arm/board/fvp_ve/fvp_ve_bl1_setup.c \ |
| 48 | lib/aarch32/arm32_aeabi_divmod.c \ |
| 49 | lib/aarch32/arm32_aeabi_divmod_a32.S \ |
| 50 | ${FVP_VE_CPU_LIBS} \ |
| 51 | ${DYN_CFG_SOURCES} |
| 52 | |
| 53 | BL2_SOURCES += plat/arm/board/fvp_ve/fvp_ve_bl2_setup.c \ |
| 54 | lib/aarch32/arm32_aeabi_divmod.c \ |
| 55 | lib/aarch32/arm32_aeabi_divmod_a32.S \ |
| 56 | drivers/delay_timer/delay_timer.c \ |
| 57 | drivers/delay_timer/generic_delay_timer.c \ |
| 58 | drivers/cfi/v2m/v2m_flash.c \ |
| 59 | drivers/io/io_fip.c \ |
| 60 | drivers/io/io_memmap.c \ |
| 61 | drivers/io/io_storage.c \ |
| 62 | plat/arm/common/arm_bl2_setup.c \ |
| 63 | plat/arm/common/arm_err.c \ |
Ambroise Vincent | fa42c9e | 2019-07-04 14:58:45 +0100 | [diff] [blame] | 64 | plat/arm/board/fvp_ve/fvp_ve_err.c \ |
Usama Arif | e97998f | 2018-11-30 15:43:56 +0000 | [diff] [blame] | 65 | plat/arm/common/arm_io_storage.c \ |
| 66 | plat/arm/common/${ARCH}/arm_bl2_mem_params_desc.c \ |
| 67 | plat/arm/common/arm_image_load.c \ |
| 68 | common/desc_image_load.c \ |
| 69 | ${DYN_CFG_SOURCES} \ |
| 70 | ${FVP_VE_SECURITY_SOURCES} |
| 71 | |
| 72 | # Add the FDT_SOURCES and options for Dynamic Config (only for Unix env) |
| 73 | ifdef UNIX_MK |
| 74 | |
| 75 | FDT_SOURCES += plat/arm/board/fvp_ve/fdts/fvp_ve_tb_fw_config.dts |
| 76 | |
| 77 | FVP_TB_FW_CONFIG := ${BUILD_PLAT}/fdts/fvp_ve_tb_fw_config.dtb |
| 78 | |
| 79 | # Add the TB_FW_CONFIG to FIP and specify the same to certtool |
| 80 | $(eval $(call TOOL_ADD_PAYLOAD,${FVP_TB_FW_CONFIG},--tb-fw-config)) |
| 81 | |
| 82 | FDT_SOURCES += ${FVP_HW_CONFIG_DTS} |
| 83 | $(eval FVP_HW_CONFIG := ${BUILD_PLAT}/$(patsubst %.dts,%.dtb, \ |
| 84 | fdts/$(notdir ${FVP_HW_CONFIG_DTS}))) |
| 85 | # Add the HW_CONFIG to FIP and specify the same to certtool |
| 86 | $(eval $(call TOOL_ADD_PAYLOAD,${FVP_HW_CONFIG},--hw-config)) |
| 87 | endif |
| 88 | |
| 89 | NEED_BL32 := yes |
| 90 | |
| 91 | # Modification of arm_common.mk |
| 92 | |
| 93 | # Process ARM_DISABLE_TRUSTED_WDOG flag |
| 94 | # By default, Trusted Watchdog is always enabled unless SPIN_ON_BL1_EXIT is set |
| 95 | ARM_DISABLE_TRUSTED_WDOG := 0 |
| 96 | ifeq (${SPIN_ON_BL1_EXIT}, 1) |
| 97 | ARM_DISABLE_TRUSTED_WDOG := 1 |
| 98 | endif |
| 99 | $(eval $(call assert_boolean,ARM_DISABLE_TRUSTED_WDOG)) |
| 100 | $(eval $(call add_define,ARM_DISABLE_TRUSTED_WDOG)) |
| 101 | |
| 102 | # Use translation tables library v1 if using Cortex-A5 |
| 103 | ifdef ARM_CORTEX_A5 |
| 104 | ARM_XLAT_TABLES_LIB_V1 := 1 |
| 105 | else |
| 106 | ARM_XLAT_TABLES_LIB_V1 := 0 |
| 107 | endif |
| 108 | $(eval $(call assert_boolean,ARM_XLAT_TABLES_LIB_V1)) |
| 109 | $(eval $(call add_define,ARM_XLAT_TABLES_LIB_V1)) |
| 110 | |
Usama Arif | e97998f | 2018-11-30 15:43:56 +0000 | [diff] [blame] | 111 | ifeq (${ARM_XLAT_TABLES_LIB_V1}, 1) |
| 112 | # Only use nonlpae version of xlatv1 otherwise use xlat v2 |
| 113 | PLAT_BL_COMMON_SOURCES += lib/xlat_tables/${ARCH}/nonlpae_tables.c |
| 114 | else |
| 115 | include lib/xlat_tables_v2/xlat_tables.mk |
| 116 | PLAT_BL_COMMON_SOURCES += ${XLAT_TABLES_LIB_SRCS} |
| 117 | endif |
| 118 | |
| 119 | # Add `libfdt` and Arm common helpers required for Dynamic Config |
| 120 | include lib/libfdt/libfdt.mk |
| 121 | |
| 122 | DYN_CFG_SOURCES += plat/arm/common/arm_dyn_cfg.c \ |
| 123 | plat/arm/common/arm_dyn_cfg_helpers.c \ |
| 124 | common/fdt_wrappers.c |
| 125 | |