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

AR: Clarify itrigger and trigger number translation #903

Merged
merged 1 commit into from
Oct 12, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
AR: Clarify itrigger and trigger number translation
itrigger numbers relate to the value written to *cause when the trap is
taken.

Addresses #889.
  • Loading branch information
timsifive committed Oct 12, 2023
commit 92835a85352d2b5e087ca953c164181367078fe8
16 changes: 8 additions & 8 deletions xml/hwbp_registers.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1132,19 +1132,19 @@
<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 can fire when an interrupt trap is taken.

It can be enabled for individual interrupt numbers by setting the bit
corresponding to the interrupt number in \RcsrTdataTwo. The interrupt
number is interpreted in the mode that the trap handler executes in.
(E.g. virtualized interrupt numbers are not the same in every mode.)
In addition the trigger can be enabled for non-maskable interrupts using
\FcsrItriggerNmi.

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.)

When the trigger matches, it fires after the trap occurs, just before
the first instruction of the trap handler is executed. If
\FcsrItriggerAction=0, the standard CSRs are updated for taking the
Expand Down