summaryrefslogtreecommitdiff
path: root/services
diff options
context:
space:
mode:
authorSandrine Bailleux <sandrine.bailleux@arm.com>2018-05-09 14:45:34 +0200
committerSandrine Bailleux <sandrine.bailleux@arm.com>2018-05-15 09:59:44 +0200
commit398489452fe50118521be845a55ce3b8773cd13d (patch)
tree401f696b2a73a406141faf2057ad1f869e250aca /services
parent885ca54a75e14a63c375b5d12852dc7ef2c0b568 (diff)
SPM: Do not trap S-EL0 access to SVE/SIMD/FP regs
This allows secure partitions to access these registers. This is needed in some cases. For example, it has been reported that in order to implement secure storage services, a secure partition needs to encrypt/decrypt some authentication variables, which requires FP/SIMD support. Note that SPM will not do any saving/restoring of these registers on behalf of the SP. This falls under the SP's responsibility. Also note that if the SP gets preempted, it might not get a chance to save/restore FP/SIMD registers first. This patch does not address this problem. It only serves as a temporary solution to unblock development on the secure partition side. Change-Id: I3b8ccdebdac0219f6ac96ad66ab2be0be8374ad3 Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
Diffstat (limited to 'services')
-rw-r--r--services/std_svc/spm/secure_partition_setup.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/services/std_svc/spm/secure_partition_setup.c b/services/std_svc/spm/secure_partition_setup.c
index 6998dae5..9b3f6222 100644
--- a/services/std_svc/spm/secure_partition_setup.c
+++ b/services/std_svc/spm/secure_partition_setup.c
@@ -236,12 +236,14 @@ void secure_partition_setup(void)
SPM_SHIM_EXCEPTIONS_PTR);
/*
- * FPEN: Forbid the Secure Partition to access FP/SIMD registers.
+ * FPEN: Allow the Secure Partition to access FP/SIMD registers.
+ * Note that SPM will not do any saving/restoring of these registers on
+ * behalf of the SP. This falls under the SP's responsibility.
* TTA: Enable access to trace registers.
* ZEN (v8.2): Trap SVE instructions and access to SVE registers.
*/
write_ctx_reg(get_sysregs_ctx(ctx), CTX_CPACR_EL1,
- CPACR_EL1_FPEN(CPACR_EL1_FP_TRAP_ALL));
+ CPACR_EL1_FPEN(CPACR_EL1_FP_TRAP_NONE));
/*
* Prepare information in buffer shared between EL3 and S-EL0