forked from zephyrproject-rtos/zephyr
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
trusted-firmware-m: Store FP context before entering secure calls
When ARM_NONSECURE_PREEMPTIBLE_SECURE_CALLS is enabled, if FPU is being used (CONTROL.FPCA == 1), store all FP registers before entering the secure function, and restore them afterwards. This is needed if any NS thread or ISR that interrupts the secure function uses FP registers. If they do, a secure UsageFault occurs unless this change is applied. This allows k_sched_lock() and k_sched_unlock() to be dropped when ARM_NONSECURE_PREEMPTIBLE_SECURE_CALLS is enabled. Enable ARM_NONSECURE_PREEMPTIBLE_SECURE_CALLS by default when building TF-M. Signed-off-by: Øyvind Rønningstad <[email protected]>
- Loading branch information
1 parent
a2cfb84
commit aed0643
Showing
2 changed files
with
56 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters