diff options
author | Mayuresh Chitale <mchitale@ventanamicro.com> | 2022-04-11 06:04:10 +0300 |
---|---|---|
committer | Anup Patel <anup@brainfault.org> | 2022-04-11 06:04:10 +0300 |
commit | d44568a0f2e6301d3ad77a48370b0bfef4bfe5a0 (patch) | |
tree | e8d11a4bc4516db5f3a0537d438c1e160bdc4657 /include | |
parent | 499601a4fff98ff258076c010c980c5dbcc0c24d (diff) | |
download | opensbi-d44568a0f2e6301d3ad77a48370b0bfef4bfe5a0.tar.xz |
lib: sbi: Detect Smstateen CSRs at boot-time
Extend HART feature detection to discover Smstateen CSRs at boot-time
and configure mstateen envcfg bit depending on availability of
menvcfg CSR.
Signed-off-by: Mayuresh Chitale <mchitale@ventanamicro.com>
Reviewed-by: Xiang W <wxjstz@126.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/sbi/sbi_hart.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/sbi/sbi_hart.h b/include/sbi/sbi_hart.h index 57f80bc..be3ad9f 100644 --- a/include/sbi/sbi_hart.h +++ b/include/sbi/sbi_hart.h @@ -28,9 +28,11 @@ enum sbi_hart_features { SBI_HART_HAS_AIA = (1 << 5), /** HART has menvcfg CSR */ SBI_HART_HAS_MENVCFG = (1 << 6), + /** HART has mstateen CSR **/ + SBI_HART_HAS_SMSTATEEN = (1 << 7), /** Last index of Hart features*/ - SBI_HART_HAS_LAST_FEATURE = SBI_HART_HAS_MENVCFG, + SBI_HART_HAS_LAST_FEATURE = SBI_HART_HAS_SMSTATEEN, }; struct sbi_scratch; |