@@ -1347,6 +1347,22 @@ int sbe_mpipl_continue(struct pdbg_target *target);
*/
int sbe_mpipl_get_ti_info(struct pdbg_target *target, uint8_t **data, uint32_t *data_len);
+/**
+ * @brief Get sbe dump
+ *
+ * The dump data must be freed by caller. It is allocated using malloc() and
+ * must be freed using free().
+ *
+ * @param[in] target pib target to operate on
+ * @param[in] type Type of dump
+ * @param[in] clock Clock on or off
+ * @param[out] data Dump information
+ * @param[out] data_len length of the data
+ *
+ * @return 0 on success, -1 on failure
+ */
+int sbe_dump(struct pdbg_target *target, uint8_t type, uint8_t clock, uint8_t **data, uint32_t *data_len);
+
/**
* @brief Read a OCMB SCOM register
*
@@ -455,6 +455,22 @@ int sbe_mpipl_get_ti_info(struct pdbg_target *target, uint8_t **data, uint32_t *
return chipop->mpipl_get_ti_info(chipop, data, data_len);
}
+int sbe_dump(struct pdbg_target *target, uint8_t type, uint8_t clock, uint8_t **data, uint32_t *data_len)
+{
+ struct chipop *chipop;
+
+ chipop = pib_to_chipop(target);
+ if (!chipop)
+ return -1;
+
+ if (!chipop->dump) {
+ PR_ERROR("dump() not implemented for the target\n");
+ return -1;
+ }
+
+ return chipop->dump(chipop, type, clock, data, data_len);
+}
+
int ocmb_getscom(struct pdbg_target *target, uint64_t addr, uint64_t *val)
{
struct ocmb *ocmb;
Signed-off-by: Amitay Isaacs <amitay@ozlabs.org> --- libpdbg/libpdbg.h | 16 ++++++++++++++++ libpdbg/target.c | 16 ++++++++++++++++ 2 files changed, 32 insertions(+)