xref: /rk3399_ARM-atf/bl32/sp_min/sp_min.mk (revision 53bfb94ececbed0fd6eb3550c79254a928a13067)
1#
2# Copyright (c) 2016-2017, 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				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
25ifeq (${ENABLE_AMU}, 1)
26BL32_SOURCES		+=	lib/extensions/amu/aarch32/amu.c
27endif
28
29BL32_LINKERFILE	:=	bl32/sp_min/sp_min.ld.S
30
31# Include the platform-specific SP_MIN Makefile
32# If no platform-specific SP_MIN Makefile exists, it means SP_MIN is not supported
33# on this platform.
34SP_MIN_PLAT_MAKEFILE := $(wildcard ${PLAT_DIR}/sp_min/sp_min-${PLAT}.mk)
35ifeq (,${SP_MIN_PLAT_MAKEFILE})
36  $(error SP_MIN is not supported on platform ${PLAT})
37else
38  include ${SP_MIN_PLAT_MAKEFILE}
39endif
40
41RESET_TO_SP_MIN	:= 0
42$(eval $(call add_define,RESET_TO_SP_MIN))
43$(eval $(call assert_boolean,RESET_TO_SP_MIN))
44
45# Flag to allow SP_MIN to handle FIQ interrupts in monitor mode. The platform
46# port is free to override this value. It is default disabled.
47SP_MIN_WITH_SECURE_FIQ 	?= 0
48$(eval $(call add_define,SP_MIN_WITH_SECURE_FIQ))
49$(eval $(call assert_boolean,SP_MIN_WITH_SECURE_FIQ))
50