mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-05-03 09:29:57 +00:00
Merge "feat(rmmd): enable SME for RMM" into integration
This commit is contained in:
commit
920aa8d4d2
4 changed files with 14 additions and 12 deletions
7
Makefile
7
Makefile
|
@ -979,13 +979,6 @@ ifeq (${ARCH},aarch32)
|
||||||
endif
|
endif
|
||||||
endif #(ARCH=aarch32)
|
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)
|
ifneq (${ENABLE_SME_FOR_NS},0)
|
||||||
ifeq (${ENABLE_SVE_FOR_NS},0)
|
ifeq (${ENABLE_SVE_FOR_NS},0)
|
||||||
$(error "ENABLE_SME_FOR_NS requires ENABLE_SVE_FOR_NS")
|
$(error "ENABLE_SME_FOR_NS requires ENABLE_SVE_FOR_NS")
|
||||||
|
|
|
@ -452,9 +452,9 @@ Common build options
|
||||||
world to trap to EL3. Requires ``ENABLE_SVE_FOR_NS`` to be set as SME is a
|
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
|
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
|
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
|
used on systems that have SPD=spmd/SPM_MM and atempting to build with this
|
||||||
build with these options will fail. This flag can take the values 0 to 2, to
|
option will fail. This flag can take the values 0 to 2, to align with the
|
||||||
align with the ``FEATURE_DETECTION`` mechanism. Default is 0.
|
``FEATURE_DETECTION`` mechanism. Default is 0.
|
||||||
|
|
||||||
- ``ENABLE_SME2_FOR_NS``: Numeric value to enable Scalable Matrix Extension
|
- ``ENABLE_SME2_FOR_NS``: Numeric value to enable Scalable Matrix Extension
|
||||||
version 2 (SME2) for the non-secure world only. SME2 is an optional
|
version 2 (SME2) for the non-secure world only. SME2 is an optional
|
||||||
|
|
|
@ -58,7 +58,6 @@ ifneq (${SPD}, tspd)
|
||||||
ifeq (${ARCH}, aarch64)
|
ifeq (${ARCH}, aarch64)
|
||||||
ifneq (${SPD}, spmd)
|
ifneq (${SPD}, spmd)
|
||||||
ifeq (${SPM_MM}, 0)
|
ifeq (${SPM_MM}, 0)
|
||||||
ifeq (${ENABLE_RME}, 0)
|
|
||||||
ifeq (${CTX_INCLUDE_FPREGS}, 0)
|
ifeq (${CTX_INCLUDE_FPREGS}, 0)
|
||||||
ENABLE_SME_FOR_NS := 2
|
ENABLE_SME_FOR_NS := 2
|
||||||
ENABLE_SME2_FOR_NS := 2
|
ENABLE_SME2_FOR_NS := 2
|
||||||
|
@ -67,7 +66,6 @@ endif
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
endif
|
|
||||||
|
|
||||||
# enable unconditionally for all builds
|
# enable unconditionally for all builds
|
||||||
ifeq (${ARCH}, aarch64)
|
ifeq (${ARCH}, aarch64)
|
||||||
|
|
|
@ -30,6 +30,7 @@
|
||||||
#include <platform_def.h>
|
#include <platform_def.h>
|
||||||
#include <services/rmmd_svc.h>
|
#include <services/rmmd_svc.h>
|
||||||
#include <smccc_helpers.h>
|
#include <smccc_helpers.h>
|
||||||
|
#include <lib/extensions/sme.h>
|
||||||
#include <lib/extensions/sve.h>
|
#include <lib/extensions/sve.h>
|
||||||
#include "rmmd_initial_context.h"
|
#include "rmmd_initial_context.h"
|
||||||
#include "rmmd_private.h"
|
#include "rmmd_private.h"
|
||||||
|
@ -134,6 +135,16 @@ static void manage_extensions_realm(cpu_context_t *ctx)
|
||||||
}
|
}
|
||||||
|
|
||||||
pmuv3_enable(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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
|
|
Loading…
Add table
Reference in a new issue