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

SYncing with master #912

Merged
merged 53 commits into from
Nov 20, 2023
Merged

SYncing with master #912

merged 53 commits into from
Nov 20, 2023

Conversation

wmat
Copy link
Contributor

@wmat wmat commented Nov 20, 2023

Pulling updates from master into asciidoc branch.

timsifive and others added 30 commits September 14, 2023 08:57
From Greg: "... why is this non-normative comment even necessary?  It's
directly consistent with 1.12, and it's compatible with 1.13 which
allows for trapping and just doesn't require it.  In other words, wrt
1.13, this trapping mandate by Debug 1.0 doesn't conflict with Priv
1.13.  And that allows Debug 1.0 to come along and tighten what is
allowed by 1.13."
AR: Remove comment about privspec/CSR behavior
AR: Clarify what debuggers can assume about MRs
If Sdext is implemented and Sdtrig is not implemented, then accessing
any of the Sdtrig CSRs must raise an illegal instruction exception.

(This is already said in privspec 1.12, but that might change in the
future.)
Address review comments on `debug_defines.h`
Reverts #723, which would result in mepc etc. being clobbered if a
breakpoint trigger would fire in the most privileged mode.

Specifically, consider:
1. icount is set so that it'll trigger on the first instruction of an exception handler.
2. Code takes an exception, saving mepc etc.
3. Now icount fires causing a breakpoint exception, clobbering mepc.
It was a bit confusing before. Hopefully now it's more clear how they
relate, and why you might want each one.
I added a hint as to how they were considered as LaTeX comments, because
I want to keep that info but don't want to word it nicely/completely
enough to actually have it as part of the spec text.
Fix debugger examples: use transfer with write
AR: List which extensions were considered.
dscratch[01] are DXLEN bits wide.
These were first introduced in #728.

Hopefully I got everything.
AR: Clarify unimplemented Sdtrig.
It's way outdated, and by removing it here, it doesn't show up in
debug_defines.h anymore.
Now it doesn't remove debug_reg_printer.h anymore, which is part of the
repo so shouldn't be removed.
AR: Clarify mcontext/hcontext.
AR: Remove Message Registers.
AR: tcontrol.mie applies to all traps, not just breakpoints
Clean up Makefile a little
AR: Clarify section/chapter in Sdext.
AR: Clarify why icount matches on every trap.
* AR: Clarify what tmexttrigger.intctl is for

Addresses #891.

* Add missing article

Co-authored-by: Paul Donahue <[email protected]>
Signed-off-by: Tim Newsome <[email protected]>

---------

Signed-off-by: Tim Newsome <[email protected]>
Co-authored-by: Paul Donahue <[email protected]>
mcontrol: Behavior is undefined because it's deprecated.

mcontrol6: If a trigger reports hit=before then some memory accesses may
have been performed. If it reports immediately after, then all accesses
have already been performed.
Incorporate more feedback from AR. Moved this into a separate Sdtrig
section, since the discussion could also apply to instructions that
cause triggers beside memory access ones. (E.g. an instruction that
combines memory accesses with a trigger, and itrigger.)

Follow up to #883.
timsifive and others added 23 commits October 4, 2023 09:59
Accidentally pushed to master instead of a feature branch.

This reverts commit 79e33fb.
Incorporate more feedback from AR. Moved this into a separate Sdtrig
section, since the discussion could also apply to instructions that
cause triggers beside memory access ones. (E.g. an instruction that
combines memory accesses with a trigger, and itrigger.)

Follow up to #883.
AR: Clarify triggers and multiple state changes
Add everyone who had a PR merged that changed the spec itself.
AR: Update priority table from latest privspec
Add people with git PRs to credits.
Specifically, make clear that itrigger fires *after* the original
exception has finished updating all the CSRs.

Hopefully resolves #890.
AR: Clarify itrigger behavior.
itrigger numbers relate to the value written to *cause when the trap is
taken.

Addresses #889.
AR: Clarify itrigger and trigger number translation
Addresses #905, which reports that in 1.13 higher exception codes will
be used.
AR: Comment etrigger limited to 32 exceptions if XLEN=32
AR: Comment itrigger limited to 32 ints if XLEN=32
`riscv_debug_reg_fields_to_s()` exited early without processing the last
field.

Signed-off-by: Evgeniy Naydanov <[email protected]>
1) We need to add ULL modifier to all values to fix some issues with `set_field` and `get_field` OpenOCD macros (for example, when `mask` = 1 << 31, it leads to UB becuase of signed overflow)
The last field of a register was not printed
Add `show` argument that lets user decide how to deal with fields whose
value is 0:
* Show them all.
* Show them if they have a symbolic name.
* Don't show them.

Use underscores instead of whitespace in field names, so we don't need a
comma in the separator.

New format:
```
{datacount=2 cmderr=not_supported}
{version=0.13 anyresumeack=1 allresumeack=1 impebreak=1 authenticated=true anyhalted=1 allhalted=1}
```
Make register dump output more concise.
@wmat wmat merged commit b6b180c into asciidoc Nov 20, 2023
1 check 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.

4 participants