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