blob: fdcc93139ad3202d2b8fa5dea88f813d589e5711 [file] [log] [blame]
Achin Gupta4f6ad662013-10-25 09:08:21 +01001#
dp-arm230011c2017-03-07 11:02:47 +00002# Copyright (c) 2013-2017, 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################################################################################
8# Include SPM Makefile
9################################################################################
10ifeq (${ENABLE_SPM},1)
11$(info Including SPM makefile)
12include services/std_svc/spm/spm.mk
13endif
14
15
Soby Mathew0d786072016-03-24 16:56:29 +000016include lib/psci/psci_lib.mk
17
Dan Handley176e7b42014-04-15 18:20:09 +010018BL31_SOURCES += bl31/bl31_main.c \
Achin Gupta191e86e2014-05-09 10:03:15 +010019 bl31/interrupt_mgmt.c \
Dan Handley176e7b42014-04-15 18:20:09 +010020 bl31/aarch64/bl31_entrypoint.S \
Dan Handley176e7b42014-04-15 18:20:09 +010021 bl31/aarch64/runtime_exceptions.S \
Andrew Thoelke4d2d5532014-06-02 12:38:12 +010022 bl31/aarch64/crash_reporting.S \
Yatharth Kochar6c0566c2015-10-02 17:56:48 +010023 bl31/bl31_context_mgmt.c \
Soby Mathew0d786072016-03-24 16:56:29 +000024 common/runtime_svc.c \
dp-arm230011c2017-03-07 11:02:47 +000025 plat/common/aarch64/platform_mp_stack.S \
Dan Handley176e7b42014-04-15 18:20:09 +010026 services/std_svc/std_svc_setup.c \
Antonio Nino Diazc41f2062017-10-24 10:07:35 +010027 ${PSCI_LIB_SOURCES} \
28 ${SPM_SOURCES} \
29
Soby Mathew523d6332015-01-08 18:02:19 +000030
Yatharth Kochar9518d022016-03-11 14:20:19 +000031ifeq (${ENABLE_PMF}, 1)
32BL31_SOURCES += lib/pmf/pmf_main.c
33endif
34
Jeenu Viswambharan10a67272017-09-22 08:32:10 +010035ifeq (${EL3_EXCEPTION_HANDLING},1)
36BL31_SOURCES += bl31/ehf.c
37endif
38
Jeenu Viswambharan04e3a7f2017-10-16 08:43:14 +010039ifeq (${SDEI_SUPPORT},1)
40ifeq (${EL3_EXCEPTION_HANDLING},0)
41 $(error EL3_EXCEPTION_HANDLING must be 1 for SDEI support)
42endif
43BL31_SOURCES += services/std_svc/sdei/sdei_event.c \
44 services/std_svc/sdei/sdei_intr_mgmt.c \
45 services/std_svc/sdei/sdei_main.c \
46 services/std_svc/sdei/sdei_state.c
47endif
48
Dimitris Papastamos5bdbb472017-10-13 12:06:06 +010049ifeq (${ENABLE_SPE_FOR_LOWER_ELS},1)
50BL31_SOURCES += lib/extensions/spe/spe.c
51endif
52
Dimitris Papastamose08005a2017-10-12 13:02:29 +010053ifeq (${ENABLE_AMU},1)
54BL31_SOURCES += lib/extensions/amu/aarch64/amu.c
55endif
56
David Cunadoce88eee2017-10-20 11:30:57 +010057ifeq (${ENABLE_SVE_FOR_NS},1)
58BL31_SOURCES += lib/extensions/sve/sve.c
59endif
60
Dan Handley176e7b42014-04-15 18:20:09 +010061BL31_LINKERFILE := bl31/bl31.ld.S
Achin Gupta9cf2bb72014-05-09 11:07:09 +010062
Sandrine Bailleuxf4119ec2015-12-17 13:58:58 +000063# Flag used to indicate if Crash reporting via console should be included
Juan Castillo7d199412015-12-14 09:35:25 +000064# in BL31. This defaults to being present in DEBUG builds only
Andrew Thoelke385f4d42014-06-03 11:50:53 +010065ifndef CRASH_REPORTING
66CRASH_REPORTING := $(DEBUG)
67endif
68
69$(eval $(call assert_boolean,CRASH_REPORTING))
Jeenu Viswambharan10a67272017-09-22 08:32:10 +010070$(eval $(call assert_boolean,EL3_EXCEPTION_HANDLING))
Jeenu Viswambharan04e3a7f2017-10-16 08:43:14 +010071$(eval $(call assert_boolean,SDEI_SUPPORT))
Jeenu Viswambharan10a67272017-09-22 08:32:10 +010072
Andrew Thoelke385f4d42014-06-03 11:50:53 +010073$(eval $(call add_define,CRASH_REPORTING))
Jeenu Viswambharan10a67272017-09-22 08:32:10 +010074$(eval $(call add_define,EL3_EXCEPTION_HANDLING))
Jeenu Viswambharan04e3a7f2017-10-16 08:43:14 +010075$(eval $(call add_define,SDEI_SUPPORT))