mirror of
https://github.com/riscv-software-src/opensbi.git
synced 2025-08-25 07:41:42 +01:00
lib: sbi: Using one array to define the name of extensions
Define an array sbi_hart_ext to map extension ID and name , and use it for ISA parsing and printing out the supported extensions. Signed-off-by: Yong-Xuan Wang <yongxuan.wang@sifive.com> Reviewed-by: Anup Patel <anup@brainfault.org>
This commit is contained in:

committed by
Anup Patel

parent
056fe6f85d
commit
776770d2ad
@@ -52,6 +52,13 @@ enum sbi_hart_extensions {
|
||||
SBI_HART_EXT_MAX,
|
||||
};
|
||||
|
||||
struct sbi_hart_ext_data {
|
||||
const unsigned int id;
|
||||
const char *name;
|
||||
};
|
||||
|
||||
extern const struct sbi_hart_ext_data sbi_hart_ext[];
|
||||
|
||||
/*
|
||||
* Smepmp enforces access boundaries between M-mode and
|
||||
* S/U-mode. When it is enabled, the PMPs are programmed
|
||||
|
Reference in New Issue
Block a user