To unsubscribe from this group and stop receiving emails from it, send an email to isa-dev+u...@groups.riscv.org <mailto:isa-dev+unsubscribe@groups.riscv.org>.
To post to this group, send email to isa...@groups.riscv.org <mailto:isa...@groups.riscv.org>.
Visit this group at https://groups.google.com/a/groups.riscv.org/group/isa-dev/.
To view this discussion on the web visit https://groups.google.com/a/groups.riscv.org/d/msgid/isa-dev/CAKnTnFQs%2BaG9u%3DPG%3DbQK%3DACVNe06jtWf4dXELsAnd3yP_yQgcg%40mail.gmail.com <https://groups.google.com/a/groups.riscv.org/d/msgid/isa-dev/CAKnTnFQs%2BaG9u%3DPG%3DbQK%3DACVNe06jtWf4dXELsAnd3yP_yQgcg%40mail.gmail.com?utm_medium=email&utm_source=footer>.
--
You received this message because you are subscribed to the Google Groups "RISC-V ISA Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isa-dev+u...@groups.riscv.org.
To post to this group, send email to isa...@groups.riscv.org.
Visit this group at https://groups.google.com/a/groups.riscv.org/group/isa-dev/.
To view this discussion on the web visit https://groups.google.com/a/groups.riscv.org/d/msgid/isa-dev/0e6c4a4f-6d33-ba38-3e0d-242143ddba25%40tuhh.de.
Hi Megan,
Thanks for the opportunity to review the latest Debug Spec. I have a question about non-maskable interrupts. The debug spec says that when a hart is in debug mode, all interrupts are masked. Does that apply to (what would otherwise be) non-maskable interrupts?
The issue is that the Privileged Architecture spec doesn't provide a way for code to see if an NMI is pending. The assumption is that there's no need, since when one is pending, the hart will take the interrupt and end up in the handler. If debug mode masks NMIs, then that assumption is broken, but debug code would have no way of detecting whether a hardware fault has occurred.
Is this a known issue, or one that needs to be addressed? Or are we all happy to leave it as is? Can you please include an explicit specification of whether non-maskable interrupts are included or excluded from making in debug mode?
Thanks, and cheers,
PA
--
You received this message because you are subscribed to the Google Groups "RISC-V ISA Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isa-dev+u...@groups.riscv.org.
To post to this group, send email to isa...@groups.riscv.org.
Visit this group at https://groups.google.com/a/groups.riscv.org/group/isa-dev/.
To view this discussion on the web visit https://groups.google.com/a/groups.riscv.org/d/msgid/isa-dev/CAKnTnFQs%2BaG9u%3DPG%3DbQK%3DACVNe06jtWf4dXELsAnd3yP_yQgcg%40mail.gmail.com.
-- Peter Ashenden, CTO IC Design, ASTC
Actually, now that I think of it a bit more, a NMI should probably not be masked in debug mode. An NMI indicates a hardware error condition, so should probably be treated similarly to an exception arising in debug mode. If that's the case, should cmderr be set to 3 (exception), or 7 (other), or should one of the as-yet unused codes be used to indicate NMI during debug mode?
Cheers,
PA
To view this discussion on the web visit https://groups.google.com/a/groups.riscv.org/d/msgid/isa-dev/5b171303-43f6-1c97-4e04-b18637ee67fd%40astc-design.com.
Hi Megan,
A comment re the reset value of dcsr.prv: The draft spec says this is 0 (user mode). The privileged architecture spec says that on reset, a hart starts in machine mode. It would be easier if dcsr.prv were reset to 3 (machine mode). That way, debug code after reset can simply do a dret to start the hart in machine mode.
Cheers,
PA
--
You received this message because you are subscribed to the Google Groups "RISC-V ISA Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isa-dev+u...@groups.riscv.org.
To post to this group, send email to isa...@groups.riscv.org.
Visit this group at https://groups.google.com/a/groups.riscv.org/group/isa-dev/.
To view this discussion on the web visit https://groups.google.com/a/groups.riscv.org/d/msgid/isa-dev/CAKnTnFQs%2BaG9u%3DPG%3DbQK%3DACVNe06jtWf4dXELsAnd3yP_yQgcg%40mail.gmail.com.
3.6: How does software know if the implementation clobbers the dpc when executing the program buffer?
Clarifying Issue Opened: https://github.com/riscv/riscv-debug-spec/issues/233
3.11.7: abstractcs – when is cmderr 4 used rather than 2? The reference to unsupported/supported when halted is confusing.
Clarifying issue Opened/Resolved: https://github.com/riscv/riscv-debug-spec/issues/234
How does the hasel behave when using abstract commands? Does it need to be 0 so that it is unambiguous which hart the command will run on? If not then the use of dmstatus.allhalted in Figure 3.1 seems wrong.
A: Abstract commands always apply to the single hart selected by hartsel. The figure is consistent in that if you halt/resume a set of harts, they will remain halted throughout. The important thing in the portion related to Abstract Command execution is the blue part, where it is really the abstractcs.busy bit which is relevant. But you do raise a good point, and the ERROR states seem somewhat confusing. See https://github.com/riscv/riscv-debug-spec/issues/239
3.9: Quick access would be more useful if you could use it for an action to do on a break point. Possibly, a bit to say execute on next halt.
Could you provide a use case for this feature?
4.2 :Does this possibility of no forward progress for lr/sc pairs mean that in some implementations you won’t be able to single step throught code using these instructions?
We've tried to clarify this: https://github.com/riscv/riscv-debug-spec/pull/231
Future Ideas, 5 and 9 are already mentioned in the main part of the spec.
We've cleaned this up and moved this whole section to a seperate document: https://github.com/riscv/riscv-debug-spec/pull/230/files
The language in the spec seems a bit changeable. It talks about ‘halting the processor’ sometimes rather than halting a hart.
Cleaned up in https://github.com/riscv/riscv-debug-spec/pull/238 and https://github.com/riscv/riscv-debug-spec/pull/237
From Vyacheslav:
1. Instructions in D-MODE are executed only with M-MODE privilege level...
2. When an instruction is executed in D-MODE and an exception is asserted, there is no detectable indication in the architectural state and, therefore, it is impossible to obtain additional details (e.g., cause, address).
Opened https://github.com/riscv/riscv-debug-spec/issues/241
3. There is ambiguity in the status of the Debug CSRs in relation to the HART(s). I.e. Debug CSRs reaction to the HART reset should be clearly defined in the spec...
I think the main place this relevant is in when/if these CSRs are reset. This is generally related to how to debug out of reset when Debugger is not controlling the reset. I opened a more general issue here: https://github.com/riscv/riscv-debug-spec/issues/242
4. Major pieces of the Debug Mode description are missing - i.e. explicit description of its state machine would eliminate those ambiguities....
Can you be more specific what is missing?
5. ... We propose to generalize Debug Mode and treat it as a special mode...
I think we need more information to really understand the differences you propose here.
Debug Mode redirection:
This is being tracked, "redirection" is probably a better name than "undelegate":https://github.com/riscv/riscv-debug-spec/issues/187
Program Buffer Only (no Abstract Command for GPRs):
This is an interesting proposal which goes back to the origins of the "common" spec. In a system with only a program buffer, several other requirements must be introduced so that the debugger can actually access registers, and none of these requirements are currently part of the spec. The abstract command access for GPRs was introduced to make it possible to do this "bootstrapping" in a general way. What do you propose to standardize in order to allow debugger to always access GPRs given only a Program Buffer?
From Alex: