HomeFreeBSD

riscv timer: use stimecmp CSR when available

Description

riscv timer: use stimecmp CSR when available

The Sstc extension defines a new stimecmp CSR, allowing supervisor
software to set the timer, rather than just read it. When supported,
using this avoids the frequent trips through the SBI every time the
CPU's timer expires.

Reviewed by: jhb
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D40241

(cherry picked from commit cadaabcc720bb20d6d604c4792acb29072d2882d)

Details

Provenance
mhorneAuthored on May 25 2023, 5:07 PM
Reviewer
jhb
Differential Revision
D40241: riscv timer: use stimecmp CSR when available
Parents
rG3c236686822b: riscv: S-mode extension parsing
Branches
Unknown
Tags
Unknown