Skip to content

target/riscv: Improve RISC-V Debug support

Bin Meng qemu-devel qemu-riscv 1 version Applied

Status from this message: Applied to riscv-to-apply.next

Get series with b4
b4 am [email protected]

Versions newest first

  1. v2 Latest8 patches 8 repliesApplied

Changes in v2 from the cover letter

- fixed MXL_RV128 case
- moved macros to patch#2
- added log guest errors for TRIGGER_TYPE_{NO_EXIST,UNAVAIL}
- moved RV{32,64}_DATA_MASK definition to this patch
- add handling of the DBG_ACTION_NONE case in do_trigger_action()
- drop patch: "target/riscv: debug: Return 0 if previous value written to tselect >= number of triggers"

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/8target/riscv: debug: Determine the trigger type from tdata1.typetarget/riscv/cpu.h target/riscv/csr.c target/riscv/debug.c +2 more+140 -672 replies
2/8target/riscv: debug: Introduce build_tdata1() to build tdata1 register contenttarget/riscv/debug.c target/riscv/debug.h+12 -51 reply
3/8target/riscv: debug: Introduce tdata1, tdata2, and tdata3 CSRstarget/riscv/cpu.h target/riscv/debug.c target/riscv/debug.h +1 more+48 -881 reply
4/8target/riscv: debug: Restrict the range of tselect value can be writtentarget/riscv/debug.c+3 -61 reply
5/8target/riscv: debug: Introduce tinfo CSRtarget/riscv/cpu_bits.h target/riscv/csr.c target/riscv/debug.c +1 more+18 -31 reply
6/8target/riscv: debug: Create common trigger actions functiontarget/riscv/debug.c target/riscv/debug.h+70 -21 reply
7/8target/riscv: debug: Check VU/VS modes for type 2 triggertarget/riscv/debug.c+10 -00 replies
8/8target/riscv: debug: Add initial support of type 6 triggertarget/riscv/debug.c target/riscv/debug.h+188 -40 replies

Reviews trailers per patch

All 8 patches have a Reviewed-by or Acked-by.

PatchBin MengLIU Zhiwei
1/8R-b R-b
2/8R-b R-b
3/8R-b R-b
4/8R-b R-b
5/8R-b R-b
6/8R-b R-b
7/8R-b
8/8R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/8] target/riscv: Improve RISC-V Debug support

This patchset refactors RISC-V Debug support to allow more types of triggers to be extended.

The initial support of type 6 trigger, which is similar to type 2 trigger with additional functionality, is also introduced in this patchset.

This is a v2 respin of previous patch originally done by Frank Chang at SiFive. I've incorperated my review comments in v2 and rebased against QEMU mainline.

Changes in v2:
- fixed MXL_RV128 case
- moved macros to patch#2
- added log guest errors for TRIGGER_TYPE_{NO_EXIST,UNAVAIL}
- moved RV{32,64}_DATA_MASK definition to this patch
- add handling of the DBG_ACTION_NONE case in do_trigger_action()
- drop patch: "target/riscv: debug: Return 0 if previous value written to tselect >= number of triggers"

Frank Chang (8):
target/riscv: debug: Determine the trigger type from tdata1.type target/riscv: debug: Introduce build_tdata1() to build tdata1 register
content
target/riscv: debug: Introduce tdata1, tdata2, and tdata3 CSRs target/riscv: debug: Restrict the range of tselect value can be
written
target/riscv: debug: Introduce tinfo CSR
target/riscv: debug: Create common trigger actions function target/riscv: debug: Check VU/VS modes for type 2 trigger target/riscv: debug: Add initial support of type 6 trigger

 target/riscv/cpu.h      |   6 +-
 target/riscv/cpu_bits.h |   1 +
 target/riscv/debug.h    |  55 +++--
 target/riscv/csr.c      |  10 +-
 target/riscv/debug.c    | 484 ++++++++++++++++++++++++++++++++--------
 target/riscv/machine.c  |  20 +-
 6 files changed, 445 insertions(+), 131 deletions(-)
Signature · 1 line
2.34.1