[Pdbg] [PATCH 1/2] libpdbg: Add MPIPL related chip-ops
Amitay Isaacs
amitay at ozlabs.org
Wed Mar 4 17:16:18 AEDT 2020
From: Dhruvaraj Subhashchandran <dhruvaraj at in.ibm.com>
Signed-off-by: Dhruvaraj Subhashchandran <dhruvaraj at in.ibm.com>
Reviewed-by: Amitay Isaacs <amitay at ozlabs.org>
---
libpdbg/hwunit.h | 2 ++
libpdbg/sbefifo.c | 18 ++++++++++++++++++
2 files changed, 20 insertions(+)
diff --git a/libpdbg/hwunit.h b/libpdbg/hwunit.h
index 2de5972..dae6b94 100644
--- a/libpdbg/hwunit.h
+++ b/libpdbg/hwunit.h
@@ -69,6 +69,8 @@ struct chipop {
struct pdbg_target target;
uint32_t (*ffdc_get)(struct chipop *, const uint8_t **, uint32_t *);
int (*istep)(struct chipop *, uint32_t major, uint32_t minor);
+ int (*mpipl_enter)(struct chipop *);
+ int (*mpipl_continue)(struct chipop *);
int (*thread_start)(struct chipop *, uint32_t core_id, uint32_t thread_id);
int (*thread_stop)(struct chipop *, uint32_t core_id, uint32_t thread_id);
int (*thread_step)(struct chipop *, uint32_t core_id, uint32_t thread_id);
diff --git a/libpdbg/sbefifo.c b/libpdbg/sbefifo.c
index 7b9a57a..cb2c6a1 100644
--- a/libpdbg/sbefifo.c
+++ b/libpdbg/sbefifo.c
@@ -179,6 +179,22 @@ static int sbefifo_op_istep(struct chipop *chipop,
return sbefifo_istep_execute(sctx, major & 0xff, minor & 0xff);
}
+static int sbefifo_op_mpipl_continue(struct chipop *chipop)
+{
+ struct sbefifo *sbefifo = target_to_sbefifo(chipop->target.parent);
+ struct sbefifo_context *sctx = sbefifo->get_sbefifo_context(sbefifo);
+
+ return sbefifo_mpipl_continue(sctx);
+}
+
+static int sbefifo_op_mpipl_enter(struct chipop *chipop)
+{
+ struct sbefifo *sbefifo = target_to_sbefifo(chipop->target.parent);
+ struct sbefifo_context *sctx = sbefifo->get_sbefifo_context(sbefifo);
+
+ return sbefifo_mpipl_enter(sctx);
+}
+
static int sbefifo_op_control(struct chipop *chipop,
uint32_t core_id, uint32_t thread_id,
uint32_t oper)
@@ -281,6 +297,8 @@ static struct chipop sbefifo_chipop = {
},
.ffdc_get = sbefifo_op_ffdc_get,
.istep = sbefifo_op_istep,
+ .mpipl_enter = sbefifo_op_mpipl_enter,
+ .mpipl_continue = sbefifo_op_mpipl_continue,
.thread_start = sbefifo_op_thread_start,
.thread_stop = sbefifo_op_thread_stop,
.thread_step = sbefifo_op_thread_step,
--
2.24.1
More information about the Pdbg
mailing list