diff options
author | Tobias Kaiser <mail@tb-kaiser.de> | 2020-10-12 18:16:12 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-12 09:16:12 -0700 |
commit | fb477376da7eddf0e9cf0dc1ad828527499127b3 (patch) | |
tree | 032328b9d5b106776ff89f042e84aa25bd07de47 /tcl/target | |
parent | 6c1bd050881c1ed1702218b1224d3eb7a5336ae8 (diff) | |
download | riscv-openocd-fb477376da7eddf0e9cf0dc1ad828527499127b3.zip riscv-openocd-fb477376da7eddf0e9cf0dc1ad828527499127b3.tar.gz riscv-openocd-fb477376da7eddf0e9cf0dc1ad828527499127b3.tar.bz2 |
Do not throw error if RISC-V tselect unimplemented (#542)
* Do not throw error if RISC-V tselect unimplemented
A RISC-V hart without Trigger Module may not implement any of the
associated CSRs such as tselect according to the specification.
riscv_enumerate_triggers previously threw an error in this case, but
only on the first invocation due to r->triggers_enumerated being set
regardless of this. Due to the propagation of this error condition to
disable_triggers and riscv_openocd_step, such a hart would remain
halted after the first 'step' (or 'continue') of a debug session.
This problem can be reproduced with the Ibex RISC-V CPU when
the DbgTriggerEn parameter is set to zero.
This commit changes the behavior of riscv_enumerate_triggers to
return ERROR_OK when tselect was not readable. This fixes the
described malfunction.
Change-Id: Ie813cb119b03702fe708801b5f3581f9bf337243
Signed-off-by: Tobias Kaiser <kaiser@tu-berlin.de>
* Add debug message if RISC-V tselect not readable
Change-Id: Ic3ad5bff9de5c50142cad983f351ce0099cec5c8
Signed-off-by: Tobias Kaiser <kaiser@tu-berlin.de>
* RISC-V triggers: continue if tselect is unreadable
In riscv_enumerate_triggers, even if for one hart tselect cannot be
accessed, other harts might provide trigger support. For this reason,
"continue;" is the appropriate action on a read failure of tselect,
which indicates that triggers are not implemented, instead of
"return ERROR_OK;".
Change-Id: Ied56f3e237b76195a15bfde159532eda9d347d21
Signed-off-by: Tobias Kaiser <kaiser@tu-berlin.de>
Diffstat (limited to 'tcl/target')
0 files changed, 0 insertions, 0 deletions