summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAtish Patra <atishp@rivosinc.com>2022-03-29 16:55:36 +0300
committerAnup Patel <anup@brainfault.org>2022-04-05 06:20:48 +0300
commit31fecad46d1461c3bc6a4ef6d6aa461a19c1d78e (patch)
tree83d18d3e99399a7cc14a3d8650d881e1351bb70d /include
parent722f80d8e994c0fd9b72780259e7ed27893cc704 (diff)
downloadopensbi-31fecad46d1461c3bc6a4ef6d6aa461a19c1d78e.tar.xz
lib: sbi: Detect menvcfg CSR at boot time
We add the menvcfg CSR as a HART feature and detect it at boot time using traping mechanism. Signed-off-by: Atish Patra <atishp@rivosinc.com> Signed-off-by: Anup Patel <apatel@ventanamicro.com> Reviewed-by: Xiang W <wxjstz@126.com>
Diffstat (limited to 'include')
-rw-r--r--include/sbi/sbi_hart.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/sbi/sbi_hart.h b/include/sbi/sbi_hart.h
index a83b45b..57f80bc 100644
--- a/include/sbi/sbi_hart.h
+++ b/include/sbi/sbi_hart.h
@@ -26,9 +26,11 @@ enum sbi_hart_features {
SBI_HART_HAS_TIME = (1 << 4),
/** HART has AIA local interrupt CSRs */
SBI_HART_HAS_AIA = (1 << 5),
+ /** HART has menvcfg CSR */
+ SBI_HART_HAS_MENVCFG = (1 << 6),
/** Last index of Hart features*/
- SBI_HART_HAS_LAST_FEATURE = SBI_HART_HAS_AIA,
+ SBI_HART_HAS_LAST_FEATURE = SBI_HART_HAS_MENVCFG,
};
struct sbi_scratch;