Skip to content

ASoC: SOF: ipc4: Add support for 'mtrace' log extraction

Peter Ujfalusi alsa-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest7 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7ASoC: SOF: ipc4: Only print LOG BUFFER update message info if requestedsound/soc/sof/ipc4.c+12 -00 replies
2/7ASoC: SOF: ipc4: Add macro to get core ID from log buffer status messageinclude/sound/sof/ipc4/header.h+5 -00 replies
3/7ASoC: SOF: ipc4: Add define for the outbox window indexsound/soc/sof/ipc4-priv.h sound/soc/sof/ipc4.c+4 -10 replies
4/7ASoC: SOF: ipc4: Configure the debug box offsetsound/soc/sof/ipc4-priv.h sound/soc/sof/ipc4.c+5 -00 replies
5/7ASoC: SOF: ipc4: Add support for mtrace log extractionsound/soc/sof/Makefile sound/soc/sof/ipc4-loader.c sound/soc/sof/ipc4-mtrace.c +2 more+664 -20 replies
6/7ASoC: SOF: Intel: icl: Set IPC4-specific DSP opssound/soc/sof/intel/icl.c+24 -40 replies
7/7ASoC: SOF: Intel: Add mtrace type information for IPC4sound/soc/sof/intel/apl.c sound/soc/sof/intel/cnl.c sound/soc/sof/intel/icl.c +2 more+10 -00 replies

Reviews trailers per patch

All 7 patches have a Reviewed-by or Acked-by.

PatchPierre-Louis BossartRander WangRanjani Sridharan
1/7R-b R-b R-b
2/7R-b R-b R-b
3/7R-b R-b R-b
4/7R-b R-b R-b
5/7R-b R-b R-b
6/7R-b R-b R-b
7/7R-b R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v1 thread

Cover letter [PATCH 0/7] ASoC: SOF: ipc4: Add support for 'mtrace' log extraction

Hi,

The traditional dtrace used by SOF IPC3 is not available with firmware built as IPC4.
With the new IPC implementation we have a new log extraction infrastructure and 'mtrace' is one way to get the logs out from the firmware for debugging.

The protocol is relatively simple:
The shared sram's debug window is split up to 'slots' Each DSP core will get a dedicated slot assigned for log output. The function of a slots can be checked in a descriptor table. The slot used for logging has the following layout:

u32 host_read_ptr;
u32 dsp_write_ptr;
u8 buffer[];

The two pointers are offsets within the buffer.

The firmware manages the write pointer, the host updates the read pointer value and based on the two pointers the log entries can be extracted. The firmware also sends notification when new entries are available in the log slot.

The user space tool to read the log entries can be found in the SOF repository:
https://github.com/thesofproject/sof/blob/main/tools/mtrace/mtrace-reader.py

Regards,
Peter
---
Peter Ujfalusi (7):
ASoC: SOF: ipc4: Only print LOG BUFFER update message info if
requested
ASoC: SOF: ipc4: Add macro to get core ID from log buffer status
message
ASoC: SOF: ipc4: Add define for the outbox window index
ASoC: SOF: ipc4: Configure the debug box offset
ASoC: SOF: ipc4: Add support for mtrace log extraction
ASoC: SOF: Intel: icl: Set IPC4-specific DSP ops
ASoC: SOF: Intel: Add mtrace type information for IPC4

 include/sound/sof/ipc4/header.h |   5 +
 sound/soc/sof/Makefile          |   3 +-
 sound/soc/sof/intel/apl.c       |   2 +
 sound/soc/sof/intel/cnl.c       |   2 +
 sound/soc/sof/intel/icl.c       |  30 +-
 sound/soc/sof/intel/mtl.c       |   2 +
 sound/soc/sof/intel/tgl.c       |   2 +
 sound/soc/sof/ipc4-loader.c     |   2 +
 sound/soc/sof/ipc4-mtrace.c     | 643 ++++++++++++++++++++++++++++++++
 sound/soc/sof/ipc4-priv.h       |  18 +-
 sound/soc/sof/ipc4.c            |  22 +-
 11 files changed, 724 insertions(+), 7 deletions(-)
 create mode 100644 sound/soc/sof/ipc4-mtrace.c
Signature · 1 line
2.37.3