Sound Open Firmware
Loading...
Searching...
No Matches
debug_stream.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: BSD-3-Clause
2 *
3 * Copyright(c) 2024 Intel Corporation.
4 */
5
6#ifndef __SOC_DEBUG_STREAM_H__
7#define __SOC_DEBUG_STREAM_H__
8
9/*
10 * Debug Stream is a stream protocol for passing real-time debug
11 * information from SOF system. It provides the framework for
12 * passing pieces of abstract data objects from DSP side to host side
13 * debugging tools.
14 *
15 * The details of Debug Stream protocol varies depending on transfer
16 * method, but the stream should always start with a header that
17 * consists of DEBUG_STREAM_IDENTIFIER and header size.
18 */
19
20#define DEBUG_STREAM_IDENTIFIER 0x1ED15EED /* value for 'magic' */
21
23 uint32_t magic; /* Magic number to recognize stream start */
24 uint32_t hdr_size; /* Header size */
26
27/*
28 * After the header ('hdr_size' bytes from beginning of 'magic') a
29 * stream of Debug Stream records should follow. Each record will
30 * start with a record identifier and record size, after which the
31 * record payload will follow.
32 *
33 * The abstract data is application specific and is passed from DSP
34 * debug entity to user space debug tool for decoding and
35 * presentation. The data is recognized by the 'id' and the 'size_words'
36 * describes the amount of data. The 'seqno' is a running number of sent
37 * record, increased by one after each record. The protocol is
38 * agnostic about the contents of the records.
39 */
40
42 uint32_t id; /* Record id of abstract data record */
43 uint32_t seqno; /* Increments after each record */
44 uint32_t size_words; /* Size of the whole record in words */
45 uint32_t data[];
46} __packed;
47
48/* Debug Stream record identifiers */
49#define DEBUG_STREAM_RECORD_ID_UNINITIALIZED 0 /* invalid record marker */
50#define DEBUG_STREAM_RECORD_ID_THREAD_INFO 1 /* Thread info record */
51#define DEBUG_STREAM_RECORD_ID_TEXT_MSG 2 /* Text message */
52
53#endif /* __SOC_DEBUG_STREAM_H__ */
#define __packed
Definition ext_manifest.h:43
Definition debug_stream.h:22
uint32_t magic
Definition debug_stream.h:23
uint32_t hdr_size
Definition debug_stream.h:24
Definition debug_stream.h:41
uint32_t seqno
Definition debug_stream.h:43
uint32_t data[]
Definition debug_stream.h:45
uint32_t id
Definition debug_stream.h:42
uint32_t size_words
Definition debug_stream.h:44