Skip to content
This repository has been archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
Merge pull request #7 from riscv/6-typo-in-ch-6
Browse files Browse the repository at this point in the history
Fix sireg3 typo in ch 6 (issue #6)
  • Loading branch information
bcstrongx authored Jul 22, 2024
2 parents a162bd5 + 2b2ec06 commit b8a6eba
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions body.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -172,14 +172,13 @@ counter, event selector, and counter configuration CSRs, for each
counter in use, during context switch._
_For sampling usages, the OS will initialize a counter with a large
positive value suitably close to overflow, and clear the associated
event selector overflow (OF) bit via `sireg3`/`sireg4`. Upon counter
positive value suitably close to overflow via `sireg`/`sireg4`, and clear the associated
event selector overflow (OF) bit via `sireg2`/`sireg5`. Upon counter
overflow, OF will be set and an LCOFI will be pended. The LCOFI
interrupt service routine (ISR) will be invoked in S-mode, and can
inhibit counting for all delegated counters by writing to `scountinhibit`,
then can read `scountovf` to determine which counters have overflowed. It
can then re-initialize the overflowed counter(s) by writing the counter
via `sireg`/`sireg4`, and clearing the OF bit via `sireg2`/`sireg5`, for each
can then re-initialize the overflowed counter(s) and clear the OF bit, for each
overflowed counter. It may opt to snapshot all counters, or other hart
state. Finally it can resume counting, by clearing `scountinhibit`, before
resuming workload execution._
Expand Down

0 comments on commit b8a6eba

Please sign in to comment.