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

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

commit 68276b057f5e609aa8aebd67361743193f9c2ab8
Author: Bowen Wang <[email protected]>
AuthorDate: Tue May 26 14:41:06 2026 +0800

    drivers/rptun: ignore PAUSE on a TrustZone secure core
    
    With ARCH_TRUSTZONE_SECURE the secure and the non-secure world share one
    CPU. A secure side that handles PAUSE busy-waits in the secure world
    and stalls the non-secure side too, which is the core printing its
    panic. Mark PAUSE as already handled at initialization, so the secure
    side neither waits for it nor passes it on.
    
    Signed-off-by: Bowen Wang <[email protected]>
---
 drivers/rptun/rptun.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/rptun/rptun.c b/drivers/rptun/rptun.c
index 4101f395dbf..5df942aea0a 100644
--- a/drivers/rptun/rptun.c
+++ b/drivers/rptun/rptun.c
@@ -1767,6 +1767,14 @@ int rptun_initialize(FAR struct rptun_dev_s *dev)
   priv = kmm_zalloc(sizeof(struct rptun_priv_s));
   if (priv != NULL)
     {
+#ifdef CONFIG_ARCH_TRUSTZONE_SECURE
+      /* Secure and Non-secure worlds share the same CPU. If the
+       * secure side handles PAUSE, the CPU stalls in secure world
+       * blocking the non-secure side as well.
+       */
+
+      RPTUN_STATUS_SET(priv->lstatus, RPTUN_STATUS_PAUSE);
+#endif
       priv->dev = dev;
       priv->pid = -EINVAL;
       remoteproc_init(&priv->rproc, &g_rptun_ops, priv);

Reply via email to