Page MenuHomeFreeBSD

riscv timer: use stimecmp CSR when available
ClosedPublic

Authored by mhorne on May 23 2023, 5:16 PM.
Tags
None
Referenced Files
F108698582: D40241.diff
Mon, Jan 27, 9:41 AM
Unknown Object (File)
Mon, Dec 30, 9:15 PM
Unknown Object (File)
Dec 15 2024, 3:23 AM
Unknown Object (File)
Dec 11 2024, 12:40 PM
Unknown Object (File)
Nov 23 2024, 9:08 AM
Unknown Object (File)
Oct 24 2024, 5:26 AM
Unknown Object (File)
Oct 23 2024, 11:07 AM
Unknown Object (File)
Sep 27 2024, 1:04 PM

Details

Summary

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.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 51645
Build 48536: arc lint + arc unit

Event Timeline

This revision is now accepted and ready to land.May 23 2023, 9:03 PM

Thanks for adding this - I was recently trying to debug RISC-V issues using qemu tracing and the constant SBI calls meant that it made essentially zero progress since tracing slowed down qemu so much that the next timer interrupt fired once it returned from the sbi call.

This revision was automatically updated to reflect the committed changes.