blob: 35d6bc7e7ba11312fbe51110f97ef65449d9aac9 [file] [log] [blame]
Michal Simek2a47faa2023-04-14 08:43:51 +02001# Copyright (c) 2018-2021, Arm Limited and Contributors. All rights reserved.
Jay Buddhabhatti26e138a2022-12-21 23:03:35 -08002# Copyright (c) 2022-2023, Advanced Micro Devices, Inc. All rights reserved.
Siva Durga Prasad Paladugufe4af662018-09-25 18:44:58 +05303#
4# SPDX-License-Identifier: BSD-3-Clause
5
6override PROGRAMMABLE_RESET_ADDRESS := 1
7PSCI_EXTENDED_STATE_ID := 1
8A53_DISABLE_NON_TEMPORAL_HINT := 0
9SEPARATE_CODE_AND_RODATA := 1
10override RESET_TO_BL31 := 1
11PL011_GENERIC_UART := 1
Venkatesh Yadav Abbarapu78bcd122021-02-19 01:46:21 -070012IPI_CRC_CHECK := 0
Venkatesh Yadav Abbarapu82252a42021-07-20 22:27:32 -060013HARDEN_SLS_ALL := 0
Siva Durga Prasad Paladugufe4af662018-09-25 18:44:58 +053014
Michal Simek1cda4b02022-10-07 08:15:19 +020015# A72 Erratum for SoC
16ERRATA_A72_859971 := 1
17ERRATA_A72_1319367 := 1
18
Siva Durga Prasad Paladugufe4af662018-09-25 18:44:58 +053019ifdef VERSAL_ATF_MEM_BASE
20 $(eval $(call add_define,VERSAL_ATF_MEM_BASE))
21
22 ifndef VERSAL_ATF_MEM_SIZE
23 $(error "VERSAL_ATF_BASE defined without VERSAL_ATF_SIZE")
24 endif
25 $(eval $(call add_define,VERSAL_ATF_MEM_SIZE))
26
27 ifdef VERSAL_ATF_MEM_PROGBITS_SIZE
28 $(eval $(call add_define,VERSAL_ATF_MEM_PROGBITS_SIZE))
29 endif
30endif
31
32ifdef VERSAL_BL32_MEM_BASE
33 $(eval $(call add_define,VERSAL_BL32_MEM_BASE))
34
35 ifndef VERSAL_BL32_MEM_SIZE
36 $(error "VERSAL_BL32_BASE defined without VERSAL_BL32_SIZE")
37 endif
38 $(eval $(call add_define,VERSAL_BL32_MEM_SIZE))
39endif
40
Venkatesh Yadav Abbarapu78bcd122021-02-19 01:46:21 -070041ifdef IPI_CRC_CHECK
42 $(eval $(call add_define,IPI_CRC_CHECK))
43endif
44
Siva Durga Prasad Paladugucbc90052019-07-10 16:15:19 +053045VERSAL_PLATFORM ?= silicon
Siva Durga Prasad Paladugufe4af662018-09-25 18:44:58 +053046$(eval $(call add_define_val,VERSAL_PLATFORM,VERSAL_PLATFORM_ID_${VERSAL_PLATFORM}))
47
Amit Nagal3a7d3042023-07-10 10:32:15 +053048ifdef XILINX_OF_BOARD_DTB_ADDR
49$(eval $(call add_define,XILINX_OF_BOARD_DTB_ADDR))
50endif
51
Amit Nagalc1248e82023-09-04 21:53:59 -120052PLAT_XLAT_TABLES_DYNAMIC := 0
53ifeq (${PLAT_XLAT_TABLES_DYNAMIC},1)
54$(eval $(call add_define,PLAT_XLAT_TABLES_DYNAMIC))
55endif
56
Amit Nagal5f398072023-10-30 12:08:34 +053057# enable assert() for release/debug builds
58ENABLE_ASSERTIONS := 1
59
Tejas Patel54d13192019-02-27 18:44:55 +053060PLAT_INCLUDES := -Iinclude/plat/arm/common/ \
61 -Iplat/xilinx/common/include/ \
Wendy Lianga4494de2019-01-21 13:45:49 +053062 -Iplat/xilinx/common/ipi_mailbox_service/ \
Tejas Patel354fe572018-12-14 00:55:37 -080063 -Iplat/xilinx/versal/include/ \
64 -Iplat/xilinx/versal/pm_service/
Siva Durga Prasad Paladugufe4af662018-09-25 18:44:58 +053065
Amit Nagal3a7d3042023-07-10 10:32:15 +053066include lib/libfdt/libfdt.mk
Alexei Fedorov84f1b5d2020-03-23 18:45:17 +000067# Include GICv3 driver files
68include drivers/arm/gic/v3/gicv3.mk
Michal Simek058251a2023-04-13 13:19:11 +020069include lib/xlat_tables_v2/xlat_tables.mk
Alexei Fedorov84f1b5d2020-03-23 18:45:17 +000070
Michal Simek058251a2023-04-13 13:19:11 +020071PLAT_BL_COMMON_SOURCES := drivers/arm/dcc/dcc_console.c \
Siva Durga Prasad Paladugufe4af662018-09-25 18:44:58 +053072 drivers/delay_timer/delay_timer.c \
73 drivers/delay_timer/generic_delay_timer.c \
Alexei Fedorov84f1b5d2020-03-23 18:45:17 +000074 ${GICV3_SOURCES} \
Siva Durga Prasad Paladugufe4af662018-09-25 18:44:58 +053075 drivers/arm/pl011/aarch64/pl011_console.S \
Ambroise Vincent962109f2019-03-27 13:48:15 +000076 plat/common/aarch64/crash_console_helpers.S \
Tejas Patel54d13192019-02-27 18:44:55 +053077 plat/arm/common/arm_cci.c \
Venkatesh Yadav Abbarapu9156ffd2020-01-22 21:23:20 -070078 plat/arm/common/arm_common.c \
Siva Durga Prasad Paladugufe4af662018-09-25 18:44:58 +053079 plat/common/plat_gicv3.c \
80 plat/xilinx/versal/aarch64/versal_helpers.S \
Michal Simek058251a2023-04-13 13:19:11 +020081 plat/xilinx/versal/aarch64/versal_common.c \
82 ${XLAT_TABLES_LIB_SRCS}
Siva Durga Prasad Paladugufe4af662018-09-25 18:44:58 +053083
Venkatesh Yadav Abbarapu17a12ce2020-11-27 08:42:14 -070084VERSAL_CONSOLE ?= pl011
85ifeq (${VERSAL_CONSOLE}, $(filter ${VERSAL_CONSOLE},pl011 pl011_0 pl011_1 dcc))
86else
87 $(error "Please define VERSAL_CONSOLE")
88endif
89
90$(eval $(call add_define_val,VERSAL_CONSOLE,VERSAL_CONSOLE_ID_${VERSAL_CONSOLE}))
91
Tejas Patel54d13192019-02-27 18:44:55 +053092BL31_SOURCES += drivers/arm/cci/cci.c \
Siva Durga Prasad Paladugufe4af662018-09-25 18:44:58 +053093 lib/cpus/aarch64/cortex_a72.S \
Prasad Kummari4d068a42023-09-19 22:16:12 +053094 common/fdt_wrappers.c \
Siva Durga Prasad Paladugufe4af662018-09-25 18:44:58 +053095 plat/common/plat_psci_common.c \
Tejas Patel354fe572018-12-14 00:55:37 -080096 plat/xilinx/common/ipi.c \
Amit Nagal3a7d3042023-07-10 10:32:15 +053097 plat/xilinx/common/plat_fdt.c \
Prasad Kummari4d068a42023-09-19 22:16:12 +053098 plat/xilinx/common/plat_console.c \
Prasad Kummari2038bd62023-12-14 10:52:24 +053099 plat/xilinx/common/plat_clkfunc.c \
Venkatesh Yadav Abbarapu9156ffd2020-01-22 21:23:20 -0700100 plat/xilinx/common/plat_startup.c \
Wendy Lianga4494de2019-01-21 13:45:49 +0530101 plat/xilinx/common/ipi_mailbox_service/ipi_mailbox_svc.c \
Tejas Patel354fe572018-12-14 00:55:37 -0800102 plat/xilinx/common/pm_service/pm_ipi.c \
Jay Buddhabhatti26e138a2022-12-21 23:03:35 -0800103 plat/xilinx/common/pm_service/pm_api_sys.c \
104 plat/xilinx/common/pm_service/pm_svc_main.c \
Akshay Belsare589ccce2023-05-08 19:00:53 +0530105 plat/xilinx/common/versal.c \
Siva Durga Prasad Paladugufe4af662018-09-25 18:44:58 +0530106 plat/xilinx/versal/bl31_versal_setup.c \
107 plat/xilinx/versal/plat_psci.c \
108 plat/xilinx/versal/plat_versal.c \
109 plat/xilinx/versal/plat_topology.c \
110 plat/xilinx/versal/sip_svc_setup.c \
Tejas Patel354fe572018-12-14 00:55:37 -0800111 plat/xilinx/versal/versal_gicv3.c \
112 plat/xilinx/versal/versal_ipi.c \
Amit Nagal3a7d3042023-07-10 10:32:15 +0530113 plat/xilinx/versal/pm_service/pm_client.c \
114 common/fdt_fixup.c \
115 ${LIBFDT_SRCS}
Venkatesh Yadav Abbarapu82252a42021-07-20 22:27:32 -0600116
117ifeq ($(HARDEN_SLS_ALL), 1)
118TF_CFLAGS_aarch64 += -mharden-sls=all
119endif
Prasad Kummari4acc8d02023-12-19 11:36:03 +0530120
121ifeq (${ERRATA_ABI_SUPPORT}, 1)
122# enable the cpu macros for errata abi interface
123CORTEX_A72_H_INC := 1
124$(eval $(call add_define, CORTEX_A72_H_INC))
125endif