Skip to content
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

[DNM][Do Not Review][Demo Only] LMDK 006 demo #8296

Closed
wants to merge 14 commits into from

Conversation

lyakh
Copy link
Collaborator

@lyakh lyakh commented Oct 6, 2023

This is only a partial demonstration of the "development kit" loadable module approach, ported on top of mtl-007-drop-stable. The example smart-amp-test, built from the lmdk/ directory can be loaded, it initialises, but further behaviour breaks either during preparation or when copying. A possible reason would be some further headers that need to be updated. Frequently changing headers make maintaining the "development kit" difficult and absence of logging from the modules make debugging complicated

lyakh and others added 14 commits October 6, 2023 16:47
This reverts commit 45c9f2f. It
interferes with the pointer-style loadable module infrastructure.

Signed-off-by: Guennadi Liakhovetski <[email protected]>
[[ [TEST VERSION] duplicated include/ files will be removed on upstream ]]

This will add module example lib with up down mixer module
as a simple example

Signed-off-by: Adrian Bonislawski <[email protected]>
Co-authored-by: Dobrowolski, PawelX <[email protected]>
It now compiles but still doesn't link because of multiple missing
symbols.

Signed-off-by: Guennadi Liakhovetski <[email protected]>
Now only gcd(), comp_verify_params() and data blob functions are
still missing.

Signed-off-by: Guennadi Liakhovetski <[email protected]>
Add the missing methods to build the smart-amp loadable module test.

Signed-off-by: Guennadi Liakhovetski <[email protected]>
This now compiles, but will probably crash because of a wrong
.process*() method.

Signed-off-by: Guennadi Liakhovetski <[email protected]>
To test smart-amp-test as a loadable module it shouldn't be built
into the firmware image.

Signed-off-by: Guennadi Liakhovetski <[email protected]>
struct comp_ipc_config now has an additional member:
uint32_t proc_domain

Signed-off-by: Guennadi Liakhovetski <[email protected]>
Loadable modules are linked, using a linked script, built by a cmake
script. That linker script includes multiple existing linker script
fragments. Each of those fragments defines 1 or more sections and
respective PHDRs. However, some of those scripts, e.g.
common_rodata_linker_script.txt and data_linker_script.txt add
sections to the same rodata_phdr PHDR. This makes the linker
allocate sections in that PHDR twice in the resulting output file:
one copy is real and the other one is filled with zeros. Removing
one of the PHDR definitions solves the problem and removes about
60KiB of empty space from the output file.

Signed-off-by: Guennadi Liakhovetski <[email protected]>
The module-adapter API has 3 processing modes: raw, stream and
source-sink, and until now only one of them can be implemented by any
module. However, the "modules" module, that loads loadable modules,
has to implement all of them to be prepared to handle any loadable
modules. This adds support for such modules.

Signed-off-by: Guennadi Liakhovetski <[email protected]>
The loadable module API needs to support all module-adapter methods,
add all the missing ones.

Signed-off-by: Guennadi Liakhovetski <[email protected]>
Update headers and prototypes to the current tip of the
mtl-006-drop-stable branch.

Signed-off-by: Guennadi Liakhovetski <[email protected]>
Loadable modules use the system service pointer to call exported base
firmware methods.

Signed-off-by: Guennadi Liakhovetski <[email protected]>
@lgirdwood
Copy link
Member

@RDharageswari @mengdonglin @aiChaoSONG fyi.
@pjdobrowolski fyi - we are not yet sure why we have breakage here at runtime. Can you confirm mixin is working correctly with the copied headers or are we missing some recent patches ?

@lgirdwood
Copy link
Member

@mwasko fyi

@lyakh lyakh closed this Jan 17, 2024
@lyakh lyakh deleted the lmdk-006-demo branch January 17, 2024 09:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants