xref: /rk3399_ARM-atf/bl32/sp_min/sp_min.mk (revision 0e14948e2ae2c0b491a1cf2e2de00433e4a95dbe)
1c11ba852SSoby Mathew#
20063dd17SJavier Almansa Sobrino# Copyright (c) 2016-2020, 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			\
180ed8c001SSoby Mathew				plat/common/aarch32/plat_sp_min_common.c\
19c11ba852SSoby Mathew				services/std_svc/std_svc_setup.c	\
20c11ba852SSoby Mathew				${PSCI_LIB_SOURCES}
21c11ba852SSoby Mathew
220063dd17SJavier Almansa Sobrinoifeq (${DISABLE_MTPMU},1)
230063dd17SJavier Almansa SobrinoBL32_SOURCES		+=	lib/extensions/mtpmu/aarch32/mtpmu.S
240063dd17SJavier Almansa Sobrinoendif
250063dd17SJavier Almansa Sobrino
26c11ba852SSoby Mathewifeq (${ENABLE_PMF}, 1)
27c11ba852SSoby MathewBL32_SOURCES		+=	lib/pmf/pmf_main.c
28c11ba852SSoby Mathewendif
29c11ba852SSoby Mathew
30ef69e1eaSDimitris Papastamosifeq (${ENABLE_AMU}, 1)
31ce213b96SJoel HuttonBL32_SOURCES		+=	lib/extensions/amu/aarch32/amu.c\
32ce213b96SJoel Hutton				lib/extensions/amu/aarch32/amu_helpers.S
33ef69e1eaSDimitris Papastamosendif
34ef69e1eaSDimitris Papastamos
357343505dSDimitris Papastamosifeq (${WORKAROUND_CVE_2017_5715},1)
362c3a1078SDimitris PapastamosBL32_SOURCES		+=	bl32/sp_min/wa_cve_2017_5715_bpiall.S	\
372c3a1078SDimitris Papastamos				bl32/sp_min/wa_cve_2017_5715_icache_inv.S
387343505dSDimitris Papastamosendif
397343505dSDimitris Papastamos
40*0e14948eSAndre Przywaraifeq (${TRNG_SUPPORT},1)
41*0e14948eSAndre PrzywaraBL32_SOURCES		+=	services/std_svc/trng/trng_main.c	\
42*0e14948eSAndre Przywara				services/std_svc/trng/trng_entropy_pool.c
43*0e14948eSAndre Przywaraendif
44*0e14948eSAndre Przywara
45c11ba852SSoby MathewBL32_LINKERFILE	:=	bl32/sp_min/sp_min.ld.S
46c11ba852SSoby Mathew
47c11ba852SSoby Mathew# Include the platform-specific SP_MIN Makefile
48c11ba852SSoby Mathew# If no platform-specific SP_MIN Makefile exists, it means SP_MIN is not supported
49c11ba852SSoby Mathew# on this platform.
50c11ba852SSoby MathewSP_MIN_PLAT_MAKEFILE := $(wildcard ${PLAT_DIR}/sp_min/sp_min-${PLAT}.mk)
51c11ba852SSoby Mathewifeq (,${SP_MIN_PLAT_MAKEFILE})
52c11ba852SSoby Mathew  $(error SP_MIN is not supported on platform ${PLAT})
53c11ba852SSoby Mathewelse
54c11ba852SSoby Mathew  include ${SP_MIN_PLAT_MAKEFILE}
55c11ba852SSoby Mathewendif
56c11ba852SSoby Mathew
57d9915518SYatharth KocharRESET_TO_SP_MIN	:= 0
58c11ba852SSoby Mathew$(eval $(call add_define,RESET_TO_SP_MIN))
59c11ba852SSoby Mathew$(eval $(call assert_boolean,RESET_TO_SP_MIN))
6071816096SEtienne Carriere
6171816096SEtienne Carriere# Flag to allow SP_MIN to handle FIQ interrupts in monitor mode. The platform
6271816096SEtienne Carriere# port is free to override this value. It is default disabled.
6371816096SEtienne CarriereSP_MIN_WITH_SECURE_FIQ 	?= 0
6471816096SEtienne Carriere$(eval $(call add_define,SP_MIN_WITH_SECURE_FIQ))
6571816096SEtienne Carriere$(eval $(call assert_boolean,SP_MIN_WITH_SECURE_FIQ))
66