0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 #ifndef __SOF_FIRMWARE_EXT_MANIFEST_H__
0017 #define __SOF_FIRMWARE_EXT_MANIFEST_H__
0018
0019 #include <linux/bits.h>
0020 #include <linux/compiler.h>
0021 #include <linux/types.h>
0022 #include <sound/sof/info.h>
0023
0024
0025 #define SOF_EXT_MAN_MAGIC_NUMBER 0x6e614d58
0026
0027
0028 #define SOF_EXT_MAN_BUILD_VERSION(MAJOR, MINOR, PATH) ((uint32_t)( \
0029 ((MAJOR) << 24) | \
0030 ((MINOR) << 12) | \
0031 (PATH)))
0032
0033
0034 #define SOF_EXT_MAN_VERSION_INCOMPATIBLE(host_ver, cli_ver) ( \
0035 ((host_ver) & GENMASK(31, 24)) != \
0036 ((cli_ver) & GENMASK(31, 24)))
0037
0038
0039 #define SOF_EXT_MAN_VERSION SOF_EXT_MAN_BUILD_VERSION(1, 0, 0)
0040
0041
0042 struct sof_ext_man_header {
0043 uint32_t magic;
0044
0045 uint32_t full_size;
0046
0047 uint32_t header_size;
0048
0049
0050 uint32_t header_version;
0051
0052
0053
0054 } __packed;
0055
0056
0057
0058
0059 enum sof_ext_man_elem_type {
0060 SOF_EXT_MAN_ELEM_FW_VERSION = 0,
0061 SOF_EXT_MAN_ELEM_WINDOW = 1,
0062 SOF_EXT_MAN_ELEM_CC_VERSION = 2,
0063 SOF_EXT_MAN_ELEM_DBG_ABI = 4,
0064 SOF_EXT_MAN_ELEM_CONFIG_DATA = 5,
0065 SOF_EXT_MAN_ELEM_PLATFORM_CONFIG_DATA = 6,
0066 };
0067
0068
0069 struct sof_ext_man_elem_header {
0070 uint32_t type;
0071 uint32_t size;
0072
0073
0074 } __packed;
0075
0076
0077 struct sof_ext_man_fw_version {
0078 struct sof_ext_man_elem_header hdr;
0079
0080 struct sof_ipc_fw_version version;
0081 uint32_t flags;
0082 } __packed;
0083
0084
0085 struct sof_ext_man_window {
0086 struct sof_ext_man_elem_header hdr;
0087
0088 struct sof_ipc_window ipc_window;
0089 } __packed;
0090
0091
0092 struct sof_ext_man_cc_version {
0093 struct sof_ext_man_elem_header hdr;
0094
0095 struct sof_ipc_cc_version cc_version;
0096 } __packed;
0097
0098 struct ext_man_dbg_abi {
0099 struct sof_ext_man_elem_header hdr;
0100
0101 struct sof_ipc_user_abi_version dbg_abi;
0102 } __packed;
0103
0104
0105 enum config_elem_type {
0106 SOF_EXT_MAN_CONFIG_EMPTY = 0,
0107 SOF_EXT_MAN_CONFIG_IPC_MSG_SIZE = 1,
0108 SOF_EXT_MAN_CONFIG_MEMORY_USAGE_SCAN = 2,
0109 };
0110
0111 struct sof_config_elem {
0112 uint32_t token;
0113 uint32_t value;
0114 } __packed;
0115
0116
0117 struct sof_ext_man_config_data {
0118 struct sof_ext_man_elem_header hdr;
0119
0120 struct sof_config_elem elems[];
0121 } __packed;
0122
0123 #endif