Skip to content

Commit b08d0b1

Browse files
Jyri Sarhalgirdwood
authored andcommitted
ipc4: Extend struct ipc4_module_init_ext_init with object array
Adds definition, enums, and bits for adding array of struct ipc4_module_init_ext_object:s with associated data to struct ipc4_module_init_ext_init payload. Also adds struct ipc4_module_init_ext_obj_dp_data as an object to be sent as an object in the array. Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
1 parent ee58c00 commit b08d0b1

1 file changed

Lines changed: 24 additions & 1 deletion

File tree

src/include/ipc4/module.h

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,28 @@ struct ipc4_vendor_error {
7373
uint32_t err_code;
7474
};
7575

76+
/* IDs for all global object types in struct ipc4_module_init_ext_object */
77+
enum ipc4_mod_init_data_glb_id {
78+
IPC4_MOD_INIT_DATA_ID_INVALID = 0,
79+
IPC4_MOD_INIT_DATA_ID_DP_DATA = 1,
80+
IPC4_MOD_INIT_DATA_ID_MAX = IPC4_MOD_INIT_DATA_ID_DP_DATA,
81+
};
82+
83+
/* data object for vendor bespoke data with ABI growth and backwards compat */
84+
struct ipc4_module_init_ext_object {
85+
uint32_t last_object : 1; /* object is last in array if 1 else object follows. */
86+
uint32_t object_id : 15; /* unique ID for this object or globally */
87+
uint32_t object_words : 16; /* size in dwords (excluding this structure) */
88+
} __attribute__((packed, aligned(4)));
89+
/* the object data will be placed in memory here and will have size "object_words" */
90+
91+
/* Ext init array data object for Data Processing module memory requirements */
92+
struct ipc4_module_init_ext_obj_dp_data {
93+
uint32_t domain_id; /* userspace domain ID */
94+
uint32_t stack_bytes; /* required stack size in bytes, 0 means default size */
95+
uint32_t heap_bytes; /* required heap size in bytes, 0 means default size */
96+
} __attribute__((packed, aligned(4)));
97+
7698
/*
7799
* Host Driver sends this message to create a new module instance.
78100
*/
@@ -83,7 +105,8 @@ struct ipc4_module_init_ext_init {
83105
/**< Indicates that GNA is used by a module and additional information */
84106
/* (gna_config) is passed after ExtendedData. */
85107
uint32_t gna_used : 1;
86-
uint32_t rsvd_0 : 30;
108+
uint32_t data_obj_array : 1; /* struct ipc4_module_init_ext_object data */
109+
uint32_t rsvd_0 : 29;
87110
uint32_t rsvd_1[2];
88111
} __attribute__((packed, aligned(4)));
89112

0 commit comments

Comments
 (0)