1 /* SPDX-License-Identifier: (GPL-2.0 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_DMA_BUFFER = 0,
35 /* FW version - SOF_IPC_GLB_VERSION */
36 struct sof_ipc_fw_version {
37 struct sof_ipc_hdr hdr;
47 /* reserved for future use */
51 /* FW ready Message - sent by firmware when boot has completed */
52 struct sof_ipc_fw_ready {
53 struct sof_ipc_cmd_hdr hdr;
54 uint32_t dspbox_offset; /* dsp initiated IPC mailbox */
55 uint32_t hostbox_offset; /* host initiated IPC mailbox */
57 uint32_t hostbox_size;
58 struct sof_ipc_fw_version version;
60 /* Miscellaneous flags */
63 /* reserved for future use */
68 * Extended Firmware data. All optional, depends on platform/arch.
71 SOF_IPC_REGION_DOWNBOX = 0,
75 SOF_IPC_REGION_STREAM,
77 SOF_IPC_REGION_EXCEPTION,
80 struct sof_ipc_ext_data_hdr {
81 struct sof_ipc_cmd_hdr hdr;
82 uint32_t type; /**< SOF_IPC_EXT_ */
85 struct sof_ipc_dma_buffer_elem {
86 struct sof_ipc_hdr hdr;
87 uint32_t type; /**< SOF_IPC_REGION_ */
88 uint32_t id; /**< platform specific - used to map to host memory */
89 struct sof_ipc_host_buffer buffer;
92 /* extended data DMA buffers for IPC, trace and debug */
93 struct sof_ipc_dma_buffer_data {
94 struct sof_ipc_ext_data_hdr ext_hdr;
97 /* host files in buffer[n].buffer */
98 struct sof_ipc_dma_buffer_elem buffer[];
101 struct sof_ipc_window_elem {
102 struct sof_ipc_hdr hdr;
103 uint32_t type; /**< SOF_IPC_REGION_ */
104 uint32_t id; /**< platform specific - used to map to host memory */
105 uint32_t flags; /**< R, W, RW, etc - to define */
106 uint32_t size; /**< size of region in bytes */
107 /* offset in window region as windows can be partitioned */
111 /* extended data memory windows for IPC, trace and debug */
112 struct sof_ipc_window {
113 struct sof_ipc_ext_data_hdr ext_hdr;
114 uint32_t num_windows;
115 struct sof_ipc_window_elem window[];