blob: 67a1981e08422df100526bbe7cdbbd81f779a7d1 [file] [log] [blame]
Soby Mathewec8ac1c2016-05-05 14:32:05 +01001#
Dimitris Papastamos0a4cded2018-01-02 11:37:02 +00002# Copyright (c) 2016-2018, ARM Limited and Contributors. All rights reserved.
Soby Mathewec8ac1c2016-05-05 14:32:05 +01003#
dp-armfa3cf0b2017-05-03 09:38:09 +01004# SPDX-License-Identifier: BSD-3-Clause
Soby Mathewec8ac1c2016-05-05 14:32:05 +01005#
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 services/std_svc/std_svc_setup.c \
19 ${PSCI_LIB_SOURCES}
20
21ifeq (${ENABLE_PMF}, 1)
22BL32_SOURCES += lib/pmf/pmf_main.c
23endif
24
Dimitris Papastamosdda48b02017-10-17 14:03:14 +010025ifeq (${ENABLE_AMU}, 1)
26BL32_SOURCES += lib/extensions/amu/aarch32/amu.c
27endif
28
Dimitris Papastamos0a4cded2018-01-02 11:37:02 +000029ifeq (${WORKAROUND_CVE_2017_5715},1)
30BL32_SOURCES += bl32/sp_min/workaround_cve_2017_5715_bpiall.S \
31 bl32/sp_min/workaround_cve_2017_5715_icache_inv.S
32endif
33
Soby Mathewec8ac1c2016-05-05 14:32:05 +010034BL32_LINKERFILE := bl32/sp_min/sp_min.ld.S
35
36# Include the platform-specific SP_MIN Makefile
37# If no platform-specific SP_MIN Makefile exists, it means SP_MIN is not supported
38# on this platform.
39SP_MIN_PLAT_MAKEFILE := $(wildcard ${PLAT_DIR}/sp_min/sp_min-${PLAT}.mk)
40ifeq (,${SP_MIN_PLAT_MAKEFILE})
41 $(error SP_MIN is not supported on platform ${PLAT})
42else
43 include ${SP_MIN_PLAT_MAKEFILE}
44endif
45
Yatharth Kochar1c16a4c2016-06-30 14:50:58 +010046RESET_TO_SP_MIN := 0
Soby Mathewec8ac1c2016-05-05 14:32:05 +010047$(eval $(call add_define,RESET_TO_SP_MIN))
48$(eval $(call assert_boolean,RESET_TO_SP_MIN))
Etienne Carrieredc0fea72017-08-09 15:48:53 +020049
50# Flag to allow SP_MIN to handle FIQ interrupts in monitor mode. The platform
51# port is free to override this value. It is default disabled.
52SP_MIN_WITH_SECURE_FIQ ?= 0
53$(eval $(call add_define,SP_MIN_WITH_SECURE_FIQ))
54$(eval $(call assert_boolean,SP_MIN_WITH_SECURE_FIQ))