From 6c14e76c0d98366dccbc03f7fb08219f6ba853b3 Mon Sep 17 00:00:00 2001 From: Karol Trzcinski Date: Fri, 26 Jun 2020 11:04:50 +0200 Subject: [PATCH] trace: Log FW ABI and hash numbers This log allows to fully identify source code and check ldc compatibility with FW by comparing source hash value saved in ldc file with value received from FW in runtimee. Without this mechanism it's impossible to be sure about right connection without booting firmware (to read fw_ready message content), because value of fw_hash hasn't been provided in output logs file. This is especially important during debugging process based on logs received by client. Signed-off-by: Karol Trzcinski --- src/trace/dma-trace.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/trace/dma-trace.c b/src/trace/dma-trace.c index e3a9fbe07ba4..ec6e5cfd7268 100644 --- a/src/trace/dma-trace.c +++ b/src/trace/dma-trace.c @@ -24,6 +24,9 @@ #include #include #include +#include +#include +#include #include #include @@ -335,6 +338,11 @@ int dma_trace_enable(struct dma_trace_data *d) d->enabled = 1; schedule_task(&d->dmat_work, DMA_TRACE_PERIOD, DMA_TRACE_PERIOD); + /* it should be the very first sent log for easily identification */ + tr_info(&dt_tr, "FW ABI 0x%x DBG ABI 0x%x tag " SOF_GIT_TAG " src hash 0x%x (ldc hash " META_QUOTE(SOF_SRC_HASH) ")", + SOF_ABI_VERSION, SOF_ABI_DBG_VERSION, SOF_SRC_HASH); + trace_flush(); + out: platform_shared_commit(d, sizeof(*d));