aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorYong-Xuan Wang <yongxuan.wang@sifive.com>2024-06-05 20:11:09 +0800
committerAnup Patel <anup@brainfault.org>2024-06-18 16:41:32 +0530
commit53844c98d082cbba29a6e568196add6de95e858f (patch)
tree4cfc22e482ed4f7f665cf906ff4f960cde7d6f47 /include
parent52dcf351cddf12081acc921c135df265f9d2f243 (diff)
downloadopensbi-53844c98d082cbba29a6e568196add6de95e858f.tar.gz
opensbi-53844c98d082cbba29a6e568196add6de95e858f.tar.bz2
opensbi-53844c98d082cbba29a6e568196add6de95e858f.zip
lib: sbi: Add support for Svade and Svadu extensions
Add support for Svade and Svadu extensions. When both are present in the device tree, the M-mode firmware should select the Svade extension to comply with the RVA23 profile, which mandates Svade and lists Svadu as an optional extension. Signed-off-by: Yong-Xuan Wang <yongxuan.wang@sifive.com> Reviewed-by: Anup Patel <anup@brainfault.org>
Diffstat (limited to 'include')
-rw-r--r--include/sbi/riscv_encoding.h1
-rw-r--r--include/sbi/sbi_hart.h4
2 files changed, 5 insertions, 0 deletions
diff --git a/include/sbi/riscv_encoding.h b/include/sbi/riscv_encoding.h
index d914828e..477fa3a1 100644
--- a/include/sbi/riscv_encoding.h
+++ b/include/sbi/riscv_encoding.h
@@ -211,6 +211,7 @@
#define ENVCFG_STCE (_ULL(1) << 63)
#define ENVCFG_PBMTE (_ULL(1) << 62)
+#define ENVCFG_ADUE (_ULL(1) << 61)
#define ENVCFG_CDE (_ULL(1) << 60)
#define ENVCFG_CBZE (_UL(1) << 7)
#define ENVCFG_CBCFE (_UL(1) << 6)
diff --git a/include/sbi/sbi_hart.h b/include/sbi/sbi_hart.h
index cc78eec6..81ec061d 100644
--- a/include/sbi/sbi_hart.h
+++ b/include/sbi/sbi_hart.h
@@ -63,6 +63,10 @@ enum sbi_hart_extensions {
SBI_HART_EXT_SSCSRIND,
/** Hart has Ssccfg extension */
SBI_HART_EXT_SSCCFG,
+ /** Hart has Svade extension */
+ SBI_HART_EXT_SVADE,
+ /** Hart has Svadu extension */
+ SBI_HART_EXT_SVADU,
/** Maximum index of Hart extension */
SBI_HART_EXT_MAX,