diff options
| author | Anup Patel <[email protected]> | 2022-04-28 18:31:57 +0530 |
|---|---|---|
| committer | Anup Patel <[email protected]> | 2022-05-07 10:04:54 +0530 |
| commit | d4b563c881d6bca15bd0c4123c245c875a80ffe6 (patch) | |
| tree | e0966637e8bdf08f5f30a0611fd83214f11cd3bc /include | |
| parent | 5b8b377178df56ee6bca2cf31b7580ca07cb7d70 (diff) | |
lib: sbi: Remove MCOUNTEREN and SCOUNTEREN hart features
If a hart implements privileged spec v1.10 (or higher) then we can
safely assume that [m|s]counteren CSR are present and we don't need
MCOUNTEREN and SCOUNTEREN as hart features.
Signed-off-by: Anup Patel <[email protected]>
Reviewed-by: Atish Patra <[email protected]>
Diffstat (limited to 'include')
| -rw-r--r-- | include/sbi/sbi_hart.h | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/include/sbi/sbi_hart.h b/include/sbi/sbi_hart.h index 3c37933e..4665a62d 100644 --- a/include/sbi/sbi_hart.h +++ b/include/sbi/sbi_hart.h @@ -26,24 +26,20 @@ enum sbi_hart_priv_versions { /** Possible feature flags of a hart */ enum sbi_hart_features { - /** Hart has S-mode counter enable */ - SBI_HART_HAS_SCOUNTEREN = (1 << 0), - /** Hart has M-mode counter enable */ - SBI_HART_HAS_MCOUNTEREN = (1 << 1), /** Hart has counter inhibit CSR */ - SBI_HART_HAS_MCOUNTINHIBIT = (1 << 2), + SBI_HART_HAS_MCOUNTINHIBIT = (1 << 0), /** Hart has sscofpmf extension */ - SBI_HART_HAS_SSCOFPMF = (1 << 3), + SBI_HART_HAS_SSCOFPMF = (1 << 1), /** HART has timer csr implementation in hardware */ - SBI_HART_HAS_TIME = (1 << 4), + SBI_HART_HAS_TIME = (1 << 2), /** HART has AIA local interrupt CSRs */ - SBI_HART_HAS_AIA = (1 << 5), + SBI_HART_HAS_AIA = (1 << 3), /** HART has menvcfg CSR */ - SBI_HART_HAS_MENVCFG = (1 << 6), + SBI_HART_HAS_MENVCFG = (1 << 4), /** HART has mstateen CSR **/ - SBI_HART_HAS_SMSTATEEN = (1 << 7), + SBI_HART_HAS_SMSTATEEN = (1 << 5), /** HART has SSTC extension implemented in hardware */ - SBI_HART_HAS_SSTC = (1 << 8), + SBI_HART_HAS_SSTC = (1 << 6), /** Last index of Hart features*/ SBI_HART_HAS_LAST_FEATURE = SBI_HART_HAS_SSTC, |
