1 /* SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) */
3 * This file is provided under a dual BSD/GPLv2 license. When using or
4 * redistributing this file, you may do so under either license.
6 * Copyright(c) 2018 Intel Corporation. All rights reserved.
9 #ifndef __INCLUDE_SOUND_SOF_INFO_H__
10 #define __INCLUDE_SOUND_SOF_INFO_H__
12 #include <sound/sof/header.h>
13 #include <sound/sof/stream.h>
16 * Firmware boot and version
19 #define SOF_IPC_MAX_ELEMS 16
22 * Firmware boot info flag bits (64-bit)
24 #define SOF_IPC_INFO_BUILD BIT(0)
25 #define SOF_IPC_INFO_LOCKS BIT(1)
26 #define SOF_IPC_INFO_LOCKSV BIT(2)
27 #define SOF_IPC_INFO_GDB BIT(3)
29 /* extended data types that can be appended onto end of sof_ipc_fw_ready */
30 enum sof_ipc_ext_data
{
31 SOF_IPC_EXT_UNUSED
= 0,
32 SOF_IPC_EXT_WINDOW
= 1,
33 SOF_IPC_EXT_CC_INFO
= 2,
34 SOF_IPC_EXT_PROBE_INFO
= 3,
35 SOF_IPC_EXT_USER_ABI_INFO
= 4,
38 /* FW version - SOF_IPC_GLB_VERSION */
39 struct sof_ipc_fw_version
{
40 struct sof_ipc_hdr hdr
;
49 /* used to check FW and ldc file compatibility, reproducible value */
52 /* reserved for future use */
56 /* FW ready Message - sent by firmware when boot has completed */
57 struct sof_ipc_fw_ready
{
58 struct sof_ipc_cmd_hdr hdr
;
59 uint32_t dspbox_offset
; /* dsp initiated IPC mailbox */
60 uint32_t hostbox_offset
; /* host initiated IPC mailbox */
62 uint32_t hostbox_size
;
63 struct sof_ipc_fw_version version
;
65 /* Miscellaneous flags */
68 /* reserved for future use */
73 * Extended Firmware data. All optional, depends on platform/arch.
76 SOF_IPC_REGION_DOWNBOX
= 0,
80 SOF_IPC_REGION_STREAM
,
82 SOF_IPC_REGION_EXCEPTION
,
85 struct sof_ipc_ext_data_hdr
{
86 struct sof_ipc_cmd_hdr hdr
;
87 uint32_t type
; /**< SOF_IPC_EXT_ */
90 struct sof_ipc_window_elem
{
91 struct sof_ipc_hdr hdr
;
92 uint32_t type
; /**< SOF_IPC_REGION_ */
93 uint32_t id
; /**< platform specific - used to map to host memory */
94 uint32_t flags
; /**< R, W, RW, etc - to define */
95 uint32_t size
; /**< size of region in bytes */
96 /* offset in window region as windows can be partitioned */
100 /* extended data memory windows for IPC, trace and debug */
101 struct sof_ipc_window
{
102 struct sof_ipc_ext_data_hdr ext_hdr
;
103 uint32_t num_windows
;
104 struct sof_ipc_window_elem window
[SOF_IPC_MAX_ELEMS
];
107 struct sof_ipc_cc_version
{
108 struct sof_ipc_ext_data_hdr ext_hdr
;
113 /* reserved for future use */
114 uint32_t reserved
[4];
116 uint8_t name
[16]; /* null terminated compiler name */
117 uint8_t optim
[4]; /* null terminated compiler -O flag value */
118 uint8_t desc
[32]; /* null terminated compiler description */
121 /* extended data: Probe setup */
122 struct sof_ipc_probe_support
{
123 struct sof_ipc_ext_data_hdr ext_hdr
;
125 uint32_t probe_points_max
;
126 uint32_t injection_dmas_max
;
128 /* reserved for future use */
129 uint32_t reserved
[2];
132 /* extended data: user abi version(s) */
133 struct sof_ipc_user_abi_version
{
134 struct sof_ipc_ext_data_hdr ext_hdr
;
136 uint32_t abi_dbg_version
;