Achin Gupta | 4f6ad66 | 2013-10-25 09:08:21 +0100 | [diff] [blame] | 1 | # |
Jayanth Dodderi Chidanand | 9461a89 | 2022-01-17 18:57:17 +0000 | [diff] [blame] | 2 | # Copyright (c) 2013-2022, ARM Limited and Contributors. All rights reserved. |
Achin Gupta | 4f6ad66 | 2013-10-25 09:08:21 +0100 | [diff] [blame] | 3 | # |
dp-arm | fa3cf0b | 2017-05-03 09:38:09 +0100 | [diff] [blame] | 4 | # SPDX-License-Identifier: BSD-3-Clause |
Achin Gupta | 4f6ad66 | 2013-10-25 09:08:21 +0100 | [diff] [blame] | 5 | # |
| 6 | |
Antonio Nino Diaz | c41f206 | 2017-10-24 10:07:35 +0100 | [diff] [blame] | 7 | ################################################################################ |
Paul Beesley | db4e25a | 2019-10-14 15:27:12 +0000 | [diff] [blame] | 8 | # Include Makefile for the SPM-MM implementation |
Antonio Nino Diaz | c41f206 | 2017-10-24 10:07:35 +0100 | [diff] [blame] | 9 | ################################################################################ |
Javier Almansa Sobrino | e1ecd23 | 2020-08-20 18:48:09 +0100 | [diff] [blame] | 10 | ifeq (${SUPPORT_UNKNOWN_MPID},1) |
| 11 | ifeq (${DEBUG},0) |
| 12 | $(warning WARNING: SUPPORT_UNKNOWN_MPID enabled) |
| 13 | endif |
| 14 | endif |
| 15 | |
Paul Beesley | fe975b4 | 2019-09-16 11:29:03 +0000 | [diff] [blame] | 16 | ifeq (${SPM_MM},1) |
| 17 | ifeq (${EL3_EXCEPTION_HANDLING},0) |
Paul Beesley | db4e25a | 2019-10-14 15:27:12 +0000 | [diff] [blame] | 18 | $(error EL3_EXCEPTION_HANDLING must be 1 for SPM-MM support) |
Antonio Nino Diaz | 8cd7ea3 | 2018-10-30 11:08:08 +0000 | [diff] [blame] | 19 | else |
Paul Beesley | fe975b4 | 2019-09-16 11:29:03 +0000 | [diff] [blame] | 20 | $(info Including SPM Management Mode (MM) makefile) |
Marc Bonnici | 758bd24 | 2021-12-19 21:37:50 +0000 | [diff] [blame] | 21 | include services/std_svc/spm/common/spm.mk |
| 22 | include services/std_svc/spm/spm_mm/spm_mm.mk |
Antonio Nino Diaz | 8cd7ea3 | 2018-10-30 11:08:08 +0000 | [diff] [blame] | 23 | endif |
Antonio Nino Diaz | c41f206 | 2017-10-24 10:07:35 +0100 | [diff] [blame] | 24 | endif |
| 25 | |
Chris Kay | 1000ea8 | 2021-05-19 19:24:37 +0100 | [diff] [blame] | 26 | include lib/extensions/amu/amu.mk |
Chris Kay | 03be39d | 2021-05-05 13:38:30 +0100 | [diff] [blame] | 27 | include lib/mpmm/mpmm.mk |
Marc Bonnici | abaac16 | 2021-12-01 18:00:40 +0000 | [diff] [blame] | 28 | |
| 29 | ifeq (${SPMC_AT_EL3},1) |
| 30 | $(warning "EL3 SPMC is an experimental feature") |
| 31 | $(info Including EL3 SPMC makefile) |
| 32 | include services/std_svc/spm/common/spm.mk |
| 33 | include services/std_svc/spm/el3_spmc/spmc.mk |
| 34 | endif |
| 35 | |
Soby Mathew | 0d78607 | 2016-03-24 16:56:29 +0000 | [diff] [blame] | 36 | include lib/psci/psci_lib.mk |
| 37 | |
Dan Handley | 176e7b4 | 2014-04-15 18:20:09 +0100 | [diff] [blame] | 38 | BL31_SOURCES += bl31/bl31_main.c \ |
Achin Gupta | 191e86e | 2014-05-09 10:03:15 +0100 | [diff] [blame] | 39 | bl31/interrupt_mgmt.c \ |
Dan Handley | 176e7b4 | 2014-04-15 18:20:09 +0100 | [diff] [blame] | 40 | bl31/aarch64/bl31_entrypoint.S \ |
Andrew Thoelke | 4d2d553 | 2014-06-02 12:38:12 +0100 | [diff] [blame] | 41 | bl31/aarch64/crash_reporting.S \ |
Jeenu Viswambharan | e86a247 | 2018-07-05 15:24:45 +0100 | [diff] [blame] | 42 | bl31/aarch64/ea_delegate.S \ |
Jeenu Viswambharan | 2de8153 | 2018-02-16 11:54:24 +0000 | [diff] [blame] | 43 | bl31/aarch64/runtime_exceptions.S \ |
Yatharth Kochar | 6c0566c | 2015-10-02 17:56:48 +0100 | [diff] [blame] | 44 | bl31/bl31_context_mgmt.c \ |
Soby Mathew | 0d78607 | 2016-03-24 16:56:29 +0000 | [diff] [blame] | 45 | common/runtime_svc.c \ |
John Tsichritzis | 4daa1de | 2018-07-23 09:11:59 +0100 | [diff] [blame] | 46 | lib/cpus/aarch64/dsu_helpers.S \ |
dp-arm | 230011c | 2017-03-07 11:02:47 +0000 | [diff] [blame] | 47 | plat/common/aarch64/platform_mp_stack.S \ |
Dimitris Papastamos | 0dcdb1a | 2018-01-19 16:58:29 +0000 | [diff] [blame] | 48 | services/arm_arch_svc/arm_arch_svc_setup.c \ |
Dan Handley | 176e7b4 | 2014-04-15 18:20:09 +0100 | [diff] [blame] | 49 | services/std_svc/std_svc_setup.c \ |
Antonio Nino Diaz | c41f206 | 2017-10-24 10:07:35 +0100 | [diff] [blame] | 50 | ${PSCI_LIB_SOURCES} \ |
Achin Gupta | 60b7b8a | 2019-10-11 15:50:43 +0100 | [diff] [blame] | 51 | ${SPMD_SOURCES} \ |
Marc Bonnici | 758bd24 | 2021-12-19 21:37:50 +0000 | [diff] [blame] | 52 | ${SPM_MM_SOURCES} \ |
Marc Bonnici | abaac16 | 2021-12-01 18:00:40 +0000 | [diff] [blame] | 53 | ${SPMC_SOURCES} \ |
Jeenu Viswambharan | 2de8153 | 2018-02-16 11:54:24 +0000 | [diff] [blame] | 54 | ${SPM_SOURCES} |
Antonio Nino Diaz | c41f206 | 2017-10-24 10:07:35 +0100 | [diff] [blame] | 55 | |
Javier Almansa Sobrino | f3a4c54 | 2020-11-23 18:38:15 +0000 | [diff] [blame] | 56 | ifeq (${DISABLE_MTPMU},1) |
| 57 | BL31_SOURCES += lib/extensions/mtpmu/aarch64/mtpmu.S |
| 58 | endif |
Soby Mathew | 523d633 | 2015-01-08 18:02:19 +0000 | [diff] [blame] | 59 | |
Yatharth Kochar | 9518d02 | 2016-03-11 14:20:19 +0000 | [diff] [blame] | 60 | ifeq (${ENABLE_PMF}, 1) |
| 61 | BL31_SOURCES += lib/pmf/pmf_main.c |
| 62 | endif |
| 63 | |
Olivier Deprez | cb4c562 | 2019-09-19 17:46:46 +0200 | [diff] [blame] | 64 | include lib/debugfs/debugfs.mk |
| 65 | ifeq (${USE_DEBUGFS},1) |
| 66 | BL31_SOURCES += $(DEBUGFS_SRCS) |
| 67 | endif |
| 68 | |
Jeenu Viswambharan | 10a6727 | 2017-09-22 08:32:10 +0100 | [diff] [blame] | 69 | ifeq (${EL3_EXCEPTION_HANDLING},1) |
| 70 | BL31_SOURCES += bl31/ehf.c |
| 71 | endif |
| 72 | |
Jeenu Viswambharan | 04e3a7f | 2017-10-16 08:43:14 +0100 | [diff] [blame] | 73 | ifeq (${SDEI_SUPPORT},1) |
| 74 | ifeq (${EL3_EXCEPTION_HANDLING},0) |
| 75 | $(error EL3_EXCEPTION_HANDLING must be 1 for SDEI support) |
| 76 | endif |
Jeenu Viswambharan | 8b7e6bc | 2018-02-16 12:07:48 +0000 | [diff] [blame] | 77 | BL31_SOURCES += services/std_svc/sdei/sdei_dispatch.S \ |
| 78 | services/std_svc/sdei/sdei_event.c \ |
Jeenu Viswambharan | 04e3a7f | 2017-10-16 08:43:14 +0100 | [diff] [blame] | 79 | services/std_svc/sdei/sdei_intr_mgmt.c \ |
| 80 | services/std_svc/sdei/sdei_main.c \ |
| 81 | services/std_svc/sdei/sdei_state.c |
| 82 | endif |
| 83 | |
Jimmy Brisson | 26c5b5c | 2020-06-22 14:18:42 -0500 | [diff] [blame] | 84 | ifeq (${TRNG_SUPPORT},1) |
| 85 | BL31_SOURCES += services/std_svc/trng/trng_main.c \ |
| 86 | services/std_svc/trng/trng_entropy_pool.c |
| 87 | endif |
| 88 | |
Dimitris Papastamos | 5bdbb47 | 2017-10-13 12:06:06 +0100 | [diff] [blame] | 89 | ifeq (${ENABLE_SPE_FOR_LOWER_ELS},1) |
| 90 | BL31_SOURCES += lib/extensions/spe/spe.c |
| 91 | endif |
| 92 | |
Dimitris Papastamos | e08005a | 2017-10-12 13:02:29 +0100 | [diff] [blame] | 93 | ifeq (${ENABLE_AMU},1) |
Chris Kay | 1000ea8 | 2021-05-19 19:24:37 +0100 | [diff] [blame] | 94 | BL31_SOURCES += ${AMU_SOURCES} |
Dimitris Papastamos | e08005a | 2017-10-12 13:02:29 +0100 | [diff] [blame] | 95 | endif |
| 96 | |
Chris Kay | 03be39d | 2021-05-05 13:38:30 +0100 | [diff] [blame] | 97 | ifeq (${ENABLE_MPMM},1) |
| 98 | BL31_SOURCES += ${MPMM_SOURCES} |
| 99 | endif |
| 100 | |
johpow01 | 9baade3 | 2021-07-08 14:14:00 -0500 | [diff] [blame] | 101 | ifeq (${ENABLE_SME_FOR_NS},1) |
| 102 | BL31_SOURCES += lib/extensions/sme/sme.c |
| 103 | BL31_SOURCES += lib/extensions/sve/sve.c |
| 104 | else |
David Cunado | ce88eee | 2017-10-20 11:30:57 +0100 | [diff] [blame] | 105 | ifeq (${ENABLE_SVE_FOR_NS},1) |
| 106 | BL31_SOURCES += lib/extensions/sve/sve.c |
| 107 | endif |
johpow01 | 9baade3 | 2021-07-08 14:14:00 -0500 | [diff] [blame] | 108 | endif |
David Cunado | ce88eee | 2017-10-20 11:30:57 +0100 | [diff] [blame] | 109 | |
Jeenu Viswambharan | 2da918c | 2018-07-31 16:13:33 +0100 | [diff] [blame] | 110 | ifeq (${ENABLE_MPAM_FOR_LOWER_ELS},1) |
| 111 | BL31_SOURCES += lib/extensions/mpam/mpam.c |
| 112 | endif |
| 113 | |
Manish V Badarkhe | 20df29c | 2021-07-02 09:10:56 +0100 | [diff] [blame] | 114 | ifeq (${ENABLE_TRBE_FOR_NS},1) |
| 115 | BL31_SOURCES += lib/extensions/trbe/trbe.c |
| 116 | endif |
| 117 | |
Manish V Badarkhe | f356f7e | 2021-06-29 11:44:20 +0100 | [diff] [blame] | 118 | ifeq (${ENABLE_SYS_REG_TRACE_FOR_NS},1) |
| 119 | BL31_SOURCES += lib/extensions/sys_reg_trace/aarch64/sys_reg_trace.c |
| 120 | endif |
| 121 | |
Manish V Badarkhe | 51a9711 | 2021-07-08 09:33:18 +0100 | [diff] [blame] | 122 | ifeq (${ENABLE_TRF_FOR_NS},1) |
| 123 | BL31_SOURCES += lib/extensions/trf/aarch64/trf.c |
| 124 | endif |
| 125 | |
Dimitris Papastamos | 446f7f1 | 2017-11-30 14:53:53 +0000 | [diff] [blame] | 126 | ifeq (${WORKAROUND_CVE_2017_5715},1) |
Dimitris Papastamos | 570c06a | 2018-04-06 15:29:34 +0100 | [diff] [blame] | 127 | BL31_SOURCES += lib/cpus/aarch64/wa_cve_2017_5715_bpiall.S \ |
| 128 | lib/cpus/aarch64/wa_cve_2017_5715_mmu.S |
Dimitris Papastamos | 446f7f1 | 2017-11-30 14:53:53 +0000 | [diff] [blame] | 129 | endif |
| 130 | |
Jeremy Linton | c8c3e0d | 2020-11-18 10:17:57 -0600 | [diff] [blame] | 131 | ifeq ($(SMC_PCI_SUPPORT),1) |
| 132 | BL31_SOURCES += services/std_svc/pci_svc.c |
| 133 | endif |
| 134 | |
Zelalem Aweke | 13dc8f1 | 2021-07-09 14:20:03 -0500 | [diff] [blame] | 135 | ifeq (${ENABLE_RME},1) |
johpow01 | 9d13402 | 2021-06-16 17:57:28 -0500 | [diff] [blame] | 136 | include lib/gpt_rme/gpt_rme.mk |
Zelalem Aweke | 8e2e24b | 2021-07-13 14:05:20 -0500 | [diff] [blame] | 137 | |
| 138 | BL31_SOURCES += ${GPT_LIB_SRCS} \ |
| 139 | ${RMMD_SOURCES} |
Zelalem Aweke | 13dc8f1 | 2021-07-09 14:20:03 -0500 | [diff] [blame] | 140 | endif |
| 141 | |
Jayanth Dodderi Chidanand | 9461a89 | 2022-01-17 18:57:17 +0000 | [diff] [blame] | 142 | ifeq ($(FEATURE_DETECTION),1) |
| 143 | BL31_SOURCES += common/feat_detect.c |
| 144 | endif |
| 145 | |
Dan Handley | 176e7b4 | 2014-04-15 18:20:09 +0100 | [diff] [blame] | 146 | BL31_LINKERFILE := bl31/bl31.ld.S |
Achin Gupta | 9cf2bb7 | 2014-05-09 11:07:09 +0100 | [diff] [blame] | 147 | |
Sandrine Bailleux | f4119ec | 2015-12-17 13:58:58 +0000 | [diff] [blame] | 148 | # Flag used to indicate if Crash reporting via console should be included |
Juan Castillo | 7d19941 | 2015-12-14 09:35:25 +0000 | [diff] [blame] | 149 | # in BL31. This defaults to being present in DEBUG builds only |
Andrew Thoelke | 385f4d4 | 2014-06-03 11:50:53 +0100 | [diff] [blame] | 150 | ifndef CRASH_REPORTING |
| 151 | CRASH_REPORTING := $(DEBUG) |
| 152 | endif |
| 153 | |
Leonardo Sandoval | 65fca7c | 2020-09-10 12:18:27 -0500 | [diff] [blame] | 154 | $(eval $(call assert_booleans,\ |
| 155 | $(sort \ |
| 156 | CRASH_REPORTING \ |
| 157 | EL3_EXCEPTION_HANDLING \ |
| 158 | SDEI_SUPPORT \ |
| 159 | ))) |
Jeenu Viswambharan | 10a6727 | 2017-09-22 08:32:10 +0100 | [diff] [blame] | 160 | |
Leonardo Sandoval | 65fca7c | 2020-09-10 12:18:27 -0500 | [diff] [blame] | 161 | $(eval $(call add_defines,\ |
| 162 | $(sort \ |
| 163 | CRASH_REPORTING \ |
| 164 | EL3_EXCEPTION_HANDLING \ |
| 165 | SDEI_SUPPORT \ |
| 166 | ))) |