Skip to content

Commit

Permalink
trace: Log FW ABI and hash numbers
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
ktrzcinx authored and lgirdwood committed Aug 18, 2020
1 parent 2263a8b commit 6c14e76
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/trace/dma-trace.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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));

Expand Down

0 comments on commit 6c14e76

Please sign in to comment.