SPM: Provide option to schedule when NSPE is interrupted
By default, PendSV_Handler() will skip running the scheduler if it
determines that the NSPE was interrupted by a secure interrupt. This
avoids potentially executing lower-priority SPE work when
higher-priority NSPE work is waiting. For systems where it is known that
the secure work is always higher-priority, it is useful to be able to run
the scheduler in this situation, so this patch provides a configuration
option to support doing so.
Change-Id: I596033ec54c307b225b54412f1fa3a3f5e053481
Signed-off-by: Chris Brand <chris.brand@cypress.com>
diff --git a/docs/integration_guide/index.rst b/docs/integration_guide/index.rst
index e96445c..589edf5 100644
--- a/docs/integration_guide/index.rst
+++ b/docs/integration_guide/index.rst
@@ -123,6 +123,17 @@
be possible for any non-secure interrupt to preempt a higher-priority secure
interrupt.
+********************************
+Secure interrupts and scheduling
+********************************
+To ensure correct operation in the general case, the secure scheduler is not
+run after handling a secure interrupt that pre-empted the NSPE. On systems
+with specific constraints, it may be desirable to run the scheduler in this
+situation, which can be done by setting
+``CONFIG_TFM_SCHEDULE_WHEN_NS_INTERRUPTED`` to 1. This could be done if the
+NSPE is known to be a simple, single-threaded application or if non-secure
+interrupts cannot pre-empt the SPE, for example.
+
**********************************
Integration with non-Cmake systems
**********************************