library manager: initial implementation#5796
Conversation
|
Can one of the admins verify this patch?
|
|
test this please |
|
Can one of the admins verify this patch? |
|
test this please |
|
@pjdobrowolski pls check your inbox, invite sent to autorun the CI. |
5971bea to
24832db
Compare
lgirdwood
left a comment
There was a problem hiding this comment.
Some questions
- How are we testing this today ? and how should we test in CI
- Does this version support the dynamic linking or just the dynamic loading today ?
ea4d814 to
8865e18
Compare
|
@pjdobrowolski @lgirdwood aside from having this quick merged what stops us from implementing this feature in zephyr? |
8865e18 to
2c72666
Compare
|
Most checkpatch warnings at https://sof-ci.01.org/sofpr/PR5796/build327/checkpatch/ seem valid (and easy to fix) |
This PR is only small part responsible for loading library binary. More changes are required to have something testable.
We support now dynamic loading of library containing 3rd party module binary. Currently available libraries in IADK (Windows close source FW) are not supporting dynamic linking, however it could be supported in the future. |
marc-hb
left a comment
There was a problem hiding this comment.
More changes are required to have something testable.
Maybe that's why it's still a draft?
ccec0d4 to
e440d45
Compare
e440d45 to
377bee8
Compare
|
@jxstelter fyi since @pjdobrowolski is out. |
ujfalusi
left a comment
There was a problem hiding this comment.
@pjdobrowolski, do you have any library I can try to load with my Linux side PR (thesofproject/linux#3826)?
You can build one yourself using https://github.com/thesofproject/converged-sof-modules FYI: I came back from 2 week long sick leave and you guys flooded me with changes which should be requested almost 2 months ago. @dbaluta @ujfalusi @lgirdwood @lyakh I understand that next few days I will spend on resolving that requests. And I thought that sinusitis was bad... |
@pjdobrowolski don't worry you will get used with us ;). glad that you are better now. In order to get your patches faster accepted open source community has some guidelines:
I will be on vacation until next week so you I'm off your back for a while :). But I'll be back. |
|
rerun CI, license server |
|
SOFCI TEST |
|
@dbaluta Are there any guidelines like that for reviewers or just "hit and run"? |
|
@pjdobrowolski can you force push again, I've just merged the build fix for IPC4 and newer CC. Thanks |
|
SOFCI TEST |
There was a problem hiding this comment.
your .lib_notif_pool is somewhat... unusual. Usually you'd just have a list head in the higher level object (in ext_lib in this case) to which you then link elements as you allocate them. Instead you have a pointer to lib_notif_pool there and once you allocate the first element and attach it there, you then link further allocated elements to the first one. That makes the list head instance in that object both - a list head and a list element. list_empty() now means not 0 elements, but 1... All that can be made to work of course but just is a bit unusual and one has to remember about this when working with this code.
There was a problem hiding this comment.
So what would you suggest. That might be refactored for sure but I think that main goal is to port that feature from legacy and integrate. Many mechanisms used here are borrowed from older firmware and for sure they can be improved. We can do that later if it isn't so wrong.
|
SOFCI TEST |
|
@lgirdwood yea... |
Library manager is part of loading external libraries responsible of handling data and placing it in proper order and places. This feature is using module adapter API for loadable native and external libraries. After receiving IPC4 load library command - reads manifest - after module_id choses module to load and verify it (WIP) - loads manifest - allocs proper memory size - transfer module from external MEMORY to HPSRAM (WIP) Signed-off-by: Stelter, Jaroslaw <jaroslaw.stelter@intel.com> Signed-off-by: Dobrowolski, PawelX <pawelx.dobrowolski@intel.com>
Commit adds ipc which contains information need to load external libraries from HOST and required actions to make it possible using library manager functionality. Signed-off-by: Stelter, Jaroslaw <jaroslaw.stelter@intel.com> Signed-off-by: Dobrowolski, PawelX <pawelx.dobrowolski@intel.com>
Adding function responsible for loading library action after IPC4 message. Signed-off-by: Stelter, Jaroslaw <jaroslaw.stelter@intel.com> Signed-off-by: Dobrowolski, PawelX <pawelx.dobrowolski@intel.com>
Adding for ipc4_get_comp_drv check if module is loadable and for active library manager functionality register it dynamically. Signed-off-by: Stelter, Jaroslaw <jaroslaw.stelter@intel.com> Signed-off-by: Dobrowolski, PawelX <pawelx.dobrowolski@intel.com>
…red. System service functionality used by 3rd party modules expects that IPC data buffer will be filled with data during notification preparation. To avoid additional data copy, provide message buffer directly to module. This requires that ipc_msg_send() function will not fail if source data pointer will be equal to destination one. Signed-off-by: Stelter, Jaroslaw <jaroslaw.stelter@intel.com> Signed-off-by: Dobrowolski, PawelX <pawelx.dobrowolski@intel.com>
|
rebased, resolved, ready to merge? |
Good to merge as soon as CI finishes. |
|
SOFCI TEST |
| msg = ipc_msg_init(header, SRAM_OUTBOX_SIZE); | ||
| if (!msg) | ||
| rfree(msg_pool_elem); | ||
| return NULL; |
There was a problem hiding this comment.
So reopen PR and will fix it.
Library manager is part of loading external libraries responsible of
handling data and placing it in proper order and places.
After receiving IPC4 load library command
Signed-off-by: Stelter, Jaroslaw jaroslaw.stelter@intel.com
Signed-off-by: Dobrowolski, PawelX pawelx.dobrowolski@intel.com