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

Details

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