Antonio Nino Diaz | 493bf33 | 2016-12-14 14:31:32 +0000 | [diff] [blame] | 1 | # |
Venkatesh Yadav Abbarapu | 34fbf1f | 2020-11-27 04:45:01 -0700 | [diff] [blame] | 2 | # Copyright (c) 2013-2021, ARM Limited and Contributors. All rights reserved. |
Soren Brinkmann | 76fcae3 | 2016-03-06 20:16:27 -0800 | [diff] [blame] | 3 | # |
dp-arm | fa3cf0b | 2017-05-03 09:38:09 +0100 | [diff] [blame] | 4 | # SPDX-License-Identifier: BSD-3-Clause |
Soren Brinkmann | 76fcae3 | 2016-03-06 20:16:27 -0800 | [diff] [blame] | 5 | |
Soren Brinkmann | ba8309d | 2017-04-06 11:44:27 -0700 | [diff] [blame] | 6 | override ERRATA_A53_855873 := 1 |
Masahiro Yamada | 8cf895c | 2016-12-19 17:41:47 +0900 | [diff] [blame] | 7 | override PROGRAMMABLE_RESET_ADDRESS := 1 |
Soren Brinkmann | 76fcae3 | 2016-03-06 20:16:27 -0800 | [diff] [blame] | 8 | PSCI_EXTENDED_STATE_ID := 1 |
| 9 | A53_DISABLE_NON_TEMPORAL_HINT := 0 |
Soren Brinkmann | 6d1ba58 | 2016-07-08 14:45:14 -0700 | [diff] [blame] | 10 | SEPARATE_CODE_AND_RODATA := 1 |
Siva Durga Prasad Paladugu | efd431b | 2018-04-30 20:12:12 +0530 | [diff] [blame] | 11 | ZYNQMP_WDT_RESTART := 0 |
Venkatesh Yadav Abbarapu | bfa2a2a | 2021-02-19 01:40:14 -0700 | [diff] [blame] | 12 | IPI_CRC_CHECK := 0 |
Masahiro Yamada | 8cf895c | 2016-12-19 17:41:47 +0900 | [diff] [blame] | 13 | override RESET_TO_BL31 := 1 |
Siva Durga Prasad Paladugu | 60bfbc9 | 2018-09-24 22:51:49 -0700 | [diff] [blame] | 14 | override GICV2_G0_FOR_EL3 := 1 |
| 15 | override WARMBOOT_ENABLE_DCACHE_EARLY := 1 |
Soren Brinkmann | 76fcae3 | 2016-03-06 20:16:27 -0800 | [diff] [blame] | 16 | |
Jan Kiszka | e1407fc | 2020-07-14 22:36:59 +0200 | [diff] [blame] | 17 | EL3_EXCEPTION_HANDLING := $(SDEI_SUPPORT) |
| 18 | |
David Cunado | c5b0c0f | 2017-10-31 23:19:21 +0000 | [diff] [blame] | 19 | # Do not enable SVE |
| 20 | ENABLE_SVE_FOR_NS := 0 |
| 21 | |
Dimitris Papastamos | 8e5bd5e | 2018-01-24 16:41:14 +0000 | [diff] [blame] | 22 | WORKAROUND_CVE_2017_5715 := 0 |
| 23 | |
Venkatesh Yadav Abbarapu | 6d7f1e8 | 2022-05-06 14:07:15 +0530 | [diff] [blame] | 24 | ARM_XLAT_TABLES_LIB_V1 := 1 |
| 25 | $(eval $(call assert_boolean,ARM_XLAT_TABLES_LIB_V1)) |
| 26 | $(eval $(call add_define,ARM_XLAT_TABLES_LIB_V1)) |
| 27 | |
Soren Brinkmann | 4a9ca04 | 2016-04-14 10:27:00 -0700 | [diff] [blame] | 28 | ifdef ZYNQMP_ATF_MEM_BASE |
| 29 | $(eval $(call add_define,ZYNQMP_ATF_MEM_BASE)) |
| 30 | |
| 31 | ifndef ZYNQMP_ATF_MEM_SIZE |
| 32 | $(error "ZYNQMP_ATF_BASE defined without ZYNQMP_ATF_SIZE") |
| 33 | endif |
| 34 | $(eval $(call add_define,ZYNQMP_ATF_MEM_SIZE)) |
Soren Brinkmann | 76fcae3 | 2016-03-06 20:16:27 -0800 | [diff] [blame] | 35 | |
Soren Brinkmann | 4a9ca04 | 2016-04-14 10:27:00 -0700 | [diff] [blame] | 36 | ifdef ZYNQMP_ATF_MEM_PROGBITS_SIZE |
| 37 | $(eval $(call add_define,ZYNQMP_ATF_MEM_PROGBITS_SIZE)) |
| 38 | endif |
Soren Brinkmann | 76fcae3 | 2016-03-06 20:16:27 -0800 | [diff] [blame] | 39 | endif |
| 40 | |
Soren Brinkmann | 4a9ca04 | 2016-04-14 10:27:00 -0700 | [diff] [blame] | 41 | ifdef ZYNQMP_BL32_MEM_BASE |
| 42 | $(eval $(call add_define,ZYNQMP_BL32_MEM_BASE)) |
| 43 | |
| 44 | ifndef ZYNQMP_BL32_MEM_SIZE |
| 45 | $(error "ZYNQMP_BL32_BASE defined without ZYNQMP_BL32_SIZE") |
| 46 | endif |
| 47 | $(eval $(call add_define,ZYNQMP_BL32_MEM_SIZE)) |
| 48 | endif |
Soren Brinkmann | 76fcae3 | 2016-03-06 20:16:27 -0800 | [diff] [blame] | 49 | |
Soren Brinkmann | 99c0d7b | 2016-06-10 09:57:14 -0700 | [diff] [blame] | 50 | |
Siva Durga Prasad Paladugu | efd431b | 2018-04-30 20:12:12 +0530 | [diff] [blame] | 51 | ifdef ZYNQMP_WDT_RESTART |
Michal Simek | 08341b7 | 2022-03-09 08:53:20 +0100 | [diff] [blame] | 52 | $(eval $(call add_define,ZYNQMP_WDT_RESTART)) |
Siva Durga Prasad Paladugu | efd431b | 2018-04-30 20:12:12 +0530 | [diff] [blame] | 53 | endif |
| 54 | |
Venkatesh Yadav Abbarapu | 35a8be9 | 2019-04-04 14:23:32 +0530 | [diff] [blame] | 55 | ifdef ZYNQMP_IPI_CRC_CHECK |
Michal Simek | 08341b7 | 2022-03-09 08:53:20 +0100 | [diff] [blame] | 56 | $(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] | 57 | endif |
| 58 | |
| 59 | ifdef IPI_CRC_CHECK |
| 60 | $(eval $(call add_define,IPI_CRC_CHECK)) |
Venkatesh Yadav Abbarapu | 35a8be9 | 2019-04-04 14:23:32 +0530 | [diff] [blame] | 61 | endif |
| 62 | |
| 63 | PLAT_INCLUDES := -Iinclude/plat/arm/common/ \ |
| 64 | -Iinclude/plat/arm/common/aarch64/ \ |
Jolly Shah | b07fd0c | 2019-01-08 11:25:28 -0800 | [diff] [blame] | 65 | -Iplat/xilinx/common/include/ \ |
Wendy Liang | c31c48b | 2019-01-21 13:45:48 +0530 | [diff] [blame] | 66 | -Iplat/xilinx/common/ipi_mailbox_service/ \ |
Soren Brinkmann | 76fcae3 | 2016-03-06 20:16:27 -0800 | [diff] [blame] | 67 | -Iplat/xilinx/zynqmp/include/ \ |
Wendy Liang | f8fec36 | 2017-09-06 09:39:55 -0700 | [diff] [blame] | 68 | -Iplat/xilinx/zynqmp/pm_service/ \ |
Soren Brinkmann | 76fcae3 | 2016-03-06 20:16:27 -0800 | [diff] [blame] | 69 | |
Michal Simek | 53865b0 | 2021-05-27 09:42:37 +0200 | [diff] [blame] | 70 | include lib/libfdt/libfdt.mk |
Venkatesh Yadav Abbarapu | 1ad5f66 | 2020-12-03 20:27:18 -0700 | [diff] [blame] | 71 | # Include GICv2 driver files |
| 72 | include drivers/arm/gic/v2/gicv2.mk |
| 73 | |
Soby Mathew | cc037c1 | 2016-04-08 16:42:58 +0100 | [diff] [blame] | 74 | PLAT_BL_COMMON_SOURCES := lib/xlat_tables/xlat_tables_common.c \ |
| 75 | lib/xlat_tables/aarch64/xlat_tables.c \ |
Venkatesh Yadav Abbarapu | 34fbf1f | 2020-11-27 04:45:01 -0700 | [diff] [blame] | 76 | drivers/arm/dcc/dcc_console.c \ |
Soren Brinkmann | e5bdcaa | 2016-06-22 09:02:56 -0700 | [diff] [blame] | 77 | drivers/delay_timer/delay_timer.c \ |
| 78 | drivers/delay_timer/generic_delay_timer.c \ |
Venkatesh Yadav Abbarapu | 1ad5f66 | 2020-12-03 20:27:18 -0700 | [diff] [blame] | 79 | ${GICV2_SOURCES} \ |
Soby Mathew | 1723113 | 2016-08-08 12:33:06 +0100 | [diff] [blame] | 80 | drivers/cadence/uart/aarch64/cdns_console.S \ |
Soren Brinkmann | 76fcae3 | 2016-03-06 20:16:27 -0800 | [diff] [blame] | 81 | plat/arm/common/arm_cci.c \ |
Soby Mathew | 0eb965b | 2016-07-07 08:45:56 +0100 | [diff] [blame] | 82 | plat/arm/common/arm_common.c \ |
Soren Brinkmann | 76fcae3 | 2016-03-06 20:16:27 -0800 | [diff] [blame] | 83 | plat/arm/common/arm_gicv2.c \ |
| 84 | plat/common/plat_gicv2.c \ |
Jolly Shah | c2583ab | 2019-01-08 11:31:49 -0800 | [diff] [blame] | 85 | plat/xilinx/common/ipi.c \ |
Venkatesh Yadav Abbarapu | 44e563a | 2021-01-23 22:16:47 -0700 | [diff] [blame] | 86 | plat/xilinx/zynqmp/zynqmp_ipi.c \ |
| 87 | plat/common/aarch64/crash_console_helpers.S \ |
Soren Brinkmann | 76fcae3 | 2016-03-06 20:16:27 -0800 | [diff] [blame] | 88 | plat/xilinx/zynqmp/aarch64/zynqmp_helpers.S \ |
| 89 | plat/xilinx/zynqmp/aarch64/zynqmp_common.c |
| 90 | |
Venkatesh Yadav Abbarapu | 34fbf1f | 2020-11-27 04:45:01 -0700 | [diff] [blame] | 91 | ZYNQMP_CONSOLE ?= cadence |
| 92 | ifeq (${ZYNQMP_CONSOLE}, $(filter ${ZYNQMP_CONSOLE},cadence cadence0 cadence1 dcc)) |
| 93 | else |
| 94 | $(error "Please define ZYNQMP_CONSOLE") |
| 95 | endif |
| 96 | $(eval $(call add_define_val,ZYNQMP_CONSOLE,ZYNQMP_CONSOLE_ID_${ZYNQMP_CONSOLE})) |
| 97 | |
Soren Brinkmann | 76fcae3 | 2016-03-06 20:16:27 -0800 | [diff] [blame] | 98 | BL31_SOURCES += drivers/arm/cci/cci.c \ |
| 99 | lib/cpus/aarch64/aem_generic.S \ |
| 100 | lib/cpus/aarch64/cortex_a53.S \ |
Soby Mathew | f6c4108 | 2016-05-03 12:31:18 +0100 | [diff] [blame] | 101 | plat/common/plat_psci_common.c \ |
Michal Simek | 53865b0 | 2021-05-27 09:42:37 +0200 | [diff] [blame] | 102 | common/fdt_fixup.c \ |
| 103 | ${LIBFDT_SRCS} \ |
Wendy Liang | c31c48b | 2019-01-21 13:45:48 +0530 | [diff] [blame] | 104 | plat/xilinx/common/ipi_mailbox_service/ipi_mailbox_svc.c \ |
Jolly Shah | 259afe5 | 2019-01-09 12:37:57 -0800 | [diff] [blame] | 105 | plat/xilinx/common/pm_service/pm_ipi.c \ |
Venkatesh Yadav Abbarapu | 1463dd5 | 2020-01-07 03:25:16 -0700 | [diff] [blame] | 106 | plat/xilinx/common/plat_startup.c \ |
Soren Brinkmann | 76fcae3 | 2016-03-06 20:16:27 -0800 | [diff] [blame] | 107 | plat/xilinx/zynqmp/bl31_zynqmp_setup.c \ |
| 108 | plat/xilinx/zynqmp/plat_psci.c \ |
| 109 | plat/xilinx/zynqmp/plat_zynqmp.c \ |
Soren Brinkmann | 76fcae3 | 2016-03-06 20:16:27 -0800 | [diff] [blame] | 110 | plat/xilinx/zynqmp/plat_topology.c \ |
| 111 | plat/xilinx/zynqmp/sip_svc_setup.c \ |
| 112 | plat/xilinx/zynqmp/pm_service/pm_svc_main.c \ |
| 113 | plat/xilinx/zynqmp/pm_service/pm_api_sys.c \ |
Rajan Vaja | 0ac2be1 | 2018-01-17 02:39:21 -0800 | [diff] [blame] | 114 | plat/xilinx/zynqmp/pm_service/pm_api_pinctrl.c \ |
Rajan Vaja | 5529a01 | 2018-01-17 02:39:23 -0800 | [diff] [blame] | 115 | plat/xilinx/zynqmp/pm_service/pm_api_ioctl.c \ |
Rajan Vaja | 3511613 | 2018-01-17 02:39:25 -0800 | [diff] [blame] | 116 | plat/xilinx/zynqmp/pm_service/pm_api_clock.c \ |
Wendy Liang | c31c48b | 2019-01-21 13:45:48 +0530 | [diff] [blame] | 117 | plat/xilinx/zynqmp/pm_service/pm_client.c |
| 118 | |
Jan Kiszka | e1407fc | 2020-07-14 22:36:59 +0200 | [diff] [blame] | 119 | ifeq (${SDEI_SUPPORT},1) |
| 120 | BL31_SOURCES += plat/xilinx/zynqmp/zynqmp_ehf.c \ |
| 121 | plat/xilinx/zynqmp/zynqmp_sdei.c |
| 122 | endif |
| 123 | |
Venkatesh Yadav Abbarapu | 2dfbba4 | 2020-07-13 21:18:01 -0600 | [diff] [blame] | 124 | BL31_CPPFLAGS += -fno-jump-tables |
Venkatesh Yadav Abbarapu | f9d518a | 2021-12-06 21:28:34 -0700 | [diff] [blame] | 125 | TF_CFLAGS_aarch64 += -mbranch-protection=none |
Venkatesh Yadav Abbarapu | 2dfbba4 | 2020-07-13 21:18:01 -0600 | [diff] [blame] | 126 | |
Wendy Liang | c31c48b | 2019-01-21 13:45:48 +0530 | [diff] [blame] | 127 | ifneq (${RESET_TO_BL31},1) |
| 128 | $(error "Using BL31 as the reset vector is only one option supported on ZynqMP. Please set RESET_TO_BL31 to 1.") |
| 129 | endif |