feat(spm): separate StMM SP specifics to add support for a S-EL0 SP

This patch separates the code from SPM_MM to get xlat table context and
move it to a common location. In addition, only APIs required from both
SPM_MM and FF-A EL3 SPMC are moved to the common location.

This allows understanding better what is required to support a S-EL0 SP
instead of trying to retrofit what already exists.

Signed-off-by: Achin Gupta <achin.gupta@arm.com>
Signed-off-by: Nishant Sharma <nishant.sharma@arm.com>
Change-Id: I142d7fbef5239869176d0de93842c66051d7ed78
diff --git a/services/std_svc/spm/common/spm.mk b/services/std_svc/spm/common/spm.mk
index 9491240..65fd72a 100644
--- a/services/std_svc/spm/common/spm.mk
+++ b/services/std_svc/spm/common/spm.mk
@@ -14,5 +14,10 @@
 			${ARCH}/spm_helpers.S				\
 			${ARCH}/spm_shim_exceptions.S)
 
+ifeq (1, $(filter 1, ${SPM_MM} ${SPMC_AT_EL3_SEL0_SP}))
+SPM_SOURCES	+=	$(addprefix services/std_svc/spm/common/,       \
+			spm_xlat_common.c)
+endif
+
 # Let the top-level Makefile know that we intend to include a BL32 image
 NEED_BL32		:=	yes