Skip to content

Commit 4a31c58

Browse files
committed
llext: add auxiliary library type
Add a dedicated type for auxiliary LLEXT objects, not implementing the Module Adapter API. Signed-off-by: Guennadi Liakhovetski <[email protected]>
1 parent 5da2040 commit 4a31c58

File tree

3 files changed

+16
-2
lines changed

3 files changed

+16
-2
lines changed

src/include/module/module/llext.h

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
{ \
1111
.module = { \
1212
.name = manifest_name, \
13-
.uuid = {mod_uuid}, \
13+
.uuid = {mod_uuid}, \
1414
.entry_point = (uint32_t)(entry), \
1515
.instance_max_count = instances, \
1616
.type = { \
@@ -21,6 +21,18 @@
2121
} \
2222
}
2323

24+
#define SOF_LLEXT_AUX_MANIFEST(manifest_name, entry, mod_uuid) \
25+
{ \
26+
.module = { \
27+
.name = manifest_name, \
28+
.uuid = {mod_uuid}, \
29+
.entry_point = (uint32_t)(entry), \
30+
.type = { \
31+
.load_type = SOF_MAN_MOD_TYPE_LLEXT_AUX, \
32+
}, \
33+
} \
34+
}
35+
2436
#define SOF_LLEXT_MOD_ENTRY(name, interface) \
2537
static const struct module_interface *name##_llext_entry(void *mod_cfg, \
2638
void *parent_ppl, void **mod_ptr) \

src/include/sof/llext_manager.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ struct comp_ipc_config;
1818

1919
static inline bool module_is_llext(const struct sof_man_module *mod)
2020
{
21-
return mod->type.load_type == SOF_MAN_MOD_TYPE_LLEXT;
21+
return mod->type.load_type == SOF_MAN_MOD_TYPE_LLEXT ||
22+
mod->type.load_type == SOF_MAN_MOD_TYPE_LLEXT_AUX;
2223
}
2324

2425
uintptr_t llext_manager_allocate_module(struct processing_module *proc,

tools/rimage/src/include/rimage/sof/user/manifest.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
#define SOF_MAN_MOD_TYPE_BUILTIN 0
2727
#define SOF_MAN_MOD_TYPE_MODULE 1
2828
#define SOF_MAN_MOD_TYPE_LLEXT 2 /* Zephyr LLEXT-style dynamically linked */
29+
#define SOF_MAN_MOD_TYPE_LLEXT_AUX 3 /* Zephyr LLEXT-style dynamically linked auxiliary */
2930

3031
/* module init config */
3132
#define SOF_MAN_MOD_INIT_CONFIG_BASE_CFG 0 /* Base config only */

0 commit comments

Comments
 (0)