ssekar15 commented on code in PR #21951:
URL: https://github.com/apache/nuttx/pull/21951#discussion_r4639050374


##########
arch/tricore/src/common/tasking/tricore_vectors.asm:
##########
@@ -19,110 +19,146 @@
 ; under the License.
 ;
 ;****************************************************************************
-;
-; TASKING (astc) version of gnu/tricore_vectors.S, same code and layout; see
-; there for the description.  astc does not run the C preprocessor, so the
-; CORE_ID offset (TRICORE_CPU_CORE_ID in arch/csfr.h) is written out.  The
-; tables are protected, as nothing references them by symbol.
-;
+
+;****************************************************************************
+; Trap vector table (BTV) in .text.traptab and interrupt vector table (BIV)
+; in .text.inttab; the linker script places both sections.
+;****************************************************************************
+
+;****************************************************************************
+; Included Files
+;****************************************************************************
+
+#include <nuttx/config.h>
+#include <arch/irq.h>
+
+;****************************************************************************
+; Pre-processor Definitions
 ;****************************************************************************
 
        .extern tricore_trapcall
        .extern tricore_svcall
+       .extern tricore_fcutrap_recover
+       .extern g_fcu_csa_base
        .extern tricore_doirq
-       .extern tricore_fcu_recover
-       .extern g_tricore_fcu_pool
+
+JUMPABS        .macro  reg, target

Review Comment:
   avoid `movh.a/lea/ji` 3 instruction in every trap slot. j can reaches +-16 
MB and every target is in the same pflash



##########
arch/tricore/src/common/tricore_trapcall.c:
##########
@@ -27,241 +27,219 @@
 #include <nuttx/config.h>
 
 #include <stdint.h>
+#include <inttypes.h>
 #include <stdio.h>
-#include <string.h>
 #include <assert.h>
-#include <nuttx/debug.h>
-#include <syscall.h>
+#include <debug.h>

Review Comment:
   #include <nuttx/debug.h>



##########
arch/tricore/src/common/tricore_trapcall.c:
##########
@@ -303,16 +280,21 @@ int weak_function tricore_nmitrap(uint32_t tid, void 
*context, void *arg)
  *
  ****************************************************************************/
 
-void tricore_trapcall(volatile void *trap)
+noinstrument_function
+void tricore_trapcall(void *taddr, uint32_t tid, uint32_t tclass)
 {
+  struct tricore_trap_s trap;
   uintptr_t *regs;
   bool from_task;
 
-  struct tricore_trap_s *ctrap = (struct tricore_trap_s *)trap;
-  uint8_t tclass = ctrap->tclass;
-  unsigned int tid = ctrap->tid;
-
-  tricore_trapinfo(trap);
+  trap.taddr  = (uintptr_t)taddr;
+  trap.tid    = tid;
+  trap.tclass = tclass;
+  trap.tcpu   = up_cpu_index();

Review Comment:
   read from core id please



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to