Usama Arif | 82e9509 | 2019-06-18 16:46:05 +0100 | [diff] [blame] | 1 | # |
Juan Pablo Conde | 6aba3b1 | 2023-08-09 13:19:21 -0500 | [diff] [blame] | 2 | # Copyright (c) 2019-2023, Arm Limited. All rights reserved. |
Usama Arif | 82e9509 | 2019-06-18 16:46:05 +0100 | [diff] [blame] | 3 | # |
| 4 | # SPDX-License-Identifier: BSD-3-Clause |
| 5 | # |
| 6 | |
Louis Mayencourt | 5a15b2d | 2019-10-17 14:46:51 +0100 | [diff] [blame] | 7 | # Firmware Configuration Framework sources |
Chris Kay | e927215 | 2021-09-28 15:52:14 +0100 | [diff] [blame] | 8 | include common/fdt_wrappers.mk |
Louis Mayencourt | 5a15b2d | 2019-10-17 14:46:51 +0100 | [diff] [blame] | 9 | include lib/fconf/fconf.mk |
| 10 | |
Chris Kay | b296ada | 2021-05-20 13:22:43 +0100 | [diff] [blame] | 11 | BL1_SOURCES += ${FCONF_SOURCES} ${FCONF_DYN_SOURCES} |
| 12 | BL2_SOURCES += ${FCONF_SOURCES} ${FCONF_DYN_SOURCES} |
| 13 | |
Usama Arif | 82e9509 | 2019-06-18 16:46:05 +0100 | [diff] [blame] | 14 | # Add `libfdt` and Arm common helpers required for Dynamic Config |
| 15 | include lib/libfdt/libfdt.mk |
| 16 | |
| 17 | DYN_CFG_SOURCES += plat/arm/common/arm_dyn_cfg.c \ |
Chris Kay | e927215 | 2021-09-28 15:52:14 +0100 | [diff] [blame] | 18 | plat/arm/common/arm_dyn_cfg_helpers.c |
| 19 | |
| 20 | DYN_CFG_SOURCES += ${FDT_WRAPPERS_SOURCES} |
Usama Arif | 82e9509 | 2019-06-18 16:46:05 +0100 | [diff] [blame] | 21 | |
Alexei Fedorov | caa1802 | 2020-07-14 10:47:25 +0100 | [diff] [blame] | 22 | # Include GICv2 driver files |
| 23 | include drivers/arm/gic/v2/gicv2.mk |
| 24 | |
| 25 | A5DS_GIC_SOURCES := ${GICV2_SOURCES} \ |
Usama Arif | 82e9509 | 2019-06-18 16:46:05 +0100 | [diff] [blame] | 26 | plat/common/plat_gicv2.c \ |
| 27 | plat/arm/common/arm_gicv2.c |
| 28 | |
| 29 | A5DS_SECURITY_SOURCES := plat/arm/board/a5ds/a5ds_security.c |
| 30 | |
| 31 | PLAT_INCLUDES := -Iplat/arm/board/a5ds/include |
| 32 | |
| 33 | PLAT_BL_COMMON_SOURCES := drivers/arm/pl011/${ARCH}/pl011_console.S \ |
| 34 | plat/arm/board/a5ds/a5ds_common.c \ |
| 35 | plat/arm/common/${ARCH}/arm_helpers.S \ |
| 36 | plat/arm/common/arm_common.c \ |
| 37 | plat/arm/common/arm_console.c \ |
| 38 | plat/arm/board/common/${ARCH}/board_arm_helpers.S |
| 39 | |
| 40 | A5DS_CPU_LIBS := lib/cpus/aarch32/cortex_a5.S |
| 41 | |
| 42 | BL1_SOURCES += drivers/io/io_fip.c \ |
| 43 | drivers/io/io_memmap.c \ |
| 44 | drivers/io/io_storage.c \ |
| 45 | drivers/cfi/v2m/v2m_flash.c \ |
| 46 | plat/arm/common/arm_bl1_setup.c \ |
| 47 | plat/arm/common/arm_err.c \ |
Ambroise Vincent | fa42c9e | 2019-07-04 14:58:45 +0100 | [diff] [blame] | 48 | plat/arm/board/a5ds/a5ds_err.c \ |
Usama Arif | 82e9509 | 2019-06-18 16:46:05 +0100 | [diff] [blame] | 49 | plat/arm/common/arm_io_storage.c \ |
Louis Mayencourt | 6b232d9 | 2020-02-28 16:57:30 +0000 | [diff] [blame] | 50 | plat/arm/common/fconf/arm_fconf_io.c \ |
Usama Arif | 82e9509 | 2019-06-18 16:46:05 +0100 | [diff] [blame] | 51 | plat/arm/board/a5ds/${ARCH}/a5ds_helpers.S \ |
| 52 | plat/arm/board/a5ds/a5ds_bl1_setup.c \ |
| 53 | lib/aarch32/arm32_aeabi_divmod.c \ |
| 54 | lib/aarch32/arm32_aeabi_divmod_a32.S \ |
| 55 | ${A5DS_CPU_LIBS} \ |
| 56 | ${DYN_CFG_SOURCES} |
| 57 | |
| 58 | BL2_SOURCES += lib/aarch32/arm32_aeabi_divmod.c \ |
| 59 | lib/aarch32/arm32_aeabi_divmod_a32.S \ |
| 60 | drivers/delay_timer/delay_timer.c \ |
| 61 | drivers/delay_timer/generic_delay_timer.c \ |
| 62 | drivers/cfi/v2m/v2m_flash.c \ |
| 63 | drivers/io/io_fip.c \ |
| 64 | drivers/io/io_memmap.c \ |
| 65 | drivers/io/io_storage.c \ |
| 66 | plat/arm/board/a5ds/a5ds_bl2_setup.c \ |
| 67 | plat/arm/common/arm_bl2_setup.c \ |
| 68 | plat/arm/common/arm_err.c \ |
Ambroise Vincent | fa42c9e | 2019-07-04 14:58:45 +0100 | [diff] [blame] | 69 | plat/arm/board/a5ds/a5ds_err.c \ |
Usama Arif | 82e9509 | 2019-06-18 16:46:05 +0100 | [diff] [blame] | 70 | plat/arm/common/arm_io_storage.c \ |
Louis Mayencourt | 6b232d9 | 2020-02-28 16:57:30 +0000 | [diff] [blame] | 71 | plat/arm/common/fconf/arm_fconf_io.c \ |
Usama Arif | 82e9509 | 2019-06-18 16:46:05 +0100 | [diff] [blame] | 72 | plat/arm/common/${ARCH}/arm_bl2_mem_params_desc.c \ |
| 73 | plat/arm/common/arm_image_load.c \ |
| 74 | common/desc_image_load.c \ |
| 75 | ${DYN_CFG_SOURCES} \ |
| 76 | ${A5DS_SECURITY_SOURCES} |
| 77 | |
| 78 | # Add the FDT_SOURCES and options for Dynamic Config (only for Unix env) |
| 79 | ifdef UNIX_MK |
| 80 | |
Manish V Badarkhe | 64616a5 | 2020-05-31 08:53:40 +0100 | [diff] [blame] | 81 | FW_CONFIG := ${BUILD_PLAT}/fdts/a5ds_fw_config.dtb |
| 82 | TB_FW_CONFIG := ${BUILD_PLAT}/fdts/a5ds_tb_fw_config.dtb |
Usama Arif | 82e9509 | 2019-06-18 16:46:05 +0100 | [diff] [blame] | 83 | |
| 84 | # Add the TB_FW_CONFIG to FIP and specify the same to certtool |
Anders Dellien | 3f69474 | 2020-08-23 19:32:48 +0100 | [diff] [blame] | 85 | $(eval $(call TOOL_ADD_PAYLOAD,${TB_FW_CONFIG},--tb-fw-config,${TB_FW_CONFIG})) |
Manish V Badarkhe | 64616a5 | 2020-05-31 08:53:40 +0100 | [diff] [blame] | 86 | # Add the FW_CONFIG to FIP and specify the same to certtool |
Anders Dellien | 3f69474 | 2020-08-23 19:32:48 +0100 | [diff] [blame] | 87 | $(eval $(call TOOL_ADD_PAYLOAD,${FW_CONFIG},--fw-config,${FW_CONFIG})) |
Usama Arif | 82e9509 | 2019-06-18 16:46:05 +0100 | [diff] [blame] | 88 | |
| 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 Dellien | 3f69474 | 2020-08-23 19:32:48 +0100 | [diff] [blame] | 92 | $(eval $(call TOOL_ADD_PAYLOAD,${FVP_HW_CONFIG},--hw-config,${FVP_HW_CONFIG})) |
Usama Arif | 82e9509 | 2019-06-18 16:46:05 +0100 | [diff] [blame] | 93 | |
Louis Mayencourt | 6d2b573 | 2019-12-17 13:17:25 +0000 | [diff] [blame] | 94 | FDT_SOURCES += plat/arm/board/a5ds/fdts/a5ds_fw_config.dts \ |
Manish V Badarkhe | 64616a5 | 2020-05-31 08:53:40 +0100 | [diff] [blame] | 95 | plat/arm/board/a5ds/fdts/a5ds_tb_fw_config.dts \ |
Usama Arif | 82e9509 | 2019-06-18 16:46:05 +0100 | [diff] [blame] | 96 | ${FVP_HW_CONFIG_DTS} |
| 97 | endif |
| 98 | |
| 99 | NEED_BL32 := yes |
| 100 | |
Juan Pablo Conde | 6aba3b1 | 2023-08-09 13:19:21 -0500 | [diff] [blame] | 101 | ifeq (${AARCH32_SP},none) |
| 102 | $(error Variable AARCH32_SP has to be set for AArch32) |
| 103 | endif |
| 104 | |
Usama Arif | 82e9509 | 2019-06-18 16:46:05 +0100 | [diff] [blame] | 105 | MULTI_CONSOLE_API := 1 |
| 106 | |
Manish Pandey | 139126a | 2023-05-02 13:43:22 +0100 | [diff] [blame] | 107 | ARM_DISABLE_TRUSTED_WDOG := 1 |
| 108 | |
Usama Arif | 82e9509 | 2019-06-18 16:46:05 +0100 | [diff] [blame] | 109 | PLAT_BL_COMMON_SOURCES += lib/xlat_tables/aarch32/nonlpae_tables.c |
| 110 | |
| 111 | # Use translation tables library v1 when using Cortex-A5 |
| 112 | ARM_XLAT_TABLES_LIB_V1 := 1 |
| 113 | $(eval $(call assert_boolean,ARM_XLAT_TABLES_LIB_V1)) |
| 114 | $(eval $(call add_define,ARM_XLAT_TABLES_LIB_V1)) |
| 115 | |
| 116 | $(eval $(call assert_boolean,ARM_DISABLE_TRUSTED_WDOG)) |
| 117 | $(eval $(call add_define,ARM_DISABLE_TRUSTED_WDOG)) |