-
Notifications
You must be signed in to change notification settings - Fork 327
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LLEXT multiple modules #9090
Merged
+299
−154
Merged
LLEXT multiple modules #9090
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
aa998a1
compile: replace 'typeof' with '__typeof__' globally
lyakh 3358827
llext: add and use macros for easier LLEXT conversion
lyakh 0283582
llext: update to use add_llext_target()
lyakh 8b9803c
build: remove a redundant call to 'str()'
lyakh d2cfe1c
mixin-mixout: make modular
lyakh df5392b
eq-iir: convert to a loadable module
lyakh e8bb27d
llext: add missing symbol exports
lyakh 51740df
lib_manager: fix a memory leak
lyakh cb5693f
llext: add support for files with multiple modules
lyakh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
CONFIG_SAMPLE_SMART_AMP=m | ||
CONFIG_COMP_MIXIN_MIXOUT=m | ||
CONFIG_COMP_IIR=m |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Copyright (c) 2024 Intel Corporation. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm assuming this file will be shrunk/replaced when Zephyr llext cmake helpers are used ? |
||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
# Hard-coded .text address to be moved to a common place | ||
sof_llext_build("eq_iir" | ||
SOURCES ../eq_iir.c | ||
../eq_iir_ipc4.c | ||
../eq_iir_generic.c | ||
TEXT_ADDR 0xa06ea000 | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#include <tools/rimage/config/platform.toml> | ||
#define LOAD_TYPE "2" | ||
#include "../eq_iir.toml" | ||
|
||
[module] | ||
count = __COUNTER__ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Copyright (c) 2024 Intel Corporation. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
# Hard-coded .text address to be moved to a common place | ||
sof_llext_build("mixin_mixout" | ||
SOURCES ../mixin_mixout.c | ||
../mixin_mixout_hifi3.c | ||
../mixin_mixout_hifi5.c | ||
../mixin_mixout_generic.c | ||
TEXT_ADDR 0xa06aa000 | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#include <tools/rimage/config/platform.toml> | ||
#define LOAD_TYPE "2" | ||
#include "../mixin_mixout.toml" | ||
|
||
[module] | ||
count = __COUNTER__ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/* SPDX-License-Identifier: BSD-3-Clause */ | ||
/* | ||
* Copyright(c) 2024 Intel Corporation. All rights reserved. | ||
*/ | ||
|
||
#ifndef MODULE_LLEXT_H | ||
#define MODULE_LLEXT_H | ||
|
||
#define SOF_LLEXT_MODULE_MANIFEST(manifest_name, entry, affinity, mod_uuid) \ | ||
{ \ | ||
.module = { \ | ||
.name = manifest_name, \ | ||
.uuid = {mod_uuid}, \ | ||
.entry_point = (uint32_t)(entry), \ | ||
.type = { \ | ||
.load_type = SOF_MAN_MOD_TYPE_LLEXT, \ | ||
.domain_ll = 1, \ | ||
}, \ | ||
.affinity_mask = (affinity), \ | ||
} \ | ||
} | ||
|
||
#define SOF_LLEXT_MOD_ENTRY(name, interface) \ | ||
static const struct module_interface *name##_llext_entry(void *mod_cfg, \ | ||
void *parent_ppl, void **mod_ptr) \ | ||
{ \ | ||
return interface; \ | ||
} | ||
|
||
#define SOF_LLEXT_BUILDINFO \ | ||
static const struct sof_module_api_build_info buildinfo __section(".mod_buildinfo") __used = { \ | ||
.format = SOF_MODULE_API_BUILD_INFO_FORMAT, \ | ||
.api_version_number.full = SOF_MODULE_API_CURRENT_VERSION, \ | ||
} | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Err... no, please don't go from
.llext
to.ri
and then BACK to.llext
where each step is a different file type; this is incredibly confusing!One suggestion:
.llext
because that's what comes from Zephyr so you don't have a choice?.ri0
because that's the first rimage stage. Similar tozephyr_pre0
.ri
or.llext.ri
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@marc-hb yeah, .llext -> something else -> .llext is ugly, I agree. There was a wish to have .llext as the final suffix, but now with the use of Zephyr cmake .llext comes out of those functions. Maybe yes -
.llext.ri
would be a good option for the final output