You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2022/01/23 17:05:43 UTC

[GitHub] [incubator-nuttx] Ouss4 commented on a change in pull request #5261: xtensa: add svccall handler and use svc call in context switch

Ouss4 commented on a change in pull request #5261:
URL: https://github.com/apache/incubator-nuttx/pull/5261#discussion_r790302830



##########
File path: arch/xtensa/src/common/xtensa_svcall.c
##########
@@ -94,8 +101,71 @@ int xtensa_svcall(int irq, void *context, void *arg)
 
       case SYS_save_context:
         {
+          DEBUGASSERT(regs[REG_A3] != 0);

Review comment:
       I see that `SYS_save_context` is equal to 0.  The TRM recommends to keep this syscall command to spill the register windows, to have a certain portability between different OSes.

##########
File path: arch/xtensa/include/syscall.h
##########
@@ -29,10 +29,33 @@
  * Included Files
  ****************************************************************************/
 
+#include <nuttx/config.h>
+#include <debug.h>
+#include <arch/irq.h>
+
+#ifndef __ASSEMBLY__
+#  include <stdint.h>
+#endif
+
 /****************************************************************************
  * Pre-processor Definitions
  ****************************************************************************/
 
+/* This is the value used as the argument to the SVC instruction.

Review comment:
       ```suggestion
   /* This is the value used as the argument to the SYSCALL instruction.
   ```




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org