-
Notifications
You must be signed in to change notification settings - Fork 349
library manager: initial implementation #5796
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
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
6ebba7e to
f1d3cb9
Compare
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
f1d3cb9 to
5895bd4
Compare
|
SOFCI TEST |
5895bd4 to
16f135a
Compare
|
@lgirdwood yea... |
7d787e1 to
a601214
Compare
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>
a601214 to
3a68e90
Compare
|
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need braces here
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.
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