diff mbox series

[2/2] libpdbg: Add apis for mpipl related chip-ops

Message ID 20200304061619.202979-2-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/libpdbg.h | 18 ++++++++++++++++++
 libpdbg/target.c  | 22 ++++++++++++++++++++++
 2 files changed, 40 insertions(+)
diff mbox series

Patch

diff --git a/libpdbg/libpdbg.h b/libpdbg/libpdbg.h
index 1fc7ef4..fbc32b6 100644
--- a/libpdbg/libpdbg.h
+++ b/libpdbg/libpdbg.h
@@ -1161,6 +1161,24 @@  int sbe_istep(struct pdbg_target *target, uint32_t major, uint32_t minor);
  */
 uint32_t sbe_ffdc_get(struct pdbg_target *target, const uint8_t **ffdc, uint32_t *ffdc_len);
 
+/**
+ * @brief Execute enter mpipl on the pib
+ *
+ * @param[in] target pib target to operate on
+ *
+ * @return 0 on success, -1 on failure
+ */
+int sbe_mpipl_enter(struct pdbg_target *target);
+
+/**
+ * @brief Execute continue mpipl on the pib
+ *
+ * @param[in] target pib target to operate on
+ *
+ * @return 0 on success, -1 on failure
+ */
+int sbe_mpipl_continue(struct pdbg_target *target);
+
 /**
  * @brief Type for specifying a progress callback for long running
  * operations
diff --git a/libpdbg/target.c b/libpdbg/target.c
index 5906ce7..1b54660 100644
--- a/libpdbg/target.c
+++ b/libpdbg/target.c
@@ -308,6 +308,28 @@  int sbe_istep(struct pdbg_target *target, uint32_t major, uint32_t minor)
 	return chipop->istep(chipop, major, minor);
 }
 
+int sbe_mpipl_enter(struct pdbg_target *target)
+{
+        struct chipop *chipop;
+
+        chipop = pib_to_chipop(target);
+        if (!chipop)
+                return -1;
+
+        return chipop->mpipl_enter(chipop);
+}
+
+int sbe_mpipl_continue(struct pdbg_target *target)
+{
+        struct chipop *chipop;
+
+        chipop = pib_to_chipop(target);
+        if (!chipop)
+                return -1;
+
+        return chipop->mpipl_continue(chipop);
+}
+
 uint32_t sbe_ffdc_get(struct pdbg_target *target, const uint8_t **ffdc, uint32_t *ffdc_len)
 {
 	struct chipop *chipop;