Achin Gupta | 4f6ad66 | 2013-10-25 09:08:21 +0100 | [diff] [blame] | 1 | # |
Jimmy Brisson | 26c5b5c | 2020-06-22 14:18:42 -0500 | [diff] [blame] | 2 | # Copyright (c) 2013-2021, 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 | |
Soby Mathew | 0d78607 | 2016-03-24 16:56:29 +0000 | [diff] [blame] | 25 | include lib/psci/psci_lib.mk |
| 26 | |
Dan Handley | 176e7b4 | 2014-04-15 18:20:09 +0100 | [diff] [blame] | 27 | BL31_SOURCES += bl31/bl31_main.c \ |
Achin Gupta | 191e86e | 2014-05-09 10:03:15 +0100 | [diff] [blame] | 28 | bl31/interrupt_mgmt.c \ |
Dan Handley | 176e7b4 | 2014-04-15 18:20:09 +0100 | [diff] [blame] | 29 | bl31/aarch64/bl31_entrypoint.S \ |
Andrew Thoelke | 4d2d553 | 2014-06-02 12:38:12 +0100 | [diff] [blame] | 30 | bl31/aarch64/crash_reporting.S \ |
Jeenu Viswambharan | e86a247 | 2018-07-05 15:24:45 +0100 | [diff] [blame] | 31 | bl31/aarch64/ea_delegate.S \ |
Jeenu Viswambharan | 2de8153 | 2018-02-16 11:54:24 +0000 | [diff] [blame] | 32 | bl31/aarch64/runtime_exceptions.S \ |
Yatharth Kochar | 6c0566c | 2015-10-02 17:56:48 +0100 | [diff] [blame] | 33 | bl31/bl31_context_mgmt.c \ |
Soby Mathew | 0d78607 | 2016-03-24 16:56:29 +0000 | [diff] [blame] | 34 | common/runtime_svc.c \ |
John Tsichritzis | 4daa1de | 2018-07-23 09:11:59 +0100 | [diff] [blame] | 35 | lib/cpus/aarch64/dsu_helpers.S \ |
dp-arm | 230011c | 2017-03-07 11:02:47 +0000 | [diff] [blame] | 36 | plat/common/aarch64/platform_mp_stack.S \ |
Dimitris Papastamos | 0dcdb1a | 2018-01-19 16:58:29 +0000 | [diff] [blame] | 37 | services/arm_arch_svc/arm_arch_svc_setup.c \ |
Dan Handley | 176e7b4 | 2014-04-15 18:20:09 +0100 | [diff] [blame] | 38 | services/std_svc/std_svc_setup.c \ |
Antonio Nino Diaz | c41f206 | 2017-10-24 10:07:35 +0100 | [diff] [blame] | 39 | ${PSCI_LIB_SOURCES} \ |
Achin Gupta | 60b7b8a | 2019-10-11 15:50:43 +0100 | [diff] [blame] | 40 | ${SPMD_SOURCES} \ |
Jeenu Viswambharan | 2de8153 | 2018-02-16 11:54:24 +0000 | [diff] [blame] | 41 | ${SPM_SOURCES} |
Antonio Nino Diaz | c41f206 | 2017-10-24 10:07:35 +0100 | [diff] [blame] | 42 | |
Javier Almansa Sobrino | f3a4c54 | 2020-11-23 18:38:15 +0000 | [diff] [blame] | 43 | ifeq (${DISABLE_MTPMU},1) |
| 44 | BL31_SOURCES += lib/extensions/mtpmu/aarch64/mtpmu.S |
| 45 | endif |
Soby Mathew | 523d633 | 2015-01-08 18:02:19 +0000 | [diff] [blame] | 46 | |
Yatharth Kochar | 9518d02 | 2016-03-11 14:20:19 +0000 | [diff] [blame] | 47 | ifeq (${ENABLE_PMF}, 1) |
| 48 | BL31_SOURCES += lib/pmf/pmf_main.c |
| 49 | endif |
| 50 | |
Olivier Deprez | cb4c562 | 2019-09-19 17:46:46 +0200 | [diff] [blame] | 51 | include lib/debugfs/debugfs.mk |
| 52 | ifeq (${USE_DEBUGFS},1) |
| 53 | BL31_SOURCES += $(DEBUGFS_SRCS) |
| 54 | endif |
| 55 | |
Jeenu Viswambharan | 10a6727 | 2017-09-22 08:32:10 +0100 | [diff] [blame] | 56 | ifeq (${EL3_EXCEPTION_HANDLING},1) |
| 57 | BL31_SOURCES += bl31/ehf.c |
| 58 | endif |
| 59 | |
Jeenu Viswambharan | 04e3a7f | 2017-10-16 08:43:14 +0100 | [diff] [blame] | 60 | ifeq (${SDEI_SUPPORT},1) |
| 61 | ifeq (${EL3_EXCEPTION_HANDLING},0) |
| 62 | $(error EL3_EXCEPTION_HANDLING must be 1 for SDEI support) |
| 63 | endif |
Jeenu Viswambharan | 8b7e6bc | 2018-02-16 12:07:48 +0000 | [diff] [blame] | 64 | BL31_SOURCES += services/std_svc/sdei/sdei_dispatch.S \ |
| 65 | services/std_svc/sdei/sdei_event.c \ |
Jeenu Viswambharan | 04e3a7f | 2017-10-16 08:43:14 +0100 | [diff] [blame] | 66 | services/std_svc/sdei/sdei_intr_mgmt.c \ |
| 67 | services/std_svc/sdei/sdei_main.c \ |
| 68 | services/std_svc/sdei/sdei_state.c |
| 69 | endif |
| 70 | |
Jimmy Brisson | 26c5b5c | 2020-06-22 14:18:42 -0500 | [diff] [blame] | 71 | ifeq (${TRNG_SUPPORT},1) |
| 72 | BL31_SOURCES += services/std_svc/trng/trng_main.c \ |
| 73 | services/std_svc/trng/trng_entropy_pool.c |
| 74 | endif |
| 75 | |
Dimitris Papastamos | 5bdbb47 | 2017-10-13 12:06:06 +0100 | [diff] [blame] | 76 | ifeq (${ENABLE_SPE_FOR_LOWER_ELS},1) |
| 77 | BL31_SOURCES += lib/extensions/spe/spe.c |
| 78 | endif |
| 79 | |
Dimitris Papastamos | e08005a | 2017-10-12 13:02:29 +0100 | [diff] [blame] | 80 | ifeq (${ENABLE_AMU},1) |
Dimitris Papastamos | 525c37a | 2017-11-13 09:49:45 +0000 | [diff] [blame] | 81 | BL31_SOURCES += lib/extensions/amu/aarch64/amu.c \ |
| 82 | lib/extensions/amu/aarch64/amu_helpers.S |
Dimitris Papastamos | e08005a | 2017-10-12 13:02:29 +0100 | [diff] [blame] | 83 | endif |
| 84 | |
David Cunado | ce88eee | 2017-10-20 11:30:57 +0100 | [diff] [blame] | 85 | ifeq (${ENABLE_SVE_FOR_NS},1) |
| 86 | BL31_SOURCES += lib/extensions/sve/sve.c |
| 87 | endif |
| 88 | |
Jeenu Viswambharan | 2da918c | 2018-07-31 16:13:33 +0100 | [diff] [blame] | 89 | ifeq (${ENABLE_MPAM_FOR_LOWER_ELS},1) |
| 90 | BL31_SOURCES += lib/extensions/mpam/mpam.c |
| 91 | endif |
| 92 | |
Dimitris Papastamos | 446f7f1 | 2017-11-30 14:53:53 +0000 | [diff] [blame] | 93 | ifeq (${WORKAROUND_CVE_2017_5715},1) |
Dimitris Papastamos | 570c06a | 2018-04-06 15:29:34 +0100 | [diff] [blame] | 94 | BL31_SOURCES += lib/cpus/aarch64/wa_cve_2017_5715_bpiall.S \ |
| 95 | lib/cpus/aarch64/wa_cve_2017_5715_mmu.S |
Dimitris Papastamos | 446f7f1 | 2017-11-30 14:53:53 +0000 | [diff] [blame] | 96 | endif |
| 97 | |
Dan Handley | 176e7b4 | 2014-04-15 18:20:09 +0100 | [diff] [blame] | 98 | BL31_LINKERFILE := bl31/bl31.ld.S |
Achin Gupta | 9cf2bb7 | 2014-05-09 11:07:09 +0100 | [diff] [blame] | 99 | |
Sandrine Bailleux | f4119ec | 2015-12-17 13:58:58 +0000 | [diff] [blame] | 100 | # Flag used to indicate if Crash reporting via console should be included |
Juan Castillo | 7d19941 | 2015-12-14 09:35:25 +0000 | [diff] [blame] | 101 | # in BL31. This defaults to being present in DEBUG builds only |
Andrew Thoelke | 385f4d4 | 2014-06-03 11:50:53 +0100 | [diff] [blame] | 102 | ifndef CRASH_REPORTING |
| 103 | CRASH_REPORTING := $(DEBUG) |
| 104 | endif |
| 105 | |
Leonardo Sandoval | 65fca7c | 2020-09-10 12:18:27 -0500 | [diff] [blame] | 106 | $(eval $(call assert_booleans,\ |
| 107 | $(sort \ |
| 108 | CRASH_REPORTING \ |
| 109 | EL3_EXCEPTION_HANDLING \ |
| 110 | SDEI_SUPPORT \ |
| 111 | ))) |
Jeenu Viswambharan | 10a6727 | 2017-09-22 08:32:10 +0100 | [diff] [blame] | 112 | |
Leonardo Sandoval | 65fca7c | 2020-09-10 12:18:27 -0500 | [diff] [blame] | 113 | $(eval $(call add_defines,\ |
| 114 | $(sort \ |
| 115 | CRASH_REPORTING \ |
| 116 | EL3_EXCEPTION_HANDLING \ |
| 117 | SDEI_SUPPORT \ |
| 118 | ))) |