feat(msm8916): add SP_MIN port for AArch32
Use the new shared msm8916 setup code to allow compiling the minimal
AArch32 Secure Payload (SP_MIN) as simple PSCI implementation.
AArch64 is preferred for the Cortex-A53 cores in MSM8916 but there are
some similar platforms with AArch32-only Cortex-A7 cores that can
benefit from this in future changes.
The AArch32 assembly implementation for msm8916_helpers.S and
uartdm_console.S is a direct port of the AArch64 implementation.
Only plat_get_my_entrypoint is slightly different because there is no
need to handle the "boot remapper" on cold boot for AArch32.
Change-Id: Idf160e86fb3e685fcedec3e051400e6273997b74
Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
diff --git a/plat/qti/msm8916/platform.mk b/plat/qti/msm8916/platform.mk
index b3ea2fe..4dce773 100644
--- a/plat/qti/msm8916/platform.mk
+++ b/plat/qti/msm8916/platform.mk
@@ -27,8 +27,12 @@
BL31_SOURCES += ${MSM8916_PM_SOURCES} \
plat/qti/msm8916/msm8916_bl31_setup.c
-PLAT_INCLUDES := -Iinclude/plat/arm/common/${ARCH} \
- -Iplat/qti/msm8916/include
+PLAT_INCLUDES := -Iplat/qti/msm8916/include
+
+ifeq (${ARCH},aarch64)
+# arm_macros.S exists only on aarch64 currently
+PLAT_INCLUDES += -Iinclude/plat/arm/common/${ARCH}
+endif
# Only BL31 is supported at the moment and is entered on a single CPU
RESET_TO_BL31 := 1
@@ -62,8 +66,13 @@
# Build config flags
# ------------------
BL31_BASE ?= 0x86500000
-BL32_BASE ?= BL31_LIMIT
PRELOADED_BL33_BASE ?= 0x8f600000
+ifeq (${ARCH},aarch64)
+BL32_BASE ?= BL31_LIMIT
$(eval $(call add_define,BL31_BASE))
+else
+# There is no BL31 on aarch32, so reuse its location for BL32
+BL32_BASE ?= $(BL31_BASE)
+endif
$(eval $(call add_define,BL32_BASE))