-
Notifications
You must be signed in to change notification settings - Fork 349
ipc4: add get &set large config support #4808
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
5fb7987 to
12e29dc
Compare
src/audio/CMakeLists.txt
Outdated
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.
Out of curiosity, what is basefw? Can you add some details in the commit message.
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.
sure. There are three types of elf binary in SOF: boot_loader, basefw (built from all sof entities selected in kconfig) and external libraries (developed by 3rd party, may be close source). Rimage packs boot_loader and basefw into sof-xxx.ri
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.
ABI needs packed and aligned. Open on the data whether it's manifest or not ?
src/audio/base_fw.c
Outdated
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.
Is this part of the extended manifest ?
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.
no, it is part of base fw.
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.
the comments for IPC4_MEMORY_RECLAIMED_FW_CFG is "Indicates whether legacy DMA memory is managed by FW". A little confusing. In my opinion, the legacy DMA should be GPDMA on BDW and BYT to transfer data between host and dsp.
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.
I also checked other items and manifest. these items are not included by manifest.
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.
ok, so it's sent to host upon boot ? This is probably not a good use of memory, but this can be optimised via ipc tuples later on.
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.
yes, host query these values upon boot. Some items are read from hw registers, so we can't set them in manifest. We can store these tuples in dynamic memory and free it when get function return since get function is a low-frequency case.
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.
ok, this should be in short term.
12e29dc to
9db3b8a
Compare
9db3b8a to
a39ea2e
Compare
src/audio/base_fw.c
Outdated
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.
ok, so it's sent to host upon boot ? This is probably not a good use of memory, but this can be optimised via ipc tuples later on.
672ff94 to
e7dcaf8
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.
All the IPC ABI structs need to be packed and aligned of 4 bytes.
e7dcaf8 to
540b3d0
Compare
|
thanks, updated |
src/include/ipc4/module.h
Outdated
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.
bitfields in IPC definition, who thought that was a good idea? Not portable!
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.
agree, however we have already stated this is not portable. We can address this with ipc-tuples in the future.
4faab3c to
e71e88e
Compare
The module id of basefw is zero. Driver get & set global states by this id, such as platform info, memory inf, hw info, power info. There are three types of elf binary built by SOF: boot_loader, basefw which is built from all sof entities selected in kconfig and external libraries developed by 3rd party and may be close-source. Rimage packs boot_loader and basefw into sof-xxx.ri. This patch adds limited support of features in basefw module and more features will be added in future. Signed-off-by: Rander Wang <rander.wang@intel.com>
|
updated, thanks! |
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.
I think we just need that comments for the error flow and a statement about the portability of the bitfields (if not already in the header)
e71e88e to
c063dc9
Compare
|
updated, thanks! |
Get_large_config is used for driver to query module information and set_large_config is used to change module config dynamically Signed-off-by: Rander Wang <rander.wang@intel.com>
Ipc4 checks manifest in fw binary, so it needs to use header files in rimage Signed-off-by: Rander Wang <rander.wang@intel.com>
|
BYT test looks like script failure, but unrelated to this PR. |
|
|
||
| /* skip basefw of module 0 in manifest */ | ||
| mod = (struct sof_man_module *)((char *)desc + SOF_MAN_MODULE_OFFSET(module_id)); | ||
| mod = (struct sof_man_module *)((char *)desc + SOF_MAN_MODULE_OFFSET(entry_index)); |
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.
Will IPC4 ever be used with Zephyr? Zephyr CI does not have rimage right now.
Should these definitions be copied to src/platform/intel/cavs/include/cavs/ext_manifest.h ?
Will the kernel too? Are they part of the IPC?
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.
IPC4 is not used by Zephyr currently. They are part of manifest in FW image in memory, not ext manifest.
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.
Thanks @ranj063 for answering my question offline. IPC4 will be the default for some future platforms Zephyr or not. Zephyr has no effect on that decision / timeline. This means SOF will have a harder dependency on rimage than now and it will have to be mirrored by Zephyr. Right now only the main SOF ELF file does not depend on it, only the boot_module and base_module builds depend on rimage.
If rimage becomes a harder SOF dependency then it means sof/src/include/kernel/ext_manifest.h can probably be deleted at that time?
cc: @dbaluta
The module id of basefw is zero. Driver get & set global
states by this id, such as platform info, memory inf, hw
info, power info.
This patch add limited support of features in basefw module.
Signed-off-by: Rander Wang rander.wang@intel.com