forked from thesofproject/sof
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathheader.h
More file actions
48 lines (43 loc) · 1.75 KB
/
header.h
File metadata and controls
48 lines (43 loc) · 1.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/* SPDX-License-Identifier: BSD-3-Clause
*
* Copyright(c) 2018 Intel Corporation. All rights reserved.
*
* Author: Liam Girdwood <liam.r.girdwood@linux.intel.com>
* Keyon Jie <yang.jie@linux.intel.com>
*/
/**
* \file include/kernel/header.h
* \brief Non IPC command header
* \author Liam Girdwood <liam.r.girdwood@linux.intel.com>
* \author Keyon Jie <yang.jie@linux.intel.com>
*/
#ifndef __KERNEL_HEADER_H__
#define __KERNEL_HEADER_H__
#include <stdint.h>
/**
* \brief Header for all non IPC ABI data.
*
* Identifies data type, size and ABI.
* Only in case of IPC3 the data header used for all component data structures
* and binary blobs sent to firmware as runtime data. This data is typically sent
* by userspace applications and tunnelled through any OS kernel (via binary
* kcontrol on Linux) to the firmware.
* With IPC4 the ABI header is used between user space and kernel for verification
* purposes and to provide information about the attached binary blob, like the
* param_id of it.
*/
struct sof_abi_hdr {
uint32_t magic; /**< Magic number for validation */
/**< for IPC3 data: 0x00464F53 ('S', 'O', 'F', '\0') */
/**< for IPC4 data: 0x34464F53 ('S', 'O', 'F', '4') */
uint32_t type; /**< module specific parameter */
/**< for IPC3: Component specific type */
/**< for IPC4: parameter ID (param_id) of the data */
uint32_t size; /**< size in bytes of data excl. this struct */
uint32_t abi; /**< SOF ABI version. */
/**< The version is valid in scope of the 'magic', */
/**< IPC3 and IPC4 ABI version numbers have no relationship. */
uint32_t reserved[4]; /**< reserved for future use */
uint32_t data[]; /**< Component data - opaque to core */
} __attribute__((packed));
#endif /* __KERNEL_HEADER_H__ */