mirror of
https://github.com/riscv-software-src/opensbi.git
synced 2025-08-25 07:41:42 +01:00
lib: sbi: Implement Sstc extension
Recently, Sstc extension was ratified. It defines stimecmp which allows the supervisor mode to directly update the timecmp value without the need of the SBI call. The hardware also can inject the S-mode timer interrupt direclty to the supervisor without going through the M-mode. To maintain backward compatibility with the older software, SBI call now uses stimecmp directly if the hardware supports. Implement the Sstc extension. Signed-off-by: Atish Patra <atishp@rivosinc.com> Reviewed-by: Anup Patel <anup@brainfault.org>
This commit is contained in:
@@ -30,9 +30,11 @@ enum sbi_hart_features {
|
||||
SBI_HART_HAS_MENVCFG = (1 << 6),
|
||||
/** HART has mstateen CSR **/
|
||||
SBI_HART_HAS_SMSTATEEN = (1 << 7),
|
||||
/** HART has SSTC extension implemented in hardware */
|
||||
SBI_HART_HAS_SSTC = (1 << 8),
|
||||
|
||||
/** Last index of Hart features*/
|
||||
SBI_HART_HAS_LAST_FEATURE = SBI_HART_HAS_SMSTATEEN,
|
||||
SBI_HART_HAS_LAST_FEATURE = SBI_HART_HAS_SSTC,
|
||||
};
|
||||
|
||||
struct sbi_scratch;
|
||||
|
Reference in New Issue
Block a user