Skip to content

Conversation

@pillo79
Copy link
Contributor

@pillo79 pillo79 commented Feb 24, 2025

Same contents of #9831, but with an extra commit that sets 'volume' as an llext.
This ensures the restored detached section check in the latest push (c449256) works as expected.

llext_manager_link() is only interested in the 'llext_loader' part of
the 'llext_buf_loader' structure. This patch refactors the code to pass
a pointer to the llext_loader directly, making the code more readable.

In preparation for the new inspection API, this patch also changes the
checks for the buildinfo and mod_manifest pointers to be more explicit.

No functional change is intended.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
For inspection API to work, it is imperative to keep the LLEXT loader
object available. This patch adds a pointer to the full loader object
in the lib_manager_module structure. The loader object is allocated
once and never freed.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
This patch converts the llext_manager to use the new LLEXT inspection
API. The new API allows to get information about sections and regions
without the need to access the internal structures of the LLEXT loader,
decoupling SOF and LLEXT code and making it easier to maintain.

NOTE: Once loaded the first time, the extensions are never unloaded, so
the inspection data is also never freed. If this behavior needs to be
modified to allow extensions to be fully removed from memory, the
inspection data in the loader must be freed as well by calling the
llext_free_inspection_data() function before the final llext_unload().

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
Build 'volume' as a module to test the new API on an extension with
detached sections.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
@pillo79 pillo79 added the DNM Do Not Merge tag label Feb 24, 2025
@pillo79
Copy link
Contributor Author

pillo79 commented Feb 24, 2025

SOFCI TEST

1 similar comment
@pillo79
Copy link
Contributor Author

pillo79 commented Feb 24, 2025

SOFCI TEST

@pillo79 pillo79 closed this Feb 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

DNM Do Not Merge tag

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant