-
Notifications
You must be signed in to change notification settings - Fork 322
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: libraries with multiple modules #9688
Draft
lyakh
wants to merge
14
commits into
thesofproject:main
Choose a base branch
from
lyakh:llext
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
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
Use section offset from the section header in llext_manager_load_data_from_storage() to simplify calculations and eliminate a function parameter. Signed-off-by: Guennadi Liakhovetski <[email protected]>
file_offset in struct lib_manager_segment_desc is unused, remove it. Signed-off-by: Guennadi Liakhovetski <[email protected]>
We don't need to store .bss address and size until the module is freed since .bss is allocated together with .data and we only need its size when initialising it, not when freeing module memory. Remove it to save memory. Signed-off-by: Guennadi Liakhovetski <[email protected]>
Split man_get_module_manifest() into two functions in preparation for multi-part relocatable module library support. Signed-off-by: Guennadi Liakhovetski <[email protected]>
The second preparatory step for multi-part relocatable module libraries. Signed-off-by: Guennadi Liakhovetski <[email protected]>
free(NULL) is allowed, remove redundant checks. Signed-off-by: Guennadi Liakhovetski <[email protected]>
Rimage generates an image from multiple input modules. However, in case of building libraries from multiple relocatable ELF files it doesn't currently construct manifest correctly. It mixes up manifest provided in TOML with manifest structures in ".module" sections of modules. Clean this up to only use manifests from ELF and append configuration from TOML. Signed-off-by: Guennadi Liakhovetski <[email protected]>
Remove unused arguments from llext_manager_load_module(), llext_manager_unload_module() and llext_manager_link(). Signed-off-by: Guennadi Liakhovetski <[email protected]>
Run-time loadable SOF libraries can contain multiple modules. To prepare to support them add a module context type. Signed-off-by: Guennadi Liakhovetski <[email protected]>
Zephyr logging prints function names, no need to include them explicitly. Signed-off-by: Guennadi Liakhovetski <[email protected]>
NULL checking should be done before dereferencing, not after. Also rearrange varoable definition in llext_manager_allocate_module() to make it more logical. Signed-off-by: Guennadi Liakhovetski <[email protected]>
llext_manager_allocate_module() should return 0 when failing, not an error code. Signed-off-by: Guennadi Liakhovetski <[email protected]>
Loadable libraries can contain multiple modules, where each module can contain multiple manifest entries, e.g. when providing multiple Module Adapter drivers. This commit adds support for such libraries, built by specifying all the modules on rimage command line. Signed-off-by: Guennadi Liakhovetski <[email protected]>
mux.toml doesn't have a demux entry in it, therefore we cannot have one in .module either, remove it until fixed. Also fix a copy-paste error in the same code block. Signed-off-by: Guennadi Liakhovetski <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Add support for libraries with multiple modules. This handles loading of libraries. Creation will be added later, isn't too complex, needs minor additions to cmake and Python.