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