blob: 0948e94e0925b7d49cd3bc1f910a8b722595fd9f [file] [log] [blame]
Achin Gupta4f6ad662013-10-25 09:08:21 +01001#
Antonio Nino Diazcbccdbf2019-01-21 11:53:29 +00002# Copyright (c) 2013-2019, ARM Limited and Contributors. All rights reserved.
Achin Gupta4f6ad662013-10-25 09:08:21 +01003#
dp-armfa3cf0b2017-05-03 09:38:09 +01004# SPDX-License-Identifier: BSD-3-Clause
Achin Gupta4f6ad662013-10-25 09:08:21 +01005#
6
Antonio Nino Diazc41f2062017-10-24 10:07:35 +01007################################################################################
Paul Beesleydb4e25a2019-10-14 15:27:12 +00008# Include Makefile for the SPM-MM implementation
Antonio Nino Diazc41f2062017-10-24 10:07:35 +01009################################################################################
Paul Beesleyfe975b42019-09-16 11:29:03 +000010ifeq (${SPM_MM},1)
11 ifeq (${EL3_EXCEPTION_HANDLING},0)
Paul Beesleydb4e25a2019-10-14 15:27:12 +000012 $(error EL3_EXCEPTION_HANDLING must be 1 for SPM-MM support)
Antonio Nino Diaz8cd7ea32018-10-30 11:08:08 +000013 else
Paul Beesleyfe975b42019-09-16 11:29:03 +000014 $(info Including SPM Management Mode (MM) makefile)
Paul Beesley72f9ec62019-10-15 14:20:34 +000015 include services/std_svc/spm_mm/spm_mm.mk
Antonio Nino Diaz8cd7ea32018-10-30 11:08:08 +000016 endif
Antonio Nino Diazc41f2062017-10-24 10:07:35 +010017endif
18
Soby Mathew0d786072016-03-24 16:56:29 +000019include lib/psci/psci_lib.mk
20
Dan Handley176e7b42014-04-15 18:20:09 +010021BL31_SOURCES += bl31/bl31_main.c \
Achin Gupta191e86e2014-05-09 10:03:15 +010022 bl31/interrupt_mgmt.c \
Dan Handley176e7b42014-04-15 18:20:09 +010023 bl31/aarch64/bl31_entrypoint.S \
Andrew Thoelke4d2d5532014-06-02 12:38:12 +010024 bl31/aarch64/crash_reporting.S \
Jeenu Viswambharane86a2472018-07-05 15:24:45 +010025 bl31/aarch64/ea_delegate.S \
Jeenu Viswambharan2de81532018-02-16 11:54:24 +000026 bl31/aarch64/runtime_exceptions.S \
Yatharth Kochar6c0566c2015-10-02 17:56:48 +010027 bl31/bl31_context_mgmt.c \
Soby Mathew0d786072016-03-24 16:56:29 +000028 common/runtime_svc.c \
John Tsichritzis4daa1de2018-07-23 09:11:59 +010029 lib/cpus/aarch64/dsu_helpers.S \
dp-arm230011c2017-03-07 11:02:47 +000030 plat/common/aarch64/platform_mp_stack.S \
Dimitris Papastamos0dcdb1a2018-01-19 16:58:29 +000031 services/arm_arch_svc/arm_arch_svc_setup.c \
Dan Handley176e7b42014-04-15 18:20:09 +010032 services/std_svc/std_svc_setup.c \
Antonio Nino Diazc41f2062017-10-24 10:07:35 +010033 ${PSCI_LIB_SOURCES} \
Achin Gupta60b7b8a2019-10-11 15:50:43 +010034 ${SPMD_SOURCES} \
Jeenu Viswambharan2de81532018-02-16 11:54:24 +000035 ${SPM_SOURCES}
Antonio Nino Diazc41f2062017-10-24 10:07:35 +010036
Soby Mathew523d6332015-01-08 18:02:19 +000037
Yatharth Kochar9518d022016-03-11 14:20:19 +000038ifeq (${ENABLE_PMF}, 1)
39BL31_SOURCES += lib/pmf/pmf_main.c
40endif
41
Olivier Deprezcb4c5622019-09-19 17:46:46 +020042include lib/debugfs/debugfs.mk
43ifeq (${USE_DEBUGFS},1)
44 BL31_SOURCES += $(DEBUGFS_SRCS)
45endif
46
Jeenu Viswambharan10a67272017-09-22 08:32:10 +010047ifeq (${EL3_EXCEPTION_HANDLING},1)
48BL31_SOURCES += bl31/ehf.c
49endif
50
Jeenu Viswambharan04e3a7f2017-10-16 08:43:14 +010051ifeq (${SDEI_SUPPORT},1)
52ifeq (${EL3_EXCEPTION_HANDLING},0)
53 $(error EL3_EXCEPTION_HANDLING must be 1 for SDEI support)
54endif
Jeenu Viswambharan8b7e6bc2018-02-16 12:07:48 +000055BL31_SOURCES += services/std_svc/sdei/sdei_dispatch.S \
56 services/std_svc/sdei/sdei_event.c \
Jeenu Viswambharan04e3a7f2017-10-16 08:43:14 +010057 services/std_svc/sdei/sdei_intr_mgmt.c \
58 services/std_svc/sdei/sdei_main.c \
59 services/std_svc/sdei/sdei_state.c
60endif
61
Dimitris Papastamos5bdbb472017-10-13 12:06:06 +010062ifeq (${ENABLE_SPE_FOR_LOWER_ELS},1)
63BL31_SOURCES += lib/extensions/spe/spe.c
64endif
65
Dimitris Papastamose08005a2017-10-12 13:02:29 +010066ifeq (${ENABLE_AMU},1)
Dimitris Papastamos525c37a2017-11-13 09:49:45 +000067BL31_SOURCES += lib/extensions/amu/aarch64/amu.c \
68 lib/extensions/amu/aarch64/amu_helpers.S
Dimitris Papastamose08005a2017-10-12 13:02:29 +010069endif
70
David Cunadoce88eee2017-10-20 11:30:57 +010071ifeq (${ENABLE_SVE_FOR_NS},1)
72BL31_SOURCES += lib/extensions/sve/sve.c
73endif
74
Jeenu Viswambharan2da918c2018-07-31 16:13:33 +010075ifeq (${ENABLE_MPAM_FOR_LOWER_ELS},1)
76BL31_SOURCES += lib/extensions/mpam/mpam.c
77endif
78
Dimitris Papastamos446f7f12017-11-30 14:53:53 +000079ifeq (${WORKAROUND_CVE_2017_5715},1)
Dimitris Papastamos570c06a2018-04-06 15:29:34 +010080BL31_SOURCES += lib/cpus/aarch64/wa_cve_2017_5715_bpiall.S \
81 lib/cpus/aarch64/wa_cve_2017_5715_mmu.S
Dimitris Papastamos446f7f12017-11-30 14:53:53 +000082endif
83
Dan Handley176e7b42014-04-15 18:20:09 +010084BL31_LINKERFILE := bl31/bl31.ld.S
Achin Gupta9cf2bb72014-05-09 11:07:09 +010085
Sandrine Bailleuxf4119ec2015-12-17 13:58:58 +000086# Flag used to indicate if Crash reporting via console should be included
Juan Castillo7d199412015-12-14 09:35:25 +000087# in BL31. This defaults to being present in DEBUG builds only
Andrew Thoelke385f4d42014-06-03 11:50:53 +010088ifndef CRASH_REPORTING
89CRASH_REPORTING := $(DEBUG)
90endif
91
92$(eval $(call assert_boolean,CRASH_REPORTING))
Jeenu Viswambharan10a67272017-09-22 08:32:10 +010093$(eval $(call assert_boolean,EL3_EXCEPTION_HANDLING))
Jeenu Viswambharan04e3a7f2017-10-16 08:43:14 +010094$(eval $(call assert_boolean,SDEI_SUPPORT))
Jeenu Viswambharan10a67272017-09-22 08:32:10 +010095
Andrew Thoelke385f4d42014-06-03 11:50:53 +010096$(eval $(call add_define,CRASH_REPORTING))
Jeenu Viswambharan10a67272017-09-22 08:32:10 +010097$(eval $(call add_define,EL3_EXCEPTION_HANDLING))
Jeenu Viswambharan04e3a7f2017-10-16 08:43:14 +010098$(eval $(call add_define,SDEI_SUPPORT))