blob: 6339cf856a67a0c8bc477d02f4f8f7a64e2bde5e [file] [log] [blame]
Soby Mathewec8ac1c2016-05-05 14:32:05 +01001#
Javier Almansa Sobrinof3a4c542020-11-23 18:38:15 +00002# Copyright (c) 2016-2020, 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 \
Soby Mathew6d07e672018-03-01 10:53:33 +000018 plat/common/aarch32/plat_sp_min_common.c\
Soby Mathewec8ac1c2016-05-05 14:32:05 +010019 services/std_svc/std_svc_setup.c \
20 ${PSCI_LIB_SOURCES}
21
Javier Almansa Sobrinof3a4c542020-11-23 18:38:15 +000022ifeq (${DISABLE_MTPMU},1)
23BL32_SOURCES += lib/extensions/mtpmu/aarch32/mtpmu.S
24endif
25
Soby Mathewec8ac1c2016-05-05 14:32:05 +010026ifeq (${ENABLE_PMF}, 1)
27BL32_SOURCES += lib/pmf/pmf_main.c
28endif
29
Dimitris Papastamosdda48b02017-10-17 14:03:14 +010030ifeq (${ENABLE_AMU}, 1)
Joel Hutton2691bc62017-12-12 15:47:55 +000031BL32_SOURCES += lib/extensions/amu/aarch32/amu.c\
32 lib/extensions/amu/aarch32/amu_helpers.S
Dimitris Papastamosdda48b02017-10-17 14:03:14 +010033endif
34
Dimitris Papastamos0a4cded2018-01-02 11:37:02 +000035ifeq (${WORKAROUND_CVE_2017_5715},1)
Dimitris Papastamos570c06a2018-04-06 15:29:34 +010036BL32_SOURCES += bl32/sp_min/wa_cve_2017_5715_bpiall.S \
37 bl32/sp_min/wa_cve_2017_5715_icache_inv.S
Dimitris Papastamos0a4cded2018-01-02 11:37:02 +000038endif
39
Andre Przywaraf91762b2021-02-08 18:07:23 +000040ifeq (${TRNG_SUPPORT},1)
41BL32_SOURCES += services/std_svc/trng/trng_main.c \
42 services/std_svc/trng/trng_entropy_pool.c
43endif
44
Manish V Badarkhef356f7e2021-06-29 11:44:20 +010045ifeq (${ENABLE_SYS_REG_TRACE_FOR_NS},1)
46BL32_SOURCES += lib/extensions/sys_reg_trace/aarch32/sys_reg_trace.c
47endif
48
Manish V Badarkhe51a97112021-07-08 09:33:18 +010049ifeq (${ENABLE_TRF_FOR_NS},1)
50BL32_SOURCES += lib/extensions/trf/aarch32/trf.c
51endif
52
Soby Mathewec8ac1c2016-05-05 14:32:05 +010053BL32_LINKERFILE := bl32/sp_min/sp_min.ld.S
54
55# Include the platform-specific SP_MIN Makefile
56# If no platform-specific SP_MIN Makefile exists, it means SP_MIN is not supported
57# on this platform.
58SP_MIN_PLAT_MAKEFILE := $(wildcard ${PLAT_DIR}/sp_min/sp_min-${PLAT}.mk)
59ifeq (,${SP_MIN_PLAT_MAKEFILE})
60 $(error SP_MIN is not supported on platform ${PLAT})
61else
62 include ${SP_MIN_PLAT_MAKEFILE}
63endif
64
Yatharth Kochar1c16a4c2016-06-30 14:50:58 +010065RESET_TO_SP_MIN := 0
Soby Mathewec8ac1c2016-05-05 14:32:05 +010066$(eval $(call add_define,RESET_TO_SP_MIN))
67$(eval $(call assert_boolean,RESET_TO_SP_MIN))
Etienne Carrieredc0fea72017-08-09 15:48:53 +020068
69# Flag to allow SP_MIN to handle FIQ interrupts in monitor mode. The platform
70# port is free to override this value. It is default disabled.
71SP_MIN_WITH_SECURE_FIQ ?= 0
72$(eval $(call add_define,SP_MIN_WITH_SECURE_FIQ))
73$(eval $(call assert_boolean,SP_MIN_WITH_SECURE_FIQ))