summaryrefslogtreecommitdiff
path: root/src/arch/riscv/Kconfig
diff options
context:
space:
mode:
authorRonald G. Minnich <rminnich@gmail.com>2018-12-19 17:52:43 -0800
committerron minnich <rminnich@gmail.com>2019-01-17 04:59:09 +0000
commit05358047290b5e60cf3c0dc7e967267a03d5c4ce (patch)
treeed4340b82c8fa9ae78bf7b8095aa1ad952ef8202 /src/arch/riscv/Kconfig
parentcc394d4d37533a4977c1da629c8ebf405a91d32a (diff)
riscv: create Kconfig architecture features for new parts
RISCV parts can be created with any one of four CPU modes enabled, with or without PMP, and with either 32 or 64 bit XLEN. In anticipation of parts to come, create the Kconfig variables for these architecture attributes. Change-Id: I32ee51b2a469c7684a2f1b477bdac040e972e253 Signed-off-by: Ronald G. Minnich <rminnich@gmail.com> Reviewed-on: https://review.coreboot.org/c/30348 Reviewed-by: Patrick Georgi <pgeorgi@google.com> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/arch/riscv/Kconfig')
-rw-r--r--src/arch/riscv/Kconfig38
1 files changed, 38 insertions, 0 deletions
diff --git a/src/arch/riscv/Kconfig b/src/arch/riscv/Kconfig
index 9fa43bc9f2..5bde804ce2 100644
--- a/src/arch/riscv/Kconfig
+++ b/src/arch/riscv/Kconfig
@@ -11,6 +11,44 @@ config RISCV_ABI
config RISCV_CODEMODEL
string
+config ARCH_RISCV_M_DISABLED
+ bool
+
+config ARCH_RISCV_M
+ # Whether a SOC implements M mode.
+ # M mode is the most privileged mode, it is
+ # the equivalent in some ways of x86 SMM mode
+ # save that in M mode it is impossible to turn
+ # on paging.
+ # While the spec requires it, there is at least
+ # one implementation that will not have it due
+ # to security concerns.
+ bool
+ default n if ARCH_RISCV_M_DISABLED
+ default y
+
+config ARCH_RISCV_S
+ # S (supervisor) mode is for kernels. It is optional.
+ bool
+ default n
+
+config ARCH_RISCV_U
+ # U (user) mode is for programs.
+ bool
+ default n
+
+config ARCH_RISCV_RV64
+ bool
+ default n
+
+config ARCH_RISCV_RV32
+ bool
+ default n
+
+config ARCH_RISCV_PMP
+ bool
+ default n
+
config ARCH_BOOTBLOCK_RISCV
bool
default n