mirror of
https://github.com/riscv-software-src/opensbi.git
synced 2025-08-24 23:41:23 +01:00
lib: sbi: Detect menvcfg CSR at boot time
We add the menvcfg CSR as a HART feature and detect it at boot time using traping mechanism. Signed-off-by: Atish Patra <atishp@rivosinc.com> Signed-off-by: Anup Patel <apatel@ventanamicro.com> Reviewed-by: Xiang W <wxjstz@126.com>
This commit is contained in:
@@ -26,9 +26,11 @@ enum sbi_hart_features {
|
||||
SBI_HART_HAS_TIME = (1 << 4),
|
||||
/** HART has AIA local interrupt CSRs */
|
||||
SBI_HART_HAS_AIA = (1 << 5),
|
||||
/** HART has menvcfg CSR */
|
||||
SBI_HART_HAS_MENVCFG = (1 << 6),
|
||||
|
||||
/** Last index of Hart features*/
|
||||
SBI_HART_HAS_LAST_FEATURE = SBI_HART_HAS_AIA,
|
||||
SBI_HART_HAS_LAST_FEATURE = SBI_HART_HAS_MENVCFG,
|
||||
};
|
||||
|
||||
struct sbi_scratch;
|
||||
|
Reference in New Issue
Block a user