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

Both HWBPs and EBREAKs populate mtval #601

Merged
merged 1 commit into from Oct 13, 2020
Merged

Both HWBPs and EBREAKs populate mtval #601

merged 1 commit into from Oct 13, 2020

Conversation

aswaterman
Copy link
Member

This is a normative change, but it is backwards compatible, since writing 0 to mtval remains a legal option.

Resolves #600

This is a normative change, but it is backwards compatible, since writing 0
to mtval remains a legal option.

Resolves #600
@nick-knight
Copy link
Contributor

Is the technical term "breakpoint exception" defined earlier?

@gfavor
Copy link
Collaborator

gfavor commented Oct 13, 2020 via email

@nick-knight
Copy link
Contributor

To clarify, the "breakpoint exceptions" are precisely the three mcause == 3 exceptions:

  • Instruction address breakpoint
  • Environment break
  • Load/Store/AMO address breakpoint

in Table 3.7?

@gfavor
Copy link
Collaborator

gfavor commented Oct 13, 2020

Yes, all the (three) line items with Exception Code = 3.

@gfavor
Copy link
Collaborator

gfavor commented Oct 13, 2020

Which raises the potential need for a clarification? It's clear that "Environment break" results from an EBREAK instruction, whereas the address breakpoints (resulting from Trigger Module address triggers firing) need to be understood to be "hardware" breakpoints.

@nick-knight
Copy link
Contributor

Okay. This matches my understanding from a (long ago) reading of Chapter 10 of the RISC-V Reader (pp.101-102):

Breakpoint exceptions arise from executing an ebreak instruction, or when an address or datum matches a debug trigger

I guess I never read this part of the Priv. spec. that carefully to notice the difference. Good spot, Andrew.

@aswaterman
Copy link
Member Author

@allenjbaum gets credit for spotting the inconsistency; I merely proposed the wording of the fix!

@aswaterman
Copy link
Member Author

I'm going to merge this since it doesn't seem controversial, but please reopen #600 if further discussion is warranted.

@aswaterman aswaterman merged commit 51522f9 into master Oct 13, 2020
@aswaterman aswaterman deleted the fix-600 branch October 13, 2020 21:48
aswaterman added a commit that referenced this pull request Feb 11, 2021
Forgot to do so as part of #601.
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.

EBREAK and mtval
3 participants