xref: /arm-trusted-firmware/services/std_svc/spm/el3_spmc/spmc.mk (revision 91f16700b400a8c0651d24a598fc48ee2997a0d7)
1*91f16700Schasinglulu#
2*91f16700Schasinglulu# Copyright (c) 2022, ARM Limited and Contributors. All rights reserved.
3*91f16700Schasinglulu#
4*91f16700Schasinglulu# SPDX-License-Identifier: BSD-3-Clause
5*91f16700Schasinglulu#
6*91f16700Schasinglulu
7*91f16700Schasingluluifneq (${ARCH},aarch64)
8*91f16700Schasinglulu        $(error "Error: SPMC is only supported on aarch64.")
9*91f16700Schasingluluendif
10*91f16700Schasinglulu
11*91f16700SchasingluluSPMC_SOURCES	:=	$(addprefix services/std_svc/spm/el3_spmc/,	\
12*91f16700Schasinglulu			spmc_main.c				\
13*91f16700Schasinglulu			spmc_setup.c				\
14*91f16700Schasinglulu			logical_sp.c				\
15*91f16700Schasinglulu			spmc_pm.c				\
16*91f16700Schasinglulu			spmc_shared_mem.c)
17*91f16700Schasinglulu
18*91f16700Schasinglulu# Specify platform specific logical partition implementation.
19*91f16700SchasingluluSPMC_LP_SOURCES  := $(addprefix ${PLAT_DIR}/, \
20*91f16700Schasinglulu                    ${PLAT}_el3_spmc_logical_sp.c)
21*91f16700Schasinglulu
22*91f16700Schasinglulu
23*91f16700Schasingluluifneq ($(wildcard $(SPMC_LP_SOURCES)),)
24*91f16700SchasingluluSPMC_SOURCES += $(SPMC_LP_SOURCES)
25*91f16700Schasingluluendif
26*91f16700Schasinglulu
27*91f16700Schasinglulu# Let the top-level Makefile know that we intend to include a BL32 image
28*91f16700SchasingluluNEED_BL32		:=	yes
29*91f16700Schasinglulu
30*91f16700Schasingluluifndef BL32
31*91f16700Schasinglulu# The SPMC is paired with a Test Secure Payload source and we intend to
32*91f16700Schasinglulu# build the Test Secure Payload if no other image has been provided
33*91f16700Schasinglulu# for BL32.
34*91f16700Schasinglulu#
35*91f16700Schasinglulu# In cases where an associated Secure Payload lies outside this build
36*91f16700Schasinglulu# system/source tree, the dispatcher Makefile can either invoke an external
37*91f16700Schasinglulu# build command or assume it is pre-built.
38*91f16700Schasinglulu
39*91f16700SchasingluluBL32_ROOT		:=	bl32/tsp
40*91f16700Schasinglulu
41*91f16700Schasinglulu# Conditionally include SP's Makefile. The assumption is that the TSP's build
42*91f16700Schasinglulu# system is compatible with that of Trusted Firmware, and it'll add and populate
43*91f16700Schasinglulu# necessary build targets and variables.
44*91f16700Schasinglulu
45*91f16700Schasingluluinclude ${BL32_ROOT}/tsp.mk
46*91f16700Schasingluluendif
47