This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new 431df45  EXC_SECURE and SECURE_STACK just can clear at 
TRUSTZONE_NONSECURE
431df45 is described below

commit 431df45e97dc86682a646aa73a0b1f543342d3f9
Author: licheng <[email protected]>
AuthorDate: Fri Jul 30 22:39:23 2021 +0800

    EXC_SECURE and SECURE_STACK just can clear at TRUSTZONE_NONSECURE
---
 arch/arm/src/armv8-m/exc_return.h | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/arch/arm/src/armv8-m/exc_return.h 
b/arch/arm/src/armv8-m/exc_return.h
index 3cfac7f..61f8a48 100644
--- a/arch/arm/src/armv8-m/exc_return.h
+++ b/arch/arm/src/armv8-m/exc_return.h
@@ -45,10 +45,6 @@
  * The remaining bits of the EXC_RETURN value should be set to 1.
  */
 
-/* EXC_RETURN_BASE: Bits that are always set in an EXC_RETURN value. */
-
-#define EXC_RETURN_BASE          0xffffff80
-
 /* EXC_RETURN_EXC_SECURE: Exception Secure.  The security domain the
  * exception was taken to.  If this bit is clear non-secure, else secure.
  */
@@ -92,6 +88,15 @@
 
 #define EXC_RETURN_SECURE_STACK  (1 << 6)
 
+/* EXC_RETURN_BASE: Bits that are always set in an EXC_RETURN value. */
+
+#if !defined(CONFIG_ARCH_TRUSTZONE_NONSECURE)
+#define EXC_RETURN_BASE          (0xffffff80 | EXC_RETURN_EXC_SECURE | \
+                                  EXC_RETURN_SECURE_STACK)
+#else
+#define EXC_RETURN_BASE          (0xffffff80)
+#endif
+
 /* EXC_RETURN_HANDLER: Return to handler mode. Exception return gets state
  * from the main stack. Execution uses MSP after return.
  */

Reply via email to