From: Nicholas Piggin <[email protected]>
icount triggers are supported so tinfo should advertise them.
Fixes: c472c142a7 ("target/riscv: debug: Add initial support of type 6 trigger")
Signed-off-by: Nicholas Piggin <[email protected]>
Reviewed-by: Daniel Henrique Barboza <[email protected]>
---
target/riscv/tcg/debug.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/target/riscv/tcg/debug.c b/target/riscv/tcg/debug.c
index 09d4cc03f9..9089d2ab78 100644
--- a/target/riscv/tcg/debug.c
+++ b/target/riscv/tcg/debug.c
@@ -958,8 +958,13 @@ void tdata_csr_write(CPURISCVState *env, int tdata_index,
target_ulong val)
target_ulong tinfo_csr_read(CPURISCVState *env)
{
- /* assume all triggers support the same types of triggers */
+ /*
+ * Assume all triggers support the same types of triggers
+ * TODO: set 1 (version 1.0) in the version field when we're
+ * ready to support it along with 0.13.
+ */
return BIT(TRIGGER_TYPE_AD_MATCH) |
+ BIT(TRIGGER_TYPE_INST_CNT) |
BIT(TRIGGER_TYPE_AD_MATCH6);
}
--
2.43.0