HomeFreeBSD

riscv timer: fix interrupt handling.

Description

riscv timer: fix interrupt handling.

Based on the spec the STIP bit of SIP register is read-only.

To clear STIP bit from supervisor we have to do an SBI call to firmware.
Upon reception of SBI request, the machine-mode firmware clears the STIP
bit in the MIP register.

This fixes operation on Codasip A730.

Reviewed by: mhorne
Differential Revision: https://reviews.freebsd.org/D49487

(cherry picked from commit 6d58c670060a17817fa0c8ebf4e7543c3d2b4523)

Details

Provenance
brAuthored on Mar 26 2025, 8:09 AM
mhorneCommitted on Sep 15 2025, 7:20 PM
Reviewer
mhorne
Differential Revision
D49487: riscv timer: fix interrupt handing
Parents
rG4efc1b22aab1: riscv: Fix SSTC extension support
Branches
Unknown
Tags
Unknown