forked from Mirrors/opensbi
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>
This commit is contained in:

committed by
Anup Patel

parent
499601a4ff
commit
d44568a0f2
@@ -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;
|
||||
|
Reference in New Issue
Block a user