Skip to content

Commit

Permalink
AR: Clarify itrigger and trigger number translation
Browse files Browse the repository at this point in the history
itrigger numbers relate to the value written to *cause when the trap is
taken.

Addresses #889.
  • Loading branch information
timsifive committed Oct 11, 2023
1 parent 3a20826 commit adfd2c2
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions xml/hwbp_registers.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1132,18 +1132,20 @@
<register name="Interrupt Trigger" short="itrigger" address="0x7a1">
This register is accessible as \RcsrTdataOne when \FcsrTdataOneType is 4.

This trigger may fire on any of the interrupts configurable in \Rmie
(described in the Privileged Spec) or the NMI. The interrupts to fire on are
configured by setting the same bit in \RcsrTdataTwo as would be set in
\Rmie to enable the interrupt.
This trigger may fire on any of the interrupts described in the
Privileged Spec, or the NMI. The interrupts to fire on are configured by
setting the bit in \RcsrTdataTwo whose index would be written to the
Exception Code field of the mode-relevant {\tt cause} register when the
trap is taken. For interrupts whose numbers are translated, that means
the number checked is the one in the mode that the trap handler executes
in.

Hardware may only support a subset of interrupts for this trigger. A
debugger must read back \RcsrTdataTwo after writing it to confirm the
requested functionality is actually supported.

The trigger only fires if the hart takes a trap because of the
interrupt. (E.g.\ it does not fire when a timer interrupt occurs but that
interrupt is not enabled in \Rmie.)
interrupt. (E.g.\ it does not fire for an interrupt that is masked.)

When the trigger matches, it fires after the trap occurs, just before
the first instruction of the trap handler is executed. If
Expand Down

0 comments on commit adfd2c2

Please sign in to comment.