xref: /rk3399_ARM-atf/bl32/sp_min/sp_min.mk (revision ef69e1ea629542865f2c9b04df578aaa3966fb6a)
1c11ba852SSoby Mathew#
2*ef69e1eaSDimitris Papastamos# Copyright (c) 2016-2017, ARM Limited and Contributors. All rights reserved.
3c11ba852SSoby Mathew#
482cb2c1aSdp-arm# SPDX-License-Identifier: BSD-3-Clause
5c11ba852SSoby Mathew#
6c11ba852SSoby Mathew
7c11ba852SSoby Mathewifneq (${ARCH}, aarch32)
8c11ba852SSoby Mathew	$(error SP_MIN is only supported on AArch32 platforms)
9c11ba852SSoby Mathewendif
10c11ba852SSoby Mathew
11c11ba852SSoby Mathewinclude lib/psci/psci_lib.mk
12c11ba852SSoby Mathew
13c11ba852SSoby MathewINCLUDES		+=	-Iinclude/bl32/sp_min
14c11ba852SSoby Mathew
15c11ba852SSoby MathewBL32_SOURCES		+=	bl32/sp_min/sp_min_main.c		\
16c11ba852SSoby Mathew				bl32/sp_min/aarch32/entrypoint.S	\
17c11ba852SSoby Mathew				common/runtime_svc.c			\
18c11ba852SSoby Mathew				services/std_svc/std_svc_setup.c	\
19c11ba852SSoby Mathew				${PSCI_LIB_SOURCES}
20c11ba852SSoby Mathew
21c11ba852SSoby Mathewifeq (${ENABLE_PMF}, 1)
22c11ba852SSoby MathewBL32_SOURCES		+=	lib/pmf/pmf_main.c
23c11ba852SSoby Mathewendif
24c11ba852SSoby Mathew
25*ef69e1eaSDimitris Papastamosifeq (${ENABLE_AMU}, 1)
26*ef69e1eaSDimitris PapastamosBL32_SOURCES		+=	lib/extensions/amu/aarch32/amu.c
27*ef69e1eaSDimitris Papastamosendif
28*ef69e1eaSDimitris Papastamos
29c11ba852SSoby MathewBL32_LINKERFILE	:=	bl32/sp_min/sp_min.ld.S
30c11ba852SSoby Mathew
31c11ba852SSoby Mathew# Include the platform-specific SP_MIN Makefile
32c11ba852SSoby Mathew# If no platform-specific SP_MIN Makefile exists, it means SP_MIN is not supported
33c11ba852SSoby Mathew# on this platform.
34c11ba852SSoby MathewSP_MIN_PLAT_MAKEFILE := $(wildcard ${PLAT_DIR}/sp_min/sp_min-${PLAT}.mk)
35c11ba852SSoby Mathewifeq (,${SP_MIN_PLAT_MAKEFILE})
36c11ba852SSoby Mathew  $(error SP_MIN is not supported on platform ${PLAT})
37c11ba852SSoby Mathewelse
38c11ba852SSoby Mathew  include ${SP_MIN_PLAT_MAKEFILE}
39c11ba852SSoby Mathewendif
40c11ba852SSoby Mathew
41d9915518SYatharth KocharRESET_TO_SP_MIN	:= 0
42c11ba852SSoby Mathew$(eval $(call add_define,RESET_TO_SP_MIN))
43c11ba852SSoby Mathew$(eval $(call assert_boolean,RESET_TO_SP_MIN))
4471816096SEtienne Carriere
4571816096SEtienne Carriere# Flag to allow SP_MIN to handle FIQ interrupts in monitor mode. The platform
4671816096SEtienne Carriere# port is free to override this value. It is default disabled.
4771816096SEtienne CarriereSP_MIN_WITH_SECURE_FIQ 	?= 0
4871816096SEtienne Carriere$(eval $(call add_define,SP_MIN_WITH_SECURE_FIQ))
4971816096SEtienne Carriere$(eval $(call assert_boolean,SP_MIN_WITH_SECURE_FIQ))
50