[Pdbg] [PATCH v4 12/13] libpdbg: Add api for custom sbe chip-op
Amitay Isaacs
amitay at ozlabs.org
Wed Jul 17 14:08:51 AEST 2019
Signed-off-by: Amitay Isaacs <amitay at ozlabs.org>
---
libpdbg/libpdbg.h | 1 +
libpdbg/target.c | 11 +++++++++++
2 files changed, 12 insertions(+)
diff --git a/libpdbg/libpdbg.h b/libpdbg/libpdbg.h
index ac1b428..137fb9e 100644
--- a/libpdbg/libpdbg.h
+++ b/libpdbg/libpdbg.h
@@ -239,6 +239,7 @@ int opb_read(struct pdbg_target *target, uint32_t addr, uint32_t *data);
int opb_write(struct pdbg_target *target, uint32_t addr, uint32_t data);
int sbe_istep(struct pdbg_target *target, uint32_t major, uint32_t minor);
+int sbe_chipop(struct pdbg_target *target, uint32_t *msg, uint32_t msg_len, uint8_t **out, uint32_t *out_len, uint32_t *status);
uint32_t sbe_ffdc_get(struct pdbg_target *target, const uint8_t **ffdc, uint32_t *ffdc_len);
typedef void (*pdbg_progress_tick_t)(uint64_t cur, uint64_t end);
diff --git a/libpdbg/target.c b/libpdbg/target.c
index 0e9cc9a..73ca0f5 100644
--- a/libpdbg/target.c
+++ b/libpdbg/target.c
@@ -303,6 +303,17 @@ int sbe_istep(struct pdbg_target *target, uint32_t major, uint32_t minor)
return sbefifo->istep(sbefifo, major, minor);
}
+int sbe_chipop(struct pdbg_target *target, uint32_t *msg, uint32_t msg_len, uint8_t **out, uint32_t *out_len, uint32_t *status)
+{
+ struct sbefifo *sbefifo;
+
+ sbefifo = pib_to_sbefifo(target);
+ if (!sbefifo)
+ return -1;
+
+ return sbefifo->chipop(sbefifo, msg, msg_len, out, out_len, status);
+}
+
uint32_t sbe_ffdc_get(struct pdbg_target *target, const uint8_t **ffdc, uint32_t *ffdc_len)
{
struct sbefifo *sbefifo;
--
2.21.0
More information about the Pdbg
mailing list