[Pdbg] [PATCH 6/8] libpdbg: Implement state method for sbefifo thread

Amitay Isaacs amitay at ozlabs.org
Fri Oct 9 14:59:59 AEDT 2020


Currently only p9 is supported for sbefifo thread.

Signed-off-by: Amitay Isaacs <amitay at ozlabs.org>
---
 libpdbg/sbefifo.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/libpdbg/sbefifo.c b/libpdbg/sbefifo.c
index 9d68853..8c9f467 100644
--- a/libpdbg/sbefifo.c
+++ b/libpdbg/sbefifo.c
@@ -25,6 +25,7 @@
 #include "hwunit.h"
 #include "debug.h"
 #include "sprs.h"
+#include "chip.h"
 
 static int sbefifo_op_getmem(struct mem *sbefifo_mem,
 			     uint64_t addr, uint8_t *data, uint64_t size,
@@ -320,6 +321,11 @@ static int sbefifo_thread_op(struct thread *thread, uint32_t oper)
 				    mode);
 }
 
+static struct thread_state sbefifo_thread_state(struct thread *thread)
+{
+	return p9_thread_state(thread);
+}
+
 static int sbefifo_thread_start(struct thread *thread)
 {
 	return sbefifo_thread_op(thread, SBEFIFO_INSN_OP_START);
@@ -714,6 +720,7 @@ static struct thread sbefifo_thread = {
 		.probe = sbefifo_thread_probe,
 		.release = sbefifo_thread_release,
 	},
+	.state = sbefifo_thread_state,
 	.start = sbefifo_thread_start,
 	.stop = sbefifo_thread_stop,
 	.step = sbefifo_thread_step,
-- 
2.26.2



More information about the Pdbg mailing list