mirror of
https://github.com/riscv-software-src/opensbi.git
synced 2025-08-24 23:41:23 +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
@@ -401,8 +401,10 @@ static int fdt_parse_isa_one_hart(const char *isa, unsigned long *extensions)
|
||||
continue; \
|
||||
}
|
||||
|
||||
set_multi_letter_ext("smepmp", SBI_HART_EXT_SMEPMP);
|
||||
set_multi_letter_ext("zkr", SBI_HART_EXT_ZKR);
|
||||
for (j = 0; j < SBI_HART_EXT_MAX; j++) {
|
||||
set_multi_letter_ext(sbi_hart_ext[j].name,
|
||||
sbi_hart_ext[j].id);
|
||||
}
|
||||
#undef set_multi_letter_ext
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user