diff mbox series

[1/2] libpdbg: Add MPIPL related chip-ops

Message ID 20200304061619.202979-1-amitay@ozlabs.org
State Accepted
Headers show
Series [1/2] libpdbg: Add MPIPL related chip-ops | expand

Checks

Context Check Description
snowpatch_ozlabs/apply_patch warning Failed to apply on branch master (8b4611b5d8e7e2279fe4aa80c892fcfe10aa398d)
snowpatch_ozlabs/apply_patch fail Failed to apply to any branch

Commit Message

Amitay Isaacs March 4, 2020, 6:16 a.m. UTC
From: Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com>

Signed-off-by: Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com>
Reviewed-by: Amitay Isaacs <amitay@ozlabs.org>
---
 libpdbg/hwunit.h  |  2 ++
 libpdbg/sbefifo.c | 18 ++++++++++++++++++
 2 files changed, 20 insertions(+)
diff mbox series

Patch

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,