• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#
2# Copyright (c) 2016-2020, ARM Limited and Contributors. All rights reserved.
3#
4# SPDX-License-Identifier: BSD-3-Clause
5#
6
7ifneq (${ARCH}, aarch32)
8	$(error SP_MIN is only supported on AArch32 platforms)
9endif
10
11include lib/psci/psci_lib.mk
12
13INCLUDES		+=	-Iinclude/bl32/sp_min
14
15BL32_SOURCES		+=	bl32/sp_min/sp_min_main.c		\
16				bl32/sp_min/aarch32/entrypoint.S	\
17				common/runtime_svc.c			\
18				plat/common/aarch32/plat_sp_min_common.c\
19				services/std_svc/std_svc_setup.c	\
20				${PSCI_LIB_SOURCES}
21
22ifeq (${DISABLE_MTPMU},1)
23BL32_SOURCES		+=	lib/extensions/mtpmu/aarch32/mtpmu.S
24endif
25
26ifeq (${ENABLE_PMF}, 1)
27BL32_SOURCES		+=	lib/pmf/pmf_main.c
28endif
29
30ifeq (${ENABLE_AMU}, 1)
31BL32_SOURCES		+=	lib/extensions/amu/aarch32/amu.c\
32				lib/extensions/amu/aarch32/amu_helpers.S
33endif
34
35ifeq (${WORKAROUND_CVE_2017_5715},1)
36BL32_SOURCES		+=	bl32/sp_min/wa_cve_2017_5715_bpiall.S	\
37				bl32/sp_min/wa_cve_2017_5715_icache_inv.S
38endif
39
40ifeq (${TRNG_SUPPORT},1)
41BL32_SOURCES		+=	services/std_svc/trng/trng_main.c	\
42				services/std_svc/trng/trng_entropy_pool.c
43endif
44
45BL32_LINKERFILE	:=	bl32/sp_min/sp_min.ld.S
46
47# Include the platform-specific SP_MIN Makefile
48# If no platform-specific SP_MIN Makefile exists, it means SP_MIN is not supported
49# on this platform.
50SP_MIN_PLAT_MAKEFILE := $(wildcard ${PLAT_DIR}/sp_min/sp_min-${PLAT}.mk)
51ifeq (,${SP_MIN_PLAT_MAKEFILE})
52  $(error SP_MIN is not supported on platform ${PLAT})
53else
54  include ${SP_MIN_PLAT_MAKEFILE}
55endif
56
57RESET_TO_SP_MIN	:= 0
58$(eval $(call add_define,RESET_TO_SP_MIN))
59$(eval $(call assert_boolean,RESET_TO_SP_MIN))
60
61# Flag to allow SP_MIN to handle FIQ interrupts in monitor mode. The platform
62# port is free to override this value. It is default disabled.
63SP_MIN_WITH_SECURE_FIQ 	?= 0
64$(eval $(call add_define,SP_MIN_WITH_SECURE_FIQ))
65$(eval $(call assert_boolean,SP_MIN_WITH_SECURE_FIQ))
66