From d2a79d05e1f1d5c43bd6796fc5a4ec9cca8517b4 Mon Sep 17 00:00:00 2001 From: Andy Ross Date: Thu, 24 Jun 2021 15:07:52 -0700 Subject: [PATCH] trace: Don't initialize trace buffer under Zephyr This memory is already owned and initialized by the OS under Zephyr (and in many cases already holds live output!), don't touch it. Signed-off-by: Andy Ross --- src/trace/trace.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/trace/trace.c b/src/trace/trace.c index f62c554e9..3065a5717 100644 --- a/src/trace/trace.c +++ b/src/trace/trace.c @@ -518,9 +518,15 @@ void trace_init(struct sof *sof) #endif /* CONFIG_TRACE_FILTERING_ADAPTIVE */ spinlock_init(&sof->trace->lock); +#ifndef __ZEPHYR__ + /* Zephyr owns and has already initialized this buffer (and + * likely has already logged to it by the time we get here). + * Don't touch. + */ bzero((void *)MAILBOX_TRACE_BASE, MAILBOX_TRACE_SIZE); dcache_writeback_invalidate_region((void *)MAILBOX_TRACE_BASE, MAILBOX_TRACE_SIZE); +#endif dma_trace_init_early(sof); }