Skip to content

CSR: move custom performance counters off standard HPM space - #281

Merged
poemonsense merged 1 commit into
masterfrom
circle-patch4
Sep 20, 2026
Merged

poemonsense merged 1 commit into
masterfrom
circle-patch4

Conversation

@good-circle

Copy link
Copy Markdown
Collaborator

The custom counters occupied mhpmcounter addresses. Relocate them to CustomPerfCntBase1 (0x7c0) and CustomPerfCntBase2 (0xbc0) and make them unwritable.

Leave mcycle and minstret at the standard addresses as independent registers. A CSR write takes priority over the automatic increment.

The pendingSReq update wrote perfCnts(0xb65) from perfCnts(0xb66).

The custom counters occupied mhpmcounter addresses. Relocate them
to CustomPerfCntBase1 (0x7c0) and CustomPerfCntBase2 (0xbc0) and
make them unwritable.

Leave mcycle and minstret at the standard addresses as independent
registers. A CSR write takes priority over the automatic increment.

The pendingSReq update wrote perfCnts(0xb65) from perfCnts(0xb66).
@poemonsense
poemonsense merged commit 0d9f239 into master Sep 20, 2026
1 check passed
@poemonsense
poemonsense deleted the circle-patch4 branch September 20, 2026 02:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants