blob: 307ddab694fab41867d72f4123f81ce5eb7eebd9 [file] [log] [blame]
Achin Gupta4f6ad662013-10-25 09:08:21 +01001#
Dimitris Papastamos0dcdb1a2018-01-19 16:58:29 +00002# Copyright (c) 2013-2018, 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 \
Andrew Thoelke4d2d5532014-06-02 12:38:12 +010021 bl31/aarch64/crash_reporting.S \
Jeenu Viswambharan2de81532018-02-16 11:54:24 +000022 bl31/aarch64/runtime_exceptions.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 \
Jeenu Viswambharan2de81532018-02-16 11:54:24 +000025 lib/aarch64/setjmp.S \
dp-arm230011c2017-03-07 11:02:47 +000026 plat/common/aarch64/platform_mp_stack.S \
Dimitris Papastamos0dcdb1a2018-01-19 16:58:29 +000027 services/arm_arch_svc/arm_arch_svc_setup.c \
Dan Handley176e7b42014-04-15 18:20:09 +010028 services/std_svc/std_svc_setup.c \
Antonio Nino Diazc41f2062017-10-24 10:07:35 +010029 ${PSCI_LIB_SOURCES} \
Jeenu Viswambharan2de81532018-02-16 11:54:24 +000030 ${SPM_SOURCES}
Antonio Nino Diazc41f2062017-10-24 10:07:35 +010031
Soby Mathew523d6332015-01-08 18:02:19 +000032
Yatharth Kochar9518d022016-03-11 14:20:19 +000033ifeq (${ENABLE_PMF}, 1)
34BL31_SOURCES += lib/pmf/pmf_main.c
35endif
36
Jeenu Viswambharan10a67272017-09-22 08:32:10 +010037ifeq (${EL3_EXCEPTION_HANDLING},1)
38BL31_SOURCES += bl31/ehf.c
39endif
40
Jeenu Viswambharan04e3a7f2017-10-16 08:43:14 +010041ifeq (${SDEI_SUPPORT},1)
42ifeq (${EL3_EXCEPTION_HANDLING},0)
43 $(error EL3_EXCEPTION_HANDLING must be 1 for SDEI support)
44endif
Jeenu Viswambharan8b7e6bc2018-02-16 12:07:48 +000045BL31_SOURCES += services/std_svc/sdei/sdei_dispatch.S \
46 services/std_svc/sdei/sdei_event.c \
Jeenu Viswambharan04e3a7f2017-10-16 08:43:14 +010047 services/std_svc/sdei/sdei_intr_mgmt.c \
48 services/std_svc/sdei/sdei_main.c \
49 services/std_svc/sdei/sdei_state.c
50endif
51
Dimitris Papastamos5bdbb472017-10-13 12:06:06 +010052ifeq (${ENABLE_SPE_FOR_LOWER_ELS},1)
53BL31_SOURCES += lib/extensions/spe/spe.c
54endif
55
Dimitris Papastamose08005a2017-10-12 13:02:29 +010056ifeq (${ENABLE_AMU},1)
Dimitris Papastamos525c37a2017-11-13 09:49:45 +000057BL31_SOURCES += lib/extensions/amu/aarch64/amu.c \
58 lib/extensions/amu/aarch64/amu_helpers.S
Dimitris Papastamose08005a2017-10-12 13:02:29 +010059endif
60
David Cunadoce88eee2017-10-20 11:30:57 +010061ifeq (${ENABLE_SVE_FOR_NS},1)
62BL31_SOURCES += lib/extensions/sve/sve.c
63endif
64
Dimitris Papastamos446f7f12017-11-30 14:53:53 +000065ifeq (${WORKAROUND_CVE_2017_5715},1)
Dimitris Papastamos570c06a2018-04-06 15:29:34 +010066BL31_SOURCES += lib/cpus/aarch64/wa_cve_2017_5715_bpiall.S \
67 lib/cpus/aarch64/wa_cve_2017_5715_mmu.S
Dimitris Papastamos446f7f12017-11-30 14:53:53 +000068endif
69
Dan Handley176e7b42014-04-15 18:20:09 +010070BL31_LINKERFILE := bl31/bl31.ld.S
Achin Gupta9cf2bb72014-05-09 11:07:09 +010071
Sandrine Bailleuxf4119ec2015-12-17 13:58:58 +000072# Flag used to indicate if Crash reporting via console should be included
Juan Castillo7d199412015-12-14 09:35:25 +000073# in BL31. This defaults to being present in DEBUG builds only
Andrew Thoelke385f4d42014-06-03 11:50:53 +010074ifndef CRASH_REPORTING
75CRASH_REPORTING := $(DEBUG)
76endif
77
78$(eval $(call assert_boolean,CRASH_REPORTING))
Jeenu Viswambharan10a67272017-09-22 08:32:10 +010079$(eval $(call assert_boolean,EL3_EXCEPTION_HANDLING))
Jeenu Viswambharan04e3a7f2017-10-16 08:43:14 +010080$(eval $(call assert_boolean,SDEI_SUPPORT))
Jeenu Viswambharan10a67272017-09-22 08:32:10 +010081
Andrew Thoelke385f4d42014-06-03 11:50:53 +010082$(eval $(call add_define,CRASH_REPORTING))
Jeenu Viswambharan10a67272017-09-22 08:32:10 +010083$(eval $(call add_define,EL3_EXCEPTION_HANDLING))
Jeenu Viswambharan04e3a7f2017-10-16 08:43:14 +010084$(eval $(call add_define,SDEI_SUPPORT))