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 <karolx.trzcinski@linux.intel.com>
This commit is contained in:
Karol Trzcinski 2020-06-26 11:04:50 +02:00 committed by Liam Girdwood
parent 2263a8bc62
commit 6c14e76c0d
1 changed files with 8 additions and 0 deletions

View File

@ -24,6 +24,9 @@
#include <sof/trace/dma-trace.h>
#include <ipc/topology.h>
#include <ipc/trace.h>
#include <kernel/abi.h>
#include <user/abi_dbg.h>
#include <version.h>
#include <errno.h>
#include <stddef.h>
@ -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));