sof icon indicating copy to clipboard operation
sof copied to clipboard

library manager: initial implementation

Open pjdobrowolski opened this issue 3 years ago • 34 comments

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

  • reads manifest
  • after module_id choses module to load and verify it (WIP)
  • loads manifest
  • allocs propper memory size
  • transfer module from IMR to HPSRAM (WIP)

Signed-off-by: Stelter, Jaroslaw [email protected] Signed-off-by: Dobrowolski, PawelX [email protected]

pjdobrowolski avatar May 10 '22 10:05 pjdobrowolski

Can one of the admins verify this patch?

reply test this please to run this test once

sofci avatar May 10 '22 10:05 sofci

test this please

pjdobrowolski avatar May 10 '22 10:05 pjdobrowolski

Can one of the admins verify this patch?

gkbldcig avatar May 10 '22 11:05 gkbldcig

test this please

marc-hb avatar May 10 '22 19:05 marc-hb

@pjdobrowolski pls check your inbox, invite sent to autorun the CI.

lgirdwood avatar May 11 '22 13:05 lgirdwood

@pjdobrowolski @lgirdwood aside from having this quick merged what stops us from implementing this feature in zephyr?

dbaluta avatar May 11 '22 14:05 dbaluta

Most checkpatch warnings at https://sof-ci.01.org/sofpr/PR5796/build327/checkpatch/ seem valid (and easy to fix)

marc-hb avatar May 11 '22 17:05 marc-hb

Some questions

  1. How are we testing this today ? and how should we test in CI

This PR is only small part responsible for loading library binary. More changes are required to have something testable.

  1. Does this version support the dynamic linking or just the dynamic loading today ?

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.

jxstelter avatar May 12 '22 07:05 jxstelter

@pjdobrowolski is this really draft PR ? i.e untested and WIP ?

lgirdwood avatar May 20 '22 06:05 lgirdwood

@pjdobrowolski is this really draft PR ? i.e untested and WIP ? @lgirdwood yes, indeed it is a draft PR. However it is tested on architectural level still WIP because of i.e. lack memory management features.

pjdobrowolski avatar May 20 '22 07:05 pjdobrowolski

Unrelated BYT failures in https://sof-ci.01.org/sofpr/PR5796/build476/devicetest/ should be addressed by fresh sof-test PR

  • https://github.com/thesofproject/sof-test/pull/911

Sorry for the inconvenience.

marc-hb avatar May 25 '22 17:05 marc-hb

@pjdobrowolski ready for more review yet or still WIP ?

lgirdwood avatar Jun 07 '22 21:06 lgirdwood

@pjdobrowolski ready for more review yet or still WIP ?

I'm open for any review. It is still WIP though.

pjdobrowolski avatar Jun 08 '22 08:06 pjdobrowolski

@pjdobrowolski can you check CI, seeing lots of red.

lgirdwood avatar Jul 07 '22 11:07 lgirdwood

@pjdobrowolski can you rebase, this will unblock the CI. Thanks !

lgirdwood avatar Jul 18 '22 16:07 lgirdwood

SOFCI TEST

keqiaozhang avatar Jul 21 '22 07:07 keqiaozhang

@pjdobrowolski are all review comments resolved now or just an intermediate push for testing ?

lgirdwood avatar Jul 21 '22 12:07 lgirdwood

@lgirdwood Lets say that all review comments are resolved.

pjdobrowolski avatar Jul 21 '22 12:07 pjdobrowolski

@lgirdwood I've done that, not all conversations were valid and caused some compilator errors. I've added trace as you suggested and rebased to upstream.

pjdobrowolski avatar Jul 26 '22 14:07 pjdobrowolski

SOFCI TEST

keqiaozhang avatar Jul 27 '22 01:07 keqiaozhang

@pjdobrowolski could you take a quick look at the CI, not sure why build would only fail for TGL (unless license server issue). @wszypelt fyi - may need to restart/check CI.

lgirdwood avatar Jul 27 '22 22:07 lgirdwood

SOFCI TEST

lgirdwood avatar Aug 01 '22 11:08 lgirdwood

@pjdobrowolski pls check CI again in a few hours, not expecting a TGL build failure but pls do fix if it comes back.

lgirdwood avatar Aug 01 '22 11:08 lgirdwood

@pjdobrowolski pls check CI again in a few hours, not expecting a TGL build failure but pls do fix if it comes back.

Please ignore me @pjdobrowolski - it seems CI is down for maintenance today. We can rerun tomorrow.

lgirdwood avatar Aug 01 '22 13:08 lgirdwood

@lgirdwood I've to explain myself. Library manager might need slight refactor because of last changes to comp_drv. I'm checking it right now. So be patient I'm eager to finally marge it also.

pjdobrowolski avatar Aug 01 '22 14:08 pjdobrowolski

@ranj063 I have a question about &md->cfg , from where comes configuration? Where is data from module init instance?

pjdobrowolski avatar Aug 02 '22 16:08 pjdobrowolski

@ranj063 I have a question about &md->cfg , from where comes configuration? Where is data from module init instance?

@pjdobrowolski Fwiw, @ranj063 is out. I will try and answer (although you may need to dig) - this should mostly come from topology (via IPC) although some data may also come from set_large_config() after the module has been created. No config should be hard coded.

lgirdwood avatar Aug 03 '22 09:08 lgirdwood

@lgirdwood I agree, mod_cfg should come from ipc4, and be stored for specific module. If I understand, now we are using mod_cfg from mailbox which is not copied to any other temporary buffer and can be overwritten by upcoming ipc. Before https://github.com/thesofproject/sof/pull/5994 space for mod_cfg was reserved for each module and that method was common for ipc3 and ipc4.

pjdobrowolski avatar Aug 03 '22 09:08 pjdobrowolski

SOFCI TEST

XiaoyunWu6666 avatar Aug 12 '22 10:08 XiaoyunWu6666

@lgirdwood I've resolved all issues. I think that it is ready to merge.

pjdobrowolski avatar Aug 16 '22 09:08 pjdobrowolski