2 # Copyright (c) 2013-2019, ARM Limited and Contributors. All rights reserved.
4 # SPDX-License-Identifier: BSD-3-Clause
7 ################################################################################
9 ################################################################################
10 ifeq (${ENABLE_SPM},1)
12 ifeq (${EL3_EXCEPTION_HANDLING},0)
13 $(error EL3_EXCEPTION_HANDLING must be
1 for SPM support
)
15 $(info Including makefile of SPM based on MM
)
16 include services
/std_svc
/spm_mm
/spm.mk
18 $(info Including SPM makefile
)
19 include services
/std_svc
/spm
/spm.mk
24 include lib
/psci
/psci_lib.mk
26 BL31_SOURCES
+= bl31
/bl31_main.c \
27 bl31
/interrupt_mgmt.c \
28 bl31
/aarch64
/bl31_entrypoint.S \
29 bl31
/aarch64
/crash_reporting.S \
30 bl31
/aarch64
/ea_delegate.S \
31 bl31
/aarch64
/runtime_exceptions.S \
32 bl31
/bl31_context_mgmt.c \
33 common
/runtime_svc.c \
34 lib
/cpus
/aarch64
/dsu_helpers.S \
35 plat
/common
/aarch64
/platform_mp_stack.S \
36 services
/arm_arch_svc
/arm_arch_svc_setup.c \
37 services
/std_svc
/std_svc_setup.c \
42 ifeq (${ENABLE_PMF}, 1)
43 BL31_SOURCES
+= lib
/pmf
/pmf_main.c
46 ifeq (${EL3_EXCEPTION_HANDLING},1)
47 BL31_SOURCES
+= bl31
/ehf.c
50 ifeq (${SDEI_SUPPORT},1)
51 ifeq (${EL3_EXCEPTION_HANDLING},0)
52 $(error EL3_EXCEPTION_HANDLING must be
1 for SDEI support
)
54 BL31_SOURCES
+= services
/std_svc
/sdei
/sdei_dispatch.S \
55 services
/std_svc
/sdei
/sdei_event.c \
56 services
/std_svc
/sdei
/sdei_intr_mgmt.c \
57 services
/std_svc
/sdei
/sdei_main.c \
58 services
/std_svc
/sdei
/sdei_state.c
61 ifeq (${ENABLE_SPE_FOR_LOWER_ELS},1)
62 BL31_SOURCES
+= lib
/extensions
/spe
/spe.c
65 ifeq (${ENABLE_AMU},1)
66 BL31_SOURCES
+= lib
/extensions
/amu
/aarch64
/amu.c \
67 lib
/extensions
/amu
/aarch64
/amu_helpers.S
70 ifeq (${ENABLE_SVE_FOR_NS},1)
71 BL31_SOURCES
+= lib
/extensions
/sve
/sve.c
74 ifeq (${ENABLE_MPAM_FOR_LOWER_ELS},1)
75 BL31_SOURCES
+= lib
/extensions
/mpam
/mpam.c
78 ifeq (${WORKAROUND_CVE_2017_5715},1)
79 BL31_SOURCES
+= lib
/cpus
/aarch64
/wa_cve_2017_5715_bpiall.S \
80 lib
/cpus
/aarch64
/wa_cve_2017_5715_mmu.S
83 BL31_LINKERFILE
:= bl31
/bl31.
ld.S
85 # Flag used to indicate if Crash reporting via console should be included
86 # in BL31. This defaults to being present in DEBUG builds only
87 ifndef CRASH_REPORTING
88 CRASH_REPORTING
:= $(DEBUG
)
91 $(eval
$(call assert_boolean
,CRASH_REPORTING
))
92 $(eval
$(call assert_boolean
,EL3_EXCEPTION_HANDLING
))
93 $(eval
$(call assert_boolean
,SDEI_SUPPORT
))
95 $(eval
$(call add_define
,CRASH_REPORTING
))
96 $(eval
$(call add_define
,EL3_EXCEPTION_HANDLING
))
97 $(eval
$(call add_define
,SDEI_SUPPORT
))