xref: /rk3399_ARM-atf/bl31/bl31.mk (revision 53bfb94ececbed0fd6eb3550c79254a928a13067)
1#
2# Copyright (c) 2013-2017, ARM Limited and Contributors. All rights reserved.
3#
4# SPDX-License-Identifier: BSD-3-Clause
5#
6
7################################################################################
8# Include SPM Makefile
9################################################################################
10ifeq (${ENABLE_SPM},1)
11$(info Including SPM makefile)
12include services/std_svc/spm/spm.mk
13endif
14
15
16include lib/psci/psci_lib.mk
17
18BL31_SOURCES		+=	bl31/bl31_main.c				\
19				bl31/interrupt_mgmt.c				\
20				bl31/aarch64/bl31_entrypoint.S			\
21				bl31/aarch64/runtime_exceptions.S		\
22				bl31/aarch64/crash_reporting.S			\
23				bl31/bl31_context_mgmt.c			\
24				common/runtime_svc.c				\
25				plat/common/aarch64/platform_mp_stack.S		\
26				services/std_svc/std_svc_setup.c		\
27				${PSCI_LIB_SOURCES}				\
28				${SPM_SOURCES}					\
29
30
31ifeq (${ENABLE_PMF}, 1)
32BL31_SOURCES		+=	lib/pmf/pmf_main.c
33endif
34
35ifeq (${EL3_EXCEPTION_HANDLING},1)
36BL31_SOURCES		+=	bl31/ehf.c
37endif
38
39ifeq (${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
49ifeq (${ENABLE_SPE_FOR_LOWER_ELS},1)
50BL31_SOURCES		+=	lib/extensions/spe/spe.c
51endif
52
53ifeq (${ENABLE_AMU},1)
54BL31_SOURCES		+=	lib/extensions/amu/aarch64/amu.c		\
55				lib/extensions/amu/aarch64/amu_helpers.S
56endif
57
58ifeq (${ENABLE_SVE_FOR_NS},1)
59BL31_SOURCES		+=	lib/extensions/sve/sve.c
60endif
61
62BL31_LINKERFILE		:=	bl31/bl31.ld.S
63
64# Flag used to indicate if Crash reporting via console should be included
65# in BL31. This defaults to being present in DEBUG builds only
66ifndef CRASH_REPORTING
67CRASH_REPORTING		:=	$(DEBUG)
68endif
69
70$(eval $(call assert_boolean,CRASH_REPORTING))
71$(eval $(call assert_boolean,EL3_EXCEPTION_HANDLING))
72$(eval $(call assert_boolean,SDEI_SUPPORT))
73
74$(eval $(call add_define,CRASH_REPORTING))
75$(eval $(call add_define,EL3_EXCEPTION_HANDLING))
76$(eval $(call add_define,SDEI_SUPPORT))
77