bl31.mk 1.91 KB
Newer Older
1
#
2
# Copyright (c) 2013-2017, ARM Limited and Contributors. All rights reserved.
3
#
dp-arm's avatar
dp-arm committed
4
# SPDX-License-Identifier: BSD-3-Clause
5
6
#

7
8
9
10
11
12
13
14
15
################################################################################
# Include SPM Makefile
################################################################################
ifeq (${ENABLE_SPM},1)
$(info Including SPM makefile)
include services/std_svc/spm/spm.mk
endif


16
17
include lib/psci/psci_lib.mk

Dan Handley's avatar
Dan Handley committed
18
BL31_SOURCES		+=	bl31/bl31_main.c				\
19
				bl31/interrupt_mgmt.c				\
Dan Handley's avatar
Dan Handley committed
20
21
				bl31/aarch64/bl31_entrypoint.S			\
				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		\
Dan Handley's avatar
Dan Handley committed
26
				services/std_svc/std_svc_setup.c		\
27
28
29
				${PSCI_LIB_SOURCES}				\
				${SPM_SOURCES}					\

30

31
32
33
34
ifeq (${ENABLE_PMF}, 1)
BL31_SOURCES		+=	lib/pmf/pmf_main.c
endif

35
36
37
38
ifeq (${EL3_EXCEPTION_HANDLING},1)
BL31_SOURCES		+=	bl31/ehf.c
endif

Jeenu Viswambharan's avatar
Jeenu Viswambharan committed
39
40
41
42
43
44
45
46
47
48
ifeq (${SDEI_SUPPORT},1)
ifeq (${EL3_EXCEPTION_HANDLING},0)
  $(error EL3_EXCEPTION_HANDLING must be 1 for SDEI support)
endif
BL31_SOURCES		+=	services/std_svc/sdei/sdei_event.c	\
				services/std_svc/sdei/sdei_intr_mgmt.c	\
				services/std_svc/sdei/sdei_main.c	\
				services/std_svc/sdei/sdei_state.c
endif

49
50
51
52
ifeq (${ENABLE_SPE_FOR_LOWER_ELS},1)
BL31_SOURCES		+=	lib/extensions/spe/spe.c
endif

53
54
55
56
ifeq (${ENABLE_AMU},1)
BL31_SOURCES		+=	lib/extensions/amu/aarch64/amu.c
endif

Dan Handley's avatar
Dan Handley committed
57
BL31_LINKERFILE		:=	bl31/bl31.ld.S
58

59
# Flag used to indicate if Crash reporting via console should be included
60
# in BL31. This defaults to being present in DEBUG builds only
61
62
63
64
65
ifndef CRASH_REPORTING
CRASH_REPORTING		:=	$(DEBUG)
endif

$(eval $(call assert_boolean,CRASH_REPORTING))
66
$(eval $(call assert_boolean,EL3_EXCEPTION_HANDLING))
Jeenu Viswambharan's avatar
Jeenu Viswambharan committed
67
$(eval $(call assert_boolean,SDEI_SUPPORT))
68

69
$(eval $(call add_define,CRASH_REPORTING))
70
$(eval $(call add_define,EL3_EXCEPTION_HANDLING))
Jeenu Viswambharan's avatar
Jeenu Viswambharan committed
71
$(eval $(call add_define,SDEI_SUPPORT))