summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJohann Scott <johann.scott@arm.com>2026-06-23 14:12:37 +0000
committerjohann.scott <johann.scott@arm.com>2026-07-02 08:27:26 +0000
commitcdb7cb965e6a5201a868a7cca33171a951c35c3f (patch)
tree1aa0c6f98979d5be272db7efbd92f950262fcc75 /lib
parent5da9bc26bb5bfbb466a092d2169f0c82ea49b938 (diff)
downloadarm-trusted-firmware-cdb7cb965e6a5201a868a7cca33171a951c35c3f.tar.gz
arm-trusted-firmware-cdb7cb965e6a5201a868a7cca33171a951c35c3f.zip
feat(cpufeat): add support for FEAT_SRMASK
FEAT_SRMASK adds a series of aliases and bitwise write masks for some EL1 controls registers. The purpose of this is to reduce trapping of EL1 system register accesses to EL2. This feature can be found in the M.a version of the Arm ARM. Change-Id: I15e26c4570da070562dec990cc3bacde240d4ad5 Signed-off-by: Johann Scott <johann.scott@arm.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/el3_runtime/aarch64/context_mgmt.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/el3_runtime/aarch64/context_mgmt.c b/lib/el3_runtime/aarch64/context_mgmt.c
index 7df22dc37..7d762d937 100644
--- a/lib/el3_runtime/aarch64/context_mgmt.c
+++ b/lib/el3_runtime/aarch64/context_mgmt.c
@@ -430,6 +430,13 @@ static void setup_ns_context(cpu_context_t *ctx, const struct entry_point_info *
scr_el3 |= SCR_HACDBSEn_BIT;
}
+ if (is_feat_srmask_supported()) {
+ /* Set the SRMASKEn bit to enable access to alias and bitmask
+ * registers.
+ */
+ scr_el3 |= SCR_SRMASKEn_BIT;
+ }
+
write_ctx_reg(state, CTX_SCR_EL3, scr_el3);
manage_extensions_nonsecure(ctx);