Skip to content

[rtl] Take dcsr.mprven into account when in Debug Mode - #2594

Open
antonangeloff wants to merge 2 commits into
lowRISC:masterfrom
antonangeloff:fix/dcsr-mprven
Open

antonangeloff wants to merge 2 commits into
lowRISC:masterfrom
antonangeloff:fix/dcsr-mprven

Conversation

@antonangeloff

@antonangeloff antonangeloff commented Nov 21, 2026 •

Copy link
Copy Markdown

This PR addresses the issue reported in #2474 - i.e. mstatus.MPRV is not ignored in Debug Mode when dcsr.mprven=0.

As noted in the issue - according to Sections 4.1 and 4.8 of the RISC-V External Debug Support Specification 0.13.2:

mprven=0: MPRV in mstatus is ignored in Debug Mode.
mprven=1: MPRV in mstatus takes effect in Debug Mode.

The PR adds a directed test to confirm both the issue and the fix.

Parts of this pull request were prepared with the help of an AI coding assistants. I have reviewed and understand the changes and take full responsibility for them.

Signed-off-by: Anton Angelov <anton.angelov@protonmail.com>
@github-actions

github-actions Bot commented Nov 21, 2026 •

Copy link
Copy Markdown

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@antonangeloff

Copy link
Copy Markdown
Author

I have read the CLA Document. By submitting this pull request comment, I am hereby confirming my acceptance of the terms of the CLA Document and my agreement to be legally bound by its terms.

Signed-off-by: Anton Angelov <anton.angelov@protonmail.com>
@antonangeloff
antonangeloff marked this pull request as ready for review November 21, 2026 14:32
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.

1 participant