riscv: Introduce a new config for SBI v0.1
We now have SBI v0.2 which is more scalable and extendable to handle
future needs for RISC-V supervisor interfaces.
Introduce a new config and move all SBI v0.1 code under that config.
This allows to implement the new replacement SBI extensions cleanly
and remove v0.1 extensions easily in future. Currently, the config
is enabled by default. Once all M-mode software, with v0.1, is no
longer in use, this config option and all relevant code can be easily
removed.
This commit is inspired from Linux kernel patch:
https://patchwork.kernel.org/patch/11407361/
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Pragnesh Patel <pragnesh.patel@sifive.com>
diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
index 09fff05..cc87da7 100644
--- a/arch/riscv/Kconfig
+++ b/arch/riscv/Kconfig
@@ -214,6 +214,14 @@
bool
default y if RISCV_SMODE || SPL_RISCV_SMODE
+config SBI_V01
+ bool "SBI v0.1 support"
+ default y
+ depends on SBI
+ help
+ This config allows kernel to use SBI v0.1 APIs. This will be
+ deprecated in future once legacy M-mode software are no longer in use.
+
config SBI_IPI
bool
depends on SBI