summaryrefslogtreecommitdiffstats
path: root/import/chips/p9/procedures/ppe/pk/trace/pk_trace_binary.c
diff options
context:
space:
mode:
Diffstat (limited to 'import/chips/p9/procedures/ppe/pk/trace/pk_trace_binary.c')
-rw-r--r--import/chips/p9/procedures/ppe/pk/trace/pk_trace_binary.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/import/chips/p9/procedures/ppe/pk/trace/pk_trace_binary.c b/import/chips/p9/procedures/ppe/pk/trace/pk_trace_binary.c
index 5bc63179..c6680a32 100644
--- a/import/chips/p9/procedures/ppe/pk/trace/pk_trace_binary.c
+++ b/import/chips/p9/procedures/ppe/pk/trace/pk_trace_binary.c
@@ -85,6 +85,17 @@ void pk_trace_binary(uint32_t i_hash_and_size, void* bufp)
//calculate the offset for the next entry in the cb
state.offset = footer_offset + sizeof(PkTraceBinary);
+#ifdef PK_TRACE_BUFFER_WRAP_MARKER
+
+ //insert marker to indicate when circular buffer wraps
+ if ((state.offset & PK_TRACE_SZ) ^ G_wrap_mask)
+ {
+ G_wrap_mask = state.offset & PK_TRACE_SZ;
+ asm volatile ("tw 0, 31, 31");
+ }
+
+#endif
+
//update the cb state (tbu and offset)
g_pk_trace_buf.state.word64 = state.word64;
OpenPOWER on IntegriCloud