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/03/21 08:13:22 UTC

[GitHub] [incubator-nuttx] no1wudi commented on a change in pull request #5782: RISC-V: Implement option to run NuttX in supervisor mode (S-mode)

no1wudi commented on a change in pull request #5782:
URL: https://github.com/apache/incubator-nuttx/pull/5782#discussion_r830842520



##########
File path: arch/risc-v/Kconfig
##########
@@ -188,6 +189,30 @@ config ARCH_MMU_TYPE_SV39
 	bool
 	default n
 
+config ARCH_HAVE_S_MODE
+	bool
+	default n
+
+if ARCH_HAVE_S_MODE
+
+# Option to run NuttX in supervisor mode. This is obviously not usable in
+# flat mode, is questionable in protected mode, but is mandatory in kernel
+# mode.
+#
+# Kernel mode requires this as M-mode uses flat addressing and the kernel
+# memory must be mapped in order to share memory between the kernel and
+# different user tasks which reside in virtual memory.
+
+config ARCH_USE_S_MODE
+	bool "Run the NuttX kernel in S-mode instead of M-mode"
+	default n
+	depends on BUILD_KERNEL && ARCH_USE_MMU
+	---help---
+		Most of the RISC-V implementations run in M-mode (flat addressing)
+		and/or U-mode (in case of separate kernel-/userspaces). This provides
+		an option to run the kernel in S-mode, if the arget supports it.

Review comment:
       Change "arget" -> "target"




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