jlaitine commented on code in PR #20430:
URL: https://github.com/apache/nuttx/pull/20430#discussion_r4158587507


##########
arch/arm/src/armv7-m/arm_vectors.c:
##########
@@ -58,12 +58,62 @@
 
 extern void __start(void);
 
+#if defined(CONFIG_ARMV7M_ITCM_ECC) || defined(CONFIG_ARMV7M_DTCM_ECC)
+static void start(void) __attribute__((naked, no_instrument_function));
+#endif
+
 static void start(void)
 {
   /* Zero lr to mark the end of backtrace */
 
+#if defined(CONFIG_ARMV7M_ITCM_ECC) || defined(CONFIG_ARMV7M_DTCM_ECC)
+  /* Run without a stack until TCM ECC is initialized. */
+
+  __asm__ __volatile__(
+    "cpsid i\n\t"
+    "mov  lr, #0\n\t"
+    "movs r0, #7\n\t"          /* EN | RMW | RETEN */
+#ifdef CONFIG_ARMV7M_ITCM_ECC
+    "ldr  r3, =0xe000ef90\n\t" /* ITCMCR */
+    "str  r0, [r3]\n\t"

Review Comment:
   We can actually make a purely imxrt1180 solution, and put the m7 tcm ecc 
massaging entirely in m33 side. This is exactly as what the nxp sdk does. The 
m7 dtcm is accessible to m33 via the same address space as what the edma uses. 
This has the advantage that then m33 can release m7 to run directly from tcm. I 
can do this tomorrow, I think this feature will be anyhow needed. Then we can 
drop the added configs and avoid touching the generic armv7-m.



-- 
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