Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix incorrect debug_cause priority against riscv-debug 1.0.0-STABLE #154

Merged
merged 1 commit into from
Sep 26, 2023

Conversation

davideschiavone
Copy link

The relevant page [Debug Spec v1.0.0-STABLE, p.53] gives the following priorities for resolving multiple concurrent reasons for entering debug mode....

DCSR.cause : Explains why Debug Mode was entered.

When there are multiple reasons to enter Debug Mode in a single cycle, hardware should set cause to the cause with the highest priority.
1: An ebreak instruction was executed. (priority 3)
2: A Trigger Module trigger fired with action=1. (priority 4)
3: The debugger requested entry to Debug Mode using haltreq. (priority 1)
4: The hart single stepped because step was set. (priority 0, lowest)
5: The hart halted directly out of reset due to resethaltreq. (priority 2)
It is also acceptable to report 3 when this happens.
6: The hart halted because it’s part of a halt group. (priority 5, highest)
Harts may report 3 for this cause instead.

Other values are reserved for future use.

The relevant page [Debug Spec v1.0.0-STABLE, p.53] gives the following
priorities for resolving multiple concurrent reasons for entering debug mode....

DCSR.cause : Explains why Debug Mode was entered.

When there are multiple reasons to enter Debug Mode in a single cycle,
hardware should set cause to the cause with the highest priority.
1: An ebreak instruction was executed.                        (priority 3)
2: A Trigger Module trigger fired with action=1.              (priority 4)
3: The debugger requested entry to Debug Mode using haltreq.  (priority 1)
4: The hart single stepped because step was set.              (priority 0, lowest)
5: The hart halted directly out of reset due to resethaltreq. (priority 2)
   It is also acceptable to report 3 when this happens.
6: The hart halted because it’s part of a halt group.         (priority 5, highest)
   Harts may report 3 for this cause instead.

Other values are reserved for future use.
@davideschiavone davideschiavone merged commit cb3c4a4 into openhwgroup:main Sep 26, 2023
1 of 2 checks passed
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.

3 participants