mirror of
https://github.com/riscv-software-src/opensbi.git
synced 2025-08-24 23:41:23 +01:00
lib: sbi: Add support for smcsrind and smcdeleg
Smcsrind allows generic indirect CSR access mechanism while Smcdeleg allows delegating hpmcounters in Supervisor mode. Enable both extensions and set the appropriate bits in mstateen and menvcfg. Co-developed-by: Kaiwen Xue <kaiwenxue1@gmail.com> Signed-off-by: Atish Patra <atishp@rivosinc.com> Reviewed-by: Anup Patel <anup@brainfault.org>
This commit is contained in:
@@ -55,6 +55,14 @@ enum sbi_hart_extensions {
|
||||
SBI_HART_EXT_SVPBMT,
|
||||
/** Hart has debug trigger extension */
|
||||
SBI_HART_EXT_SDTRIG,
|
||||
/** Hart has Smcsrind extension */
|
||||
SBI_HART_EXT_SMCSRIND,
|
||||
/** Hart has Smcdeleg extension */
|
||||
SBI_HART_EXT_SMCDELEG,
|
||||
/** Hart has Sscsrind extension */
|
||||
SBI_HART_EXT_SSCSRIND,
|
||||
/** Hart has Ssccfg extension */
|
||||
SBI_HART_EXT_SSCCFG,
|
||||
|
||||
/** Maximum index of Hart extension */
|
||||
SBI_HART_EXT_MAX,
|
||||
|
Reference in New Issue
Block a user