diff options
author | Anup Patel <apatel@ventanamicro.com> | 2023-07-05 11:57:17 +0530 |
---|---|---|
committer | Anup Patel <anup@brainfault.org> | 2023-07-09 11:06:24 +0530 |
commit | 1a398d9faa60ac0341614f59b864340fc5e49a35 (patch) | |
tree | d50835920242a4af6c0afbb33f83c5c38e9a0f6c /lib/sbi/sbi_hart.c | |
parent | c6a35733b74aeff612398f274ed19a74f81d1f37 (diff) | |
download | opensbi-1a398d9faa60ac0341614f59b864340fc5e49a35.zip opensbi-1a398d9faa60ac0341614f59b864340fc5e49a35.tar.gz opensbi-1a398d9faa60ac0341614f59b864340fc5e49a35.tar.bz2 |
lib: sbi: Add Zicntr as a HART ISA extension
Recently ratified Zicntr ISA extension covers cycle, time and
instret CSRs so we replace the "time" ISA extension with "zicntr"
ISA extension in OpenSBI.
Signed-off-by: Anup Patel <apatel@ventanamicro.com>
Reviewed-by: Xiang W <wxjstz@126.com>
Diffstat (limited to 'lib/sbi/sbi_hart.c')
-rw-r--r-- | lib/sbi/sbi_hart.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/sbi/sbi_hart.c b/lib/sbi/sbi_hart.c index 6e52cbd..c470482 100644 --- a/lib/sbi/sbi_hart.c +++ b/lib/sbi/sbi_hart.c @@ -441,8 +441,8 @@ static inline char *sbi_hart_extension_id2string(int ext) case SBI_HART_EXT_SSCOFPMF: estr = "sscofpmf"; break; - case SBI_HART_EXT_TIME: - estr = "time"; + case SBI_HART_EXT_ZICNTR: + estr = "zicntr"; break; case SBI_HART_EXT_SMAIA: estr = "smaia"; @@ -676,7 +676,7 @@ __mhpm_skip: csr_read_allowed(CSR_TIME, (unsigned long)&trap); if (!trap.cause) __sbi_hart_update_extension(hfeatures, - SBI_HART_EXT_TIME, true); + SBI_HART_EXT_ZICNTR, true); /* Detect if hart has AIA local interrupt CSRs */ csr_read_allowed(CSR_MTOPI, (unsigned long)&trap); |