thesofproject / rimage

DSP firmware image creation and signing tool
Other
7 stars 62 forks source link

loadable module: define a new bit in fw_image_flags #191

Closed RanderWang closed 11 months ago

RanderWang commented 11 months ago

The bit 4 is set to force driver reload library on d3 exit.

It is a prototype for validation with mtl-006 branch so I use hard core. We need to add a new feature that toml can decode macro definition like fw_image_flag = BASE_FW | RELOAD_LIBRARY

Kernel PR https://github.com/thesofproject/linux/pull/4669 depends on this rimage update.

RanderWang commented 11 months ago

add more comments

lgirdwood commented 11 months ago

Adding @mmaka1 and @mwasko for review

mmaka1 commented 11 months ago

The ability to survive D3 is the property of FW, not the FW image binary (a file). It is known at the FW build time, therefore adding it to the binaries making this information instantly available to the driver looks like a good idea. But then it should be added consistently to all the binaries, otherwise it might be interpreted like a different behavior of individual binaries (base_fw/libs) while this defines a behavior of the FW related to all loaded binaries. So, it requires extra maintenance and looking from this perspective, adding this property to the IPC4 FW_CONFIG parameter of the Base FW looks like a simpler solution to maintain (adding more overhead at the run-time though) unless we agree to (a) develop an asymmetric Extended Manifest containing properties valid for the Base FW only or (b) agree that extra maintenance costs are OK or (c) agree that the flag is valid in case of the base_fw binary only and extra "if" in the driver's code is OK.

marc-hb commented 11 months ago

Sorry for adding another twist to an already complex topic but... why is this submitted directly to mtl-006-drop-stable? Shouldn't complex and long term design questions like this be debated and more importantly tested on the main development branch first before going to a maintenance branch?

Also, there is now a single git repo on the main branch which makes everything more direct, faster and easier to test (then later cherry-pick code already tested well to separate git repos)

RanderWang commented 11 months ago

no need