[Sound-open-firmware] [PATCH] debug: Add debug to dump object contents at offsets in debug buffer
Liam Girdwood
liam.r.girdwood at linux.intel.com
Thu Oct 19 18:33:28 CEST 2017
Allows objects to be inserted at any offset in the debug buffer for
analysis.
Signed-off-by: Liam Girdwood <liam.r.girdwood at linux.intel.com>
---
src/include/reef/debug.h | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/src/include/reef/debug.h b/src/include/reef/debug.h
index 2bee8e6..ef64419 100644
--- a/src/include/reef/debug.h
+++ b/src/include/reef/debug.h
@@ -98,6 +98,16 @@
*(__m++) = *(__a++); \
} while (0);
+/* dump data area at addr and size count at mailbox ofset or shared memory */
+#define dump_at(addr, count, offset) \
+ do { \
+ volatile uint32_t *__m = (uint32_t*)mailbox_get_debug_base() + offset; \
+ volatile uint32_t *__a = (uint32_t*)addr; \
+ volatile int __c = count; \
+ while (__c--) \
+ *(__m++) = *(__a++); \
+ } while (0);
+
/* dump object to start of mailbox */
#define dump_object(__o) \
dbg(); \
@@ -108,6 +118,10 @@
dbg(); \
dump(__o, sizeof(*(__o)) >> 2);
+#define dump_object_ptr_at(__o, __at) \
+ dbg(); \
+ dump_at(__o, sizeof(*(__o)) >> 2, __at);
+
#else
#define dbg()
--
2.11.0
More information about the Sound-open-firmware
mailing list