[Pdbg] [PATCH 03/10] libpdbg: Add api to get/dump ffdc data from sbefifo
Amitay Isaacs
amitay at ozlabs.org
Wed Jul 3 13:46:12 AEST 2019
Signed-off-by: Amitay Isaacs <amitay at ozlabs.org>
---
libpdbg/libpdbg.h | 2 ++
libpdbg/target.c | 20 ++++++++++++++++++++
2 files changed, 22 insertions(+)
diff --git a/libpdbg/libpdbg.h b/libpdbg/libpdbg.h
index 14a41ab..8a6640e 100644
--- a/libpdbg/libpdbg.h
+++ b/libpdbg/libpdbg.h
@@ -230,6 +230,8 @@ 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);
+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);
typedef void (*pdbg_progress_tick_t)(uint64_t cur, uint64_t end);
diff --git a/libpdbg/target.c b/libpdbg/target.c
index 066f616..6508c14 100644
--- a/libpdbg/target.c
+++ b/libpdbg/target.c
@@ -274,6 +274,26 @@ int sbe_istep(struct pdbg_target *target, uint32_t major, uint32_t minor)
return sbefifo->istep(sbefifo, major, minor);
}
+uint32_t sbe_ffdc_get(struct pdbg_target *target, const uint8_t **ffdc, uint32_t *ffdc_len)
+{
+ struct sbefifo *sbefifo;
+
+ assert(pdbg_target_is_class(target, "sbefifo"));
+
+ sbefifo = target_to_sbefifo(target);
+ return sbefifo->ffdc_get(sbefifo, ffdc, ffdc_len);
+}
+
+void sbe_ffdc_dump(struct pdbg_target *target)
+{
+ struct sbefifo *sbefifo;
+
+ assert(pdbg_target_is_class(target, "sbefifo"));
+
+ sbefifo = target_to_sbefifo(target);
+ sbefifo->ffdc_dump(sbefifo);
+}
+
struct pdbg_target *require_target_parent(struct pdbg_target *target)
{
assert(target->parent);
--
2.21.0
More information about the Pdbg
mailing list