aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authordavidcunado-arm <david.cunado@arm.com>2017-11-17 12:18:22 +0000
committerGitHub <noreply@github.com>2017-11-17 12:18:22 +0000
commit203444c50066cad7aaddd3e36b0f9225bf95a865 (patch)
tree33301c2c73797b1f5ae3582070e314895d2319e1 /lib
parente83769c07bb09b7727a36389c9dd92096860637e (diff)
parent91089f360aaa38408d96a02136456dbde4f34eaf (diff)
downloadplatform_external_arm-trusted-firmware-203444c50066cad7aaddd3e36b0f9225bf95a865.tar.gz
platform_external_arm-trusted-firmware-203444c50066cad7aaddd3e36b0f9225bf95a865.tar.bz2
platform_external_arm-trusted-firmware-203444c50066cad7aaddd3e36b0f9225bf95a865.zip
Merge pull request #1160 from davidcunado-arm/dc/fp_regs
Move FPEXC32_EL2 to FP Context
Diffstat (limited to 'lib')
-rw-r--r--lib/el3_runtime/aarch64/context.S14
1 files changed, 8 insertions, 6 deletions
diff --git a/lib/el3_runtime/aarch64/context.S b/lib/el3_runtime/aarch64/context.S
index db16a9f0e..143da9568 100644
--- a/lib/el3_runtime/aarch64/context.S
+++ b/lib/el3_runtime/aarch64/context.S
@@ -90,9 +90,6 @@ func el1_sysregs_context_save
mrs x15, dacr32_el2
mrs x16, ifsr32_el2
stp x15, x16, [x0, #CTX_DACR32_EL2]
-
- mrs x17, fpexc32_el2
- str x17, [x0, #CTX_FP_FPEXC32_EL2]
#endif
/* Save NS timer registers if the build has instructed so */
@@ -212,9 +209,6 @@ func el1_sysregs_context_restore
ldp x15, x16, [x0, #CTX_DACR32_EL2]
msr dacr32_el2, x15
msr ifsr32_el2, x16
-
- ldr x17, [x0, #CTX_FP_FPEXC32_EL2]
- msr fpexc32_el2, x17
#endif
/* Restore NS timer registers if the build has instructed so */
#if NS_TIMER_SWITCH
@@ -275,6 +269,10 @@ func fpregs_context_save
mrs x10, fpcr
str x10, [x0, #CTX_FP_FPCR]
+#if CTX_INCLUDE_AARCH32_REGS
+ mrs x11, fpexc32_el2
+ str x11, [x0, #CTX_FP_FPEXC32_EL2]
+#endif
ret
endfunc fpregs_context_save
@@ -318,6 +316,10 @@ func fpregs_context_restore
ldr x10, [x0, #CTX_FP_FPCR]
msr fpcr, x10
+#if CTX_INCLUDE_AARCH32_REGS
+ ldr x11, [x0, #CTX_FP_FPEXC32_EL2]
+ msr fpexc32_el2, x11
+#endif
/*
* No explict ISB required here as ERET to
* switch to secure EL1 or non-secure world