mirror of
https://github.com/Fishwaldo/opensbi.git
synced 2025-03-15 19:31:32 +00:00
lib: sbi: Fix Priv spec version for [m|s]counteren and mcountinhibit CSRs
Fix Priv spec version typo in commitd4b563c881
("lib: sbi: Remove MCOUNTEREN and SCOUNTEREN hart features"). At least Priv spec v1.11 is required for [m|s]counteren and mcountinhibit CSRs. Fixes:d4b563c881
("lib: sbi: Remove MCOUNTEREN and SCOUNTEREN hart features") Signed-off-by: Ley Foon Tan <leyfoon.tan@starfivetech.com> Reviewed-by: Anup Patel <anup@brainfault.org>
This commit is contained in:
parent
5359fc6955
commit
976895c57e
1 changed files with 1 additions and 1 deletions
|
@ -667,7 +667,7 @@ __mhpm_skip:
|
|||
hfeatures->priv_version = SBI_HART_PRIV_VER_1_12;
|
||||
|
||||
/* Counter overflow/filtering is not useful without mcounter/inhibit */
|
||||
if (hfeatures->priv_version >= SBI_HART_PRIV_VER_1_12) {
|
||||
if (hfeatures->priv_version >= SBI_HART_PRIV_VER_1_11) {
|
||||
/* Detect if hart supports sscofpmf */
|
||||
csr_read_allowed(CSR_SCOUNTOVF, (unsigned long)&trap);
|
||||
if (!trap.cause)
|
||||
|
|
Loading…
Add table
Reference in a new issue