diff --git a/Makefile b/Makefile index 104d84dc5..8e8fba901 100644 --- a/Makefile +++ b/Makefile @@ -979,13 +979,6 @@ ifeq (${ARCH},aarch32) endif endif #(ARCH=aarch32) -# Ensure ENABLE_RME is not used with SME -ifeq (${ENABLE_RME},1) - ifneq (${ENABLE_SME_FOR_NS},0) - $(error "ENABLE_SME_FOR_NS cannot be used with ENABLE_RME") - endif -endif - ifneq (${ENABLE_SME_FOR_NS},0) ifeq (${ENABLE_SVE_FOR_NS},0) $(error "ENABLE_SME_FOR_NS requires ENABLE_SVE_FOR_NS") diff --git a/docs/getting_started/build-options.rst b/docs/getting_started/build-options.rst index 3b38480ca..7c84ef163 100644 --- a/docs/getting_started/build-options.rst +++ b/docs/getting_started/build-options.rst @@ -452,9 +452,9 @@ Common build options world to trap to EL3. Requires ``ENABLE_SVE_FOR_NS`` to be set as SME is a superset of SVE. SME is an optional architectural feature for AArch64 and TF-A support is experimental. At this time, this build option cannot be - used on systems that have SPD=spmd/SPM_MM or ENABLE_RME, and attempting to - build with these options will fail. This flag can take the values 0 to 2, to - align with the ``FEATURE_DETECTION`` mechanism. Default is 0. + used on systems that have SPD=spmd/SPM_MM and atempting to build with this + option will fail. This flag can take the values 0 to 2, to align with the + ``FEATURE_DETECTION`` mechanism. Default is 0. - ``ENABLE_SME2_FOR_NS``: Numeric value to enable Scalable Matrix Extension version 2 (SME2) for the non-secure world only. SME2 is an optional diff --git a/plat/arm/board/fvp/platform.mk b/plat/arm/board/fvp/platform.mk index 4803f3503..3c02485f6 100644 --- a/plat/arm/board/fvp/platform.mk +++ b/plat/arm/board/fvp/platform.mk @@ -58,7 +58,6 @@ ifneq (${SPD}, tspd) ifeq (${ARCH}, aarch64) ifneq (${SPD}, spmd) ifeq (${SPM_MM}, 0) -ifeq (${ENABLE_RME}, 0) ifeq (${CTX_INCLUDE_FPREGS}, 0) ENABLE_SME_FOR_NS := 2 ENABLE_SME2_FOR_NS := 2 @@ -67,7 +66,6 @@ endif endif endif endif -endif # enable unconditionally for all builds ifeq (${ARCH}, aarch64) diff --git a/services/std_svc/rmmd/rmmd_main.c b/services/std_svc/rmmd/rmmd_main.c index a929ea282..b809f563d 100644 --- a/services/std_svc/rmmd/rmmd_main.c +++ b/services/std_svc/rmmd/rmmd_main.c @@ -30,6 +30,7 @@ #include #include #include +#include #include #include "rmmd_initial_context.h" #include "rmmd_private.h" @@ -134,6 +135,16 @@ static void manage_extensions_realm(cpu_context_t *ctx) } pmuv3_enable(ctx); + + /* + * If SME/SME2 is supported and enabled for NS world, then enables SME + * for Realm world. RMM will save/restore required registers that are + * shared with SVE/FPU so that Realm can use FPU or SVE. + */ + if (is_feat_sme_supported()) { + /* sme_enable() also enables SME2 if supported by hardware */ + sme_enable(ctx); + } } /*******************************************************************************