[Pdbg] [PATCH v2 11/12] libpdbg: Add api for custom sbe chip-op
Amitay Isaacs
amitay at ozlabs.org
Thu Jul 4 18:05:24 AEST 2019
Signed-off-by: Amitay Isaacs <amitay at ozlabs.org>
---
libpdbg/libpdbg.h | 1 +
libpdbg/target.c | 10 ++++++++++
2 files changed, 11 insertions(+)
diff --git a/libpdbg/libpdbg.h b/libpdbg/libpdbg.h
index e193260..2c49ee9 100644
--- a/libpdbg/libpdbg.h
+++ b/libpdbg/libpdbg.h
@@ -240,6 +240,7 @@ 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_control(struct pdbg_target *target, uint32_t core_id, uint32_t thread_id, uint32_t oper);
+int sbe_custom(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);
void sbe_ffdc_dump(struct pdbg_target *target);
diff --git a/libpdbg/target.c b/libpdbg/target.c
index f7f16bf..b72cf8a 100644
--- a/libpdbg/target.c
+++ b/libpdbg/target.c
@@ -285,6 +285,16 @@ int sbe_control(struct pdbg_target *target, uint32_t core_id, uint32_t thread_id
return sbefifo->control(sbefifo, core_id, thread_id, oper);
}
+int sbe_custom(struct pdbg_target *target, uint32_t *msg, uint32_t msg_len, uint8_t **out, uint32_t *out_len, uint32_t *status)
+{
+ struct sbefifo *sbefifo;
+
+ assert(pdbg_target_is_class(target, "sbefifo"));
+
+ sbefifo = target_to_sbefifo(target);
+ return sbefifo->custom(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