bl31.mk 2.56 KB
Newer Older
1
#
2
# Copyright (c) 2013-2018, 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
################################################################################
# Include SPM Makefile
################################################################################
ifeq (${ENABLE_SPM},1)
11
12
13
ifeq (${EL3_EXCEPTION_HANDLING},0)
  $(error EL3_EXCEPTION_HANDLING must be 1 for SPM support)
endif
14
15
16
17
18
$(info Including SPM makefile)
include services/std_svc/spm/spm.mk
endif


19
20
include lib/psci/psci_lib.mk

Dan Handley's avatar
Dan Handley committed
21
BL31_SOURCES		+=	bl31/bl31_main.c				\
22
				bl31/interrupt_mgmt.c				\
Dan Handley's avatar
Dan Handley committed
23
				bl31/aarch64/bl31_entrypoint.S			\
24
				bl31/aarch64/crash_reporting.S			\
25
				bl31/aarch64/ea_delegate.S			\
26
				bl31/aarch64/runtime_exceptions.S		\
27
				bl31/bl31_context_mgmt.c			\
28
				common/runtime_svc.c				\
29
				lib/aarch64/setjmp.S				\
30
				lib/cpus/aarch64/dsu_helpers.S			\
31
				plat/common/aarch64/platform_mp_stack.S		\
32
				services/arm_arch_svc/arm_arch_svc_setup.c	\
Dan Handley's avatar
Dan Handley committed
33
				services/std_svc/std_svc_setup.c		\
34
				${PSCI_LIB_SOURCES}				\
35
				${SPM_SOURCES}
36

37

38
39
40
41
ifeq (${ENABLE_PMF}, 1)
BL31_SOURCES		+=	lib/pmf/pmf_main.c
endif

42
43
44
45
ifeq (${EL3_EXCEPTION_HANDLING},1)
BL31_SOURCES		+=	bl31/ehf.c
endif

Jeenu Viswambharan's avatar
Jeenu Viswambharan committed
46
47
48
49
ifeq (${SDEI_SUPPORT},1)
ifeq (${EL3_EXCEPTION_HANDLING},0)
  $(error EL3_EXCEPTION_HANDLING must be 1 for SDEI support)
endif
50
51
BL31_SOURCES		+=	services/std_svc/sdei/sdei_dispatch.S	\
				services/std_svc/sdei/sdei_event.c	\
Jeenu Viswambharan's avatar
Jeenu Viswambharan committed
52
53
54
55
56
				services/std_svc/sdei/sdei_intr_mgmt.c	\
				services/std_svc/sdei/sdei_main.c	\
				services/std_svc/sdei/sdei_state.c
endif

57
58
59
60
ifeq (${ENABLE_SPE_FOR_LOWER_ELS},1)
BL31_SOURCES		+=	lib/extensions/spe/spe.c
endif

61
ifeq (${ENABLE_AMU},1)
62
63
BL31_SOURCES		+=	lib/extensions/amu/aarch64/amu.c		\
				lib/extensions/amu/aarch64/amu_helpers.S
64
65
endif

David Cunado's avatar
David Cunado committed
66
67
68
69
ifeq (${ENABLE_SVE_FOR_NS},1)
BL31_SOURCES		+=	lib/extensions/sve/sve.c
endif

70
71
72
73
ifeq (${ENABLE_MPAM_FOR_LOWER_ELS},1)
BL31_SOURCES		+=	lib/extensions/mpam/mpam.c
endif

74
ifeq (${WORKAROUND_CVE_2017_5715},1)
75
76
BL31_SOURCES		+=	lib/cpus/aarch64/wa_cve_2017_5715_bpiall.S	\
				lib/cpus/aarch64/wa_cve_2017_5715_mmu.S
77
78
endif

Dan Handley's avatar
Dan Handley committed
79
BL31_LINKERFILE		:=	bl31/bl31.ld.S
80

81
# Flag used to indicate if Crash reporting via console should be included
82
# in BL31. This defaults to being present in DEBUG builds only
83
84
85
86
87
ifndef CRASH_REPORTING
CRASH_REPORTING		:=	$(DEBUG)
endif

$(eval $(call assert_boolean,CRASH_REPORTING))
88
$(eval $(call assert_boolean,EL3_EXCEPTION_HANDLING))
Jeenu Viswambharan's avatar
Jeenu Viswambharan committed
89
$(eval $(call assert_boolean,SDEI_SUPPORT))
90

91
$(eval $(call add_define,CRASH_REPORTING))
92
$(eval $(call add_define,EL3_EXCEPTION_HANDLING))
Jeenu Viswambharan's avatar
Jeenu Viswambharan committed
93
$(eval $(call add_define,SDEI_SUPPORT))