[Pdbg] [PATCH 10/10] libpdbg: Add api for custom sbe chip-op
Amitay Isaacs
amitay at ozlabs.org
Wed Jul 3 13:46:19 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 a8deb34..03a77a3 100644
--- a/libpdbg/libpdbg.h
+++ b/libpdbg/libpdbg.h
@@ -234,6 +234,7 @@ int sbe_thread_start(struct pdbg_target *target, uint32_t core_id, uint32_t thre
int sbe_thread_stop(struct pdbg_target *target, uint32_t core_id, uint32_t thread_id);
int sbe_thread_step(struct pdbg_target *target, uint32_t core_id, uint32_t thread_id);
int sbe_thread_sreset(struct pdbg_target *target, uint32_t core_id, uint32_t thread_id);
+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 18e492c..cf6bcdd 100644
--- a/libpdbg/target.c
+++ b/libpdbg/target.c
@@ -305,6 +305,16 @@ int sbe_thread_sreset(struct pdbg_target *target, uint32_t core_id, uint32_t thr
return sbe_thread_control(target, core_id, thread_id, 3);
}
+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