Skip to content

Commit c51277d

Browse files
committed
manifest: rimage: llext: Add user_mode param to SOF_LLEXT_MODULE_MANIFEST
Extend the SOF_LLEXT_MODULE_MANIFEST macro with an optional variadic parameter to specify the user_mode flag for llext modules. When the argument is omitted, user_mode defaults to 0, preserving backward compatibility with existing module manifests. Update the rimage to propagate the user_mode field from the module manifest to manifest structure in the final firmware binary image. Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
1 parent a32d983 commit c51277d

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

src/include/module/module/llext.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#ifndef MODULE_LLEXT_H
77
#define MODULE_LLEXT_H
88

9-
#define SOF_LLEXT_MODULE_MANIFEST(manifest_name, entry, affinity, mod_uuid, instances) \
9+
#define SOF_LLEXT_MODULE_MANIFEST(manifest_name, entry, affinity, mod_uuid, instances, ...) \
1010
{ \
1111
.module = { \
1212
.name = manifest_name, \
@@ -16,6 +16,8 @@
1616
.type = { \
1717
.load_type = SOF_MAN_MOD_TYPE_LLEXT, \
1818
.domain_ll = 1, \
19+
.user_mode = COND_CODE_0(NUM_VA_ARGS_LESS_1(_, ##__VA_ARGS__), (0), \
20+
(GET_ARG_N(1, __VA_ARGS__))), \
1921
}, \
2022
.affinity_mask = (affinity), \
2123
} \

tools/rimage/src/manifest.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,7 @@ static void man_get_section_manifest(struct image *image,
212212
man_module->type.domain_dp = sof_mod->module.type.domain_dp;
213213
man_module->type.domain_ll = sof_mod->module.type.domain_ll;
214214
man_module->type.load_type = sof_mod->module.type.load_type;
215+
man_module->type.user_mode = sof_mod->module.type.user_mode;
215216

216217
/* text segment */
217218
segment = &man_module->segment[SOF_MAN_SEGMENT_TEXT];

0 commit comments

Comments
 (0)