mirror of
https://github.com/Fishwaldo/opensbi.git
synced 2025-03-15 19:31:32 +00:00
lib: sbi: Add Zkr in hart extensions
- Add Zkr as extension in sbi_hart_extensions enum - Return "zkr" string for Zkr extension from sbi_hart_extension_id2string Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Anup Patel <anup@brainfault.org>
This commit is contained in:
parent
280f7ae627
commit
efcac338bd
3 changed files with 6 additions and 0 deletions
|
@ -40,6 +40,8 @@ enum sbi_hart_extensions {
|
|||
SBI_HART_EXT_ZICNTR,
|
||||
/** HART has Zihpm extension */
|
||||
SBI_HART_EXT_ZIHPM,
|
||||
/** HART has Zkr extension */
|
||||
SBI_HART_EXT_ZKR,
|
||||
/** Hart has Smcntrpmf extension */
|
||||
SBI_HART_EXT_SMCNTRPMF,
|
||||
|
||||
|
|
|
@ -678,6 +678,9 @@ static inline char *sbi_hart_extension_id2string(int ext)
|
|||
case SBI_HART_EXT_ZIHPM:
|
||||
estr = "zihpm";
|
||||
break;
|
||||
case SBI_HART_EXT_ZKR:
|
||||
estr = "zkr";
|
||||
break;
|
||||
case SBI_HART_EXT_SMEPMP:
|
||||
estr = "smepmp";
|
||||
break;
|
||||
|
|
|
@ -376,6 +376,7 @@ static int fdt_parse_isa_one_hart(const char *isa, unsigned long *extensions)
|
|||
}
|
||||
|
||||
set_multi_letter_ext("smepmp", SBI_HART_EXT_SMEPMP);
|
||||
set_multi_letter_ext("zkr", SBI_HART_EXT_ZKR);
|
||||
#undef set_multi_letter_ext
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue