Antonio Nino Diaz | 493bf33 | 2016-12-14 14:31:32 +0000 | [diff] [blame] | 1 | # |
Michal Simek | 2a47faa | 2023-04-14 08:43:51 +0200 | [diff] [blame] | 2 | # Copyright (c) 2013-2021, Arm Limited and Contributors. All rights reserved. |
Jeremie Corbier | 9e1873f | 2021-09-07 11:49:58 +0200 | [diff] [blame] | 3 | # Portions copyright (c) 2021-2022, ProvenRun S.A.S. All rights reserved. |
Akshay Belsare | ec0afc8 | 2023-02-27 12:04:26 +0530 | [diff] [blame] | 4 | # Copyright (c) 2018-2022, Xilinx, Inc. All rights reserved. |
| 5 | # Copyright (c) 2022-2023, Advanced Micro Devices, Inc. All rights reserved. |
Soren Brinkmann | 76fcae3 | 2016-03-06 20:16:27 -0800 | [diff] [blame] | 6 | # |
dp-arm | fa3cf0b | 2017-05-03 09:38:09 +0100 | [diff] [blame] | 7 | # SPDX-License-Identifier: BSD-3-Clause |
Soren Brinkmann | 76fcae3 | 2016-03-06 20:16:27 -0800 | [diff] [blame] | 8 | |
Soren Brinkmann | ba8309d | 2017-04-06 11:44:27 -0700 | [diff] [blame] | 9 | override ERRATA_A53_855873 := 1 |
Michal Simek | 81ec0d1 | 2023-02-09 13:21:10 +0100 | [diff] [blame] | 10 | ERRATA_A53_1530924 := 1 |
Masahiro Yamada | 8cf895c | 2016-12-19 17:41:47 +0900 | [diff] [blame] | 11 | override PROGRAMMABLE_RESET_ADDRESS := 1 |
Soren Brinkmann | 76fcae3 | 2016-03-06 20:16:27 -0800 | [diff] [blame] | 12 | PSCI_EXTENDED_STATE_ID := 1 |
| 13 | A53_DISABLE_NON_TEMPORAL_HINT := 0 |
Soren Brinkmann | 6d1ba58 | 2016-07-08 14:45:14 -0700 | [diff] [blame] | 14 | SEPARATE_CODE_AND_RODATA := 1 |
Siva Durga Prasad Paladugu | efd431b | 2018-04-30 20:12:12 +0530 | [diff] [blame] | 15 | ZYNQMP_WDT_RESTART := 0 |
Venkatesh Yadav Abbarapu | bfa2a2a | 2021-02-19 01:40:14 -0700 | [diff] [blame] | 16 | IPI_CRC_CHECK := 0 |
Masahiro Yamada | 8cf895c | 2016-12-19 17:41:47 +0900 | [diff] [blame] | 17 | override RESET_TO_BL31 := 1 |
Siva Durga Prasad Paladugu | 60bfbc9 | 2018-09-24 22:51:49 -0700 | [diff] [blame] | 18 | override WARMBOOT_ENABLE_DCACHE_EARLY := 1 |
Soren Brinkmann | 76fcae3 | 2016-03-06 20:16:27 -0800 | [diff] [blame] | 19 | |
Jan Kiszka | e1407fc | 2020-07-14 22:36:59 +0200 | [diff] [blame] | 20 | EL3_EXCEPTION_HANDLING := $(SDEI_SUPPORT) |
| 21 | |
Jeremie Corbier | 9e1873f | 2021-09-07 11:49:58 +0200 | [diff] [blame] | 22 | # pncd SPD requires secure SGI to be handled at EL1 |
Prasad Kummari | e3af72f | 2023-07-14 16:32:19 +0530 | [diff] [blame] | 23 | ifeq (${SPD}, $(filter ${SPD},pncd tspd)) |
Jeremie Corbier | 9e1873f | 2021-09-07 11:49:58 +0200 | [diff] [blame] | 24 | ifeq (${ZYNQMP_WDT_RESTART},1) |
| 25 | $(error "Error: ZYNQMP_WDT_RESTART and SPD=pncd are incompatible") |
| 26 | endif |
| 27 | override GICV2_G0_FOR_EL3 := 0 |
| 28 | else |
| 29 | override GICV2_G0_FOR_EL3 := 1 |
| 30 | endif |
| 31 | |
David Cunado | c5b0c0f | 2017-10-31 23:19:21 +0000 | [diff] [blame] | 32 | # Do not enable SVE |
| 33 | ENABLE_SVE_FOR_NS := 0 |
| 34 | |
Dimitris Papastamos | 8e5bd5e | 2018-01-24 16:41:14 +0000 | [diff] [blame] | 35 | WORKAROUND_CVE_2017_5715 := 0 |
| 36 | |
Venkatesh Yadav Abbarapu | d90e47b | 2022-07-28 08:50:30 +0530 | [diff] [blame] | 37 | ARM_XLAT_TABLES_LIB_V1 := 1 |
Venkatesh Yadav Abbarapu | 6d7f1e8 | 2022-05-06 14:07:15 +0530 | [diff] [blame] | 38 | $(eval $(call assert_boolean,ARM_XLAT_TABLES_LIB_V1)) |
| 39 | $(eval $(call add_define,ARM_XLAT_TABLES_LIB_V1)) |
| 40 | |
Soren Brinkmann | 4a9ca04 | 2016-04-14 10:27:00 -0700 | [diff] [blame] | 41 | ifdef ZYNQMP_ATF_MEM_BASE |
| 42 | $(eval $(call add_define,ZYNQMP_ATF_MEM_BASE)) |
| 43 | |
| 44 | ifndef ZYNQMP_ATF_MEM_SIZE |
| 45 | $(error "ZYNQMP_ATF_BASE defined without ZYNQMP_ATF_SIZE") |
| 46 | endif |
| 47 | $(eval $(call add_define,ZYNQMP_ATF_MEM_SIZE)) |
Soren Brinkmann | 76fcae3 | 2016-03-06 20:16:27 -0800 | [diff] [blame] | 48 | |
Soren Brinkmann | 4a9ca04 | 2016-04-14 10:27:00 -0700 | [diff] [blame] | 49 | ifdef ZYNQMP_ATF_MEM_PROGBITS_SIZE |
| 50 | $(eval $(call add_define,ZYNQMP_ATF_MEM_PROGBITS_SIZE)) |
| 51 | endif |
Soren Brinkmann | 76fcae3 | 2016-03-06 20:16:27 -0800 | [diff] [blame] | 52 | endif |
| 53 | |
Soren Brinkmann | 4a9ca04 | 2016-04-14 10:27:00 -0700 | [diff] [blame] | 54 | ifdef ZYNQMP_BL32_MEM_BASE |
| 55 | $(eval $(call add_define,ZYNQMP_BL32_MEM_BASE)) |
| 56 | |
| 57 | ifndef ZYNQMP_BL32_MEM_SIZE |
| 58 | $(error "ZYNQMP_BL32_BASE defined without ZYNQMP_BL32_SIZE") |
| 59 | endif |
| 60 | $(eval $(call add_define,ZYNQMP_BL32_MEM_SIZE)) |
| 61 | endif |
Soren Brinkmann | 76fcae3 | 2016-03-06 20:16:27 -0800 | [diff] [blame] | 62 | |
Soren Brinkmann | 99c0d7b | 2016-06-10 09:57:14 -0700 | [diff] [blame] | 63 | |
Siva Durga Prasad Paladugu | efd431b | 2018-04-30 20:12:12 +0530 | [diff] [blame] | 64 | ifdef ZYNQMP_WDT_RESTART |
Michal Simek | 08341b7 | 2022-03-09 08:53:20 +0100 | [diff] [blame] | 65 | $(eval $(call add_define,ZYNQMP_WDT_RESTART)) |
Siva Durga Prasad Paladugu | efd431b | 2018-04-30 20:12:12 +0530 | [diff] [blame] | 66 | endif |
| 67 | |
Venkatesh Yadav Abbarapu | 35a8be9 | 2019-04-04 14:23:32 +0530 | [diff] [blame] | 68 | ifdef ZYNQMP_IPI_CRC_CHECK |
Michal Simek | 08341b7 | 2022-03-09 08:53:20 +0100 | [diff] [blame] | 69 | $(warning "ZYNQMP_IPI_CRC_CHECK macro is deprecated...instead please use IPI_CRC_CHECK.") |
Venkatesh Yadav Abbarapu | bfa2a2a | 2021-02-19 01:40:14 -0700 | [diff] [blame] | 70 | endif |
| 71 | |
| 72 | ifdef IPI_CRC_CHECK |
| 73 | $(eval $(call add_define,IPI_CRC_CHECK)) |
Venkatesh Yadav Abbarapu | 35a8be9 | 2019-04-04 14:23:32 +0530 | [diff] [blame] | 74 | endif |
| 75 | |
Vesa Jääskeläinen | 28f9ce5 | 2022-04-29 08:47:24 +0300 | [diff] [blame] | 76 | ifdef ZYNQMP_SECURE_EFUSES |
| 77 | $(eval $(call add_define,ZYNQMP_SECURE_EFUSES)) |
| 78 | endif |
| 79 | |
Akshay Belsare | ec0afc8 | 2023-02-27 12:04:26 +0530 | [diff] [blame] | 80 | ifdef XILINX_OF_BOARD_DTB_ADDR |
| 81 | $(eval $(call add_define,XILINX_OF_BOARD_DTB_ADDR)) |
| 82 | endif |
| 83 | |
Venkatesh Yadav Abbarapu | 35a8be9 | 2019-04-04 14:23:32 +0530 | [diff] [blame] | 84 | PLAT_INCLUDES := -Iinclude/plat/arm/common/ \ |
| 85 | -Iinclude/plat/arm/common/aarch64/ \ |
Jolly Shah | b07fd0c | 2019-01-08 11:25:28 -0800 | [diff] [blame] | 86 | -Iplat/xilinx/common/include/ \ |
Wendy Liang | c31c48b | 2019-01-21 13:45:48 +0530 | [diff] [blame] | 87 | -Iplat/xilinx/common/ipi_mailbox_service/ \ |
Soren Brinkmann | 76fcae3 | 2016-03-06 20:16:27 -0800 | [diff] [blame] | 88 | -Iplat/xilinx/zynqmp/include/ \ |
Wendy Liang | f8fec36 | 2017-09-06 09:39:55 -0700 | [diff] [blame] | 89 | -Iplat/xilinx/zynqmp/pm_service/ \ |
Soren Brinkmann | 76fcae3 | 2016-03-06 20:16:27 -0800 | [diff] [blame] | 90 | |
Michal Simek | 53865b0 | 2021-05-27 09:42:37 +0200 | [diff] [blame] | 91 | include lib/libfdt/libfdt.mk |
Venkatesh Yadav Abbarapu | 1ad5f66 | 2020-12-03 20:27:18 -0700 | [diff] [blame] | 92 | # Include GICv2 driver files |
| 93 | include drivers/arm/gic/v2/gicv2.mk |
| 94 | |
Soby Mathew | cc037c1 | 2016-04-08 16:42:58 +0100 | [diff] [blame] | 95 | PLAT_BL_COMMON_SOURCES := lib/xlat_tables/xlat_tables_common.c \ |
| 96 | lib/xlat_tables/aarch64/xlat_tables.c \ |
Venkatesh Yadav Abbarapu | 34fbf1f | 2020-11-27 04:45:01 -0700 | [diff] [blame] | 97 | drivers/arm/dcc/dcc_console.c \ |
Soren Brinkmann | e5bdcaa | 2016-06-22 09:02:56 -0700 | [diff] [blame] | 98 | drivers/delay_timer/delay_timer.c \ |
| 99 | drivers/delay_timer/generic_delay_timer.c \ |
Venkatesh Yadav Abbarapu | 1ad5f66 | 2020-12-03 20:27:18 -0700 | [diff] [blame] | 100 | ${GICV2_SOURCES} \ |
Soby Mathew | 1723113 | 2016-08-08 12:33:06 +0100 | [diff] [blame] | 101 | drivers/cadence/uart/aarch64/cdns_console.S \ |
Soren Brinkmann | 76fcae3 | 2016-03-06 20:16:27 -0800 | [diff] [blame] | 102 | plat/arm/common/arm_cci.c \ |
Soby Mathew | 0eb965b | 2016-07-07 08:45:56 +0100 | [diff] [blame] | 103 | plat/arm/common/arm_common.c \ |
Soren Brinkmann | 76fcae3 | 2016-03-06 20:16:27 -0800 | [diff] [blame] | 104 | plat/arm/common/arm_gicv2.c \ |
| 105 | plat/common/plat_gicv2.c \ |
Jolly Shah | c2583ab | 2019-01-08 11:31:49 -0800 | [diff] [blame] | 106 | plat/xilinx/common/ipi.c \ |
Venkatesh Yadav Abbarapu | 44e563a | 2021-01-23 22:16:47 -0700 | [diff] [blame] | 107 | plat/xilinx/zynqmp/zynqmp_ipi.c \ |
| 108 | plat/common/aarch64/crash_console_helpers.S \ |
Soren Brinkmann | 76fcae3 | 2016-03-06 20:16:27 -0800 | [diff] [blame] | 109 | plat/xilinx/zynqmp/aarch64/zynqmp_helpers.S \ |
| 110 | plat/xilinx/zynqmp/aarch64/zynqmp_common.c |
| 111 | |
Venkatesh Yadav Abbarapu | 34fbf1f | 2020-11-27 04:45:01 -0700 | [diff] [blame] | 112 | ZYNQMP_CONSOLE ?= cadence |
| 113 | ifeq (${ZYNQMP_CONSOLE}, $(filter ${ZYNQMP_CONSOLE},cadence cadence0 cadence1 dcc)) |
| 114 | else |
| 115 | $(error "Please define ZYNQMP_CONSOLE") |
| 116 | endif |
| 117 | $(eval $(call add_define_val,ZYNQMP_CONSOLE,ZYNQMP_CONSOLE_ID_${ZYNQMP_CONSOLE})) |
| 118 | |
Amit Nagal | 20f7afc | 2023-03-23 14:16:01 +0530 | [diff] [blame] | 119 | # Build PM code as a Library |
| 120 | include plat/xilinx/zynqmp/libpm.mk |
| 121 | |
Soren Brinkmann | 76fcae3 | 2016-03-06 20:16:27 -0800 | [diff] [blame] | 122 | BL31_SOURCES += drivers/arm/cci/cci.c \ |
| 123 | lib/cpus/aarch64/aem_generic.S \ |
| 124 | lib/cpus/aarch64/cortex_a53.S \ |
Soby Mathew | f6c4108 | 2016-05-03 12:31:18 +0100 | [diff] [blame] | 125 | plat/common/plat_psci_common.c \ |
Michal Simek | 53865b0 | 2021-05-27 09:42:37 +0200 | [diff] [blame] | 126 | common/fdt_fixup.c \ |
Prasad Kummari | b72494e | 2023-09-19 22:15:05 +0530 | [diff] [blame] | 127 | common/fdt_wrappers.c \ |
Michal Simek | 53865b0 | 2021-05-27 09:42:37 +0200 | [diff] [blame] | 128 | ${LIBFDT_SRCS} \ |
Wendy Liang | c31c48b | 2019-01-21 13:45:48 +0530 | [diff] [blame] | 129 | plat/xilinx/common/ipi_mailbox_service/ipi_mailbox_svc.c \ |
Venkatesh Yadav Abbarapu | 1463dd5 | 2020-01-07 03:25:16 -0700 | [diff] [blame] | 130 | plat/xilinx/common/plat_startup.c \ |
Prasad Kummari | b72494e | 2023-09-19 22:15:05 +0530 | [diff] [blame] | 131 | plat/xilinx/common/plat_console.c \ |
Amit Nagal | f7c85f8 | 2023-09-27 15:13:42 +0530 | [diff] [blame] | 132 | plat/xilinx/common/plat_fdt.c \ |
Soren Brinkmann | 76fcae3 | 2016-03-06 20:16:27 -0800 | [diff] [blame] | 133 | plat/xilinx/zynqmp/bl31_zynqmp_setup.c \ |
| 134 | plat/xilinx/zynqmp/plat_psci.c \ |
| 135 | plat/xilinx/zynqmp/plat_zynqmp.c \ |
Soren Brinkmann | 76fcae3 | 2016-03-06 20:16:27 -0800 | [diff] [blame] | 136 | plat/xilinx/zynqmp/plat_topology.c \ |
Amit Nagal | 20f7afc | 2023-03-23 14:16:01 +0530 | [diff] [blame] | 137 | plat/xilinx/zynqmp/sip_svc_setup.c |
Wendy Liang | c31c48b | 2019-01-21 13:45:48 +0530 | [diff] [blame] | 138 | |
Jan Kiszka | e1407fc | 2020-07-14 22:36:59 +0200 | [diff] [blame] | 139 | ifeq (${SDEI_SUPPORT},1) |
| 140 | BL31_SOURCES += plat/xilinx/zynqmp/zynqmp_ehf.c \ |
| 141 | plat/xilinx/zynqmp/zynqmp_sdei.c |
| 142 | endif |
| 143 | |
Venkatesh Yadav Abbarapu | 2dfbba4 | 2020-07-13 21:18:01 -0600 | [diff] [blame] | 144 | BL31_CPPFLAGS += -fno-jump-tables |
Venkatesh Yadav Abbarapu | f9d518a | 2021-12-06 21:28:34 -0700 | [diff] [blame] | 145 | TF_CFLAGS_aarch64 += -mbranch-protection=none |
Venkatesh Yadav Abbarapu | 2dfbba4 | 2020-07-13 21:18:01 -0600 | [diff] [blame] | 146 | |
Amit Nagal | f7ecba3 | 2023-02-15 18:43:55 +0530 | [diff] [blame] | 147 | ifdef CUSTOM_PKG_PATH |
| 148 | include $(CUSTOM_PKG_PATH)/custom_pkg.mk |
| 149 | else |
| 150 | BL31_SOURCES += plat/xilinx/zynqmp/custom_sip_svc.c |
| 151 | endif |
| 152 | |
Wendy Liang | c31c48b | 2019-01-21 13:45:48 +0530 | [diff] [blame] | 153 | ifneq (${RESET_TO_BL31},1) |
| 154 | $(error "Using BL31 as the reset vector is only one option supported on ZynqMP. Please set RESET_TO_BL31 to 1.") |
| 155 | endif |