Skip to content

Commit 79fe66d

Browse files
abonislawskilgirdwood
authored andcommitted
ext_manifest: add simple config data element with IPC_MSG_SIZE
To avoid lots of single value structures this will introduce config data element which will contain several simple token/value pairs At initial version it will contain IPC_MSG_SIZE elem which will inform kernel about maximum IPC msg size Signed-off-by: Adrian Bonislawski <adrian.bonislawski@linux.intel.com>
1 parent 12359ca commit 79fe66d

2 files changed

Lines changed: 29 additions & 0 deletions

File tree

src/include/kernel/ext_manifest.h

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,20 @@ enum ext_man_elem_type {
5151
EXT_MAN_ELEM_CC_VERSION = SOF_IPC_EXT_CC_INFO,
5252
EXT_MAN_ELEM_PROBE_INFO = SOF_IPC_EXT_PROBE_INFO,
5353
EXT_MAN_ELEM_DBG_ABI = SOF_IPC_EXT_USER_ABI_INFO,
54+
EXT_MAN_ELEM_CONFIG_DATA = 5,
5455
};
5556

57+
/* EXT_MAN_ELEM_CONFIG_DATA elements identificators */
58+
enum config_elem_type {
59+
EXT_MAN_CONFIG_IPC_MSG_SIZE = 1,
60+
EXT_MAN_CONFIG_LAST_ELEM, /**< keep it at the end of enum list */
61+
};
62+
63+
struct config_elem {
64+
uint32_t token;
65+
uint32_t value;
66+
} __packed;
67+
5668
/* FW version */
5769
struct ext_man_fw_version {
5870
struct ext_man_elem_header hdr;
@@ -87,4 +99,11 @@ struct ext_man_dbg_abi {
8799
struct sof_ipc_user_abi_version dbg_abi;
88100
} __packed;
89101

102+
/* EXT_MAN_ELEM_CONFIG_DATA elements */
103+
struct ext_man_config_data {
104+
struct ext_man_elem_header hdr;
105+
106+
struct config_elem elems[EXT_MAN_CONFIG_LAST_ELEM];
107+
} __packed;
108+
90109
#endif /* __KERNEL_EXT_MANIFEST_H__ */

src/init/ext_manifest.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,3 +83,13 @@ const struct ext_man_dbg_abi ext_man_dbg_info
8383
.abi_dbg_version = SOF_ABI_DBG_VERSION,
8484
},
8585
};
86+
87+
const struct ext_man_config_data ext_man_config
88+
__aligned(EXT_MAN_ALIGN) __section(".fw_metadata") = {
89+
.hdr.type = EXT_MAN_ELEM_CONFIG_DATA,
90+
.hdr.elem_size = ALIGN_UP(sizeof(struct ext_man_config_data),
91+
EXT_MAN_ALIGN),
92+
.elems = {
93+
{EXT_MAN_CONFIG_IPC_MSG_SIZE, SOF_IPC_MSG_MAX_SIZE},
94+
},
95+
};

0 commit comments

Comments
 (0)