refactor(qemu): handle SPM_MM builds

SPM_MM is not compatible with ENABLE_SVE_FOR_NS and breaks build early:

> Including SPM Management Mode (MM) makefile
> services/std_svc/spm/spm_mm/spm_mm.mk:14: *** "Error: SPM_MM is not compatible with ENABLE_SVE_FOR_NS". Stop.

Signed-off-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
Change-Id: Iabe181647fce00a432ae11dc4599b71619364c24
This commit is contained in:
Marcin Juszkiewicz 2023-07-24 22:07:49 +02:00
parent 3b61457b4e
commit 941fc3834d
2 changed files with 12 additions and 5 deletions

View file

@ -74,12 +74,18 @@ BL31_SOURCES += ${QEMU_CPU_LIBS} \
${QEMU_GIC_SOURCES}
# CPU flag enablement
ifeq (${ARCH},aarch64)
# Later QEMU versions support SME and SVE.
ifeq (${ARCH},aarch64)
# SPM_MM is not compatible with ENABLE_SVE_FOR_NS (build breaks)
ifeq (${SPM_MM},1)
ENABLE_SVE_FOR_NS := 0
ENABLE_SME_FOR_NS := 0
else
ENABLE_SVE_FOR_NS := 2
ENABLE_SME_FOR_NS := 2
endif
endif
# QEMU will use the RNDR instruction for the stack protector canary.
ENABLE_FEAT_RNG := 2

View file

@ -7,16 +7,17 @@
PLAT_QEMU_PATH := plat/qemu/qemu_sbsa
PLAT_QEMU_COMMON_PATH := plat/qemu/common
include plat/qemu/common/common.mk
CRASH_REPORTING := 1
ifeq (${SPM_MM},1)
NEED_BL32 := yes
EL3_EXCEPTION_HANDLING := 1
GICV2_G0_FOR_EL3 := 1
endif
include plat/qemu/common/common.mk
CRASH_REPORTING := 1
# Enable new version of image loading on QEMU platforms
LOAD_IMAGE_V2 := 1