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/10/05 19:58:48 UTC

[GitHub] [incubator-nuttx] pkarashchenko commented on a diff in pull request #7228: arch: qemu-rv: Add M-timer handling for BUILD_KERNEL

pkarashchenko commented on code in PR #7228:
URL: https://github.com/apache/incubator-nuttx/pull/7228#discussion_r985358133


##########
arch/risc-v/src/qemu-rv/qemu_rv_start.c:
##########
@@ -154,10 +167,27 @@ void qemu_rv_start_s(int mhartid)
   extern void __trap_vec(void);
   WRITE_CSR(stvec, (uintptr_t)__trap_vec);
 
+  /* Set the trap vector for M-mode */
+
+  extern void __trap_vec_m(void);
+  WRITE_CSR(mtvec, (uintptr_t)__trap_vec_m);
+
+  /* Initialize mtimer before entering to S-mode */
+
+  extern void up_mtimer_initialize(void);

Review Comment:
   Maybe all the externs can be grouped at the upper part of the file?



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