Skip to content

Conversation

@softwarecki
Copy link
Collaborator

@softwarecki softwarecki commented Sep 5, 2025

Update sof_man_module_type to match the layout defined in the reference firmware. This includes reordering and extending the structure with new fields such as domain_rtos, core_type, user_mode, large_param, and stack_on_bss.

The previously added init_config field (15ea481 thesofproject/rimage#130), which had been added earlier using reserved bits has been moved to the end of the structure to avoid layout conflicts and maintain compatibility with the reference FW.

This change is required for ABI alignment but will cause CI failures due to the need for a software rebuild.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the sof_man_module_type structure in the rimage manifest to align with the reference firmware layout by adding new bit fields and reordering existing ones.

  • Adds new bit fields: domain_rtos, core_type, user_mode, large_param, and stack_on_bss
  • Moves the previously added init_config field to the end of the structure
  • Adjusts reserved bits to maintain proper structure alignment

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

uint32_t large_param:1;
uint32_t stack_on_bss:1;
uint32_t rsvd_:9;
uint32_t init_config:4; /* SOF_MAN_MOD_INIT_CONFIG_ */
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kv2019i could you please check if we can move init_config? Looks like huge ABI change

Copy link
Collaborator

@kv2019i kv2019i left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The interface cannot be changed without breaking existing systems. Please see inline

uint32_t large_param:1;
uint32_t stack_on_bss:1;
uint32_t rsvd_:9;
uint32_t init_config:4; /* SOF_MAN_MOD_INIT_CONFIG_ */
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm afraid this is too late. We have already upstreamed the module type definition to Linux upstream and we cannot change this now without breaking end-user systems. FYI @abonislawski @lgirdwood @ujfalusi

Options, 1) change non-SOF implementation, or 2) sync up in a later generation (i.e. branch the definition for a future generation).

In Linux, the old definition is used in linux/sound/soc/sof/ipc4-topology.h

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@softwarecki we've got the 20 reserved bits which come after the init_config in upstream version, we need to add the new fields into reserved only (and not move the init_config). This should keep us ABI compatible for a long time.

Copy link
Member

@lgirdwood lgirdwood left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs to extend the ABI only and not break compatibility.

uint32_t large_param:1;
uint32_t stack_on_bss:1;
uint32_t rsvd_:9;
uint32_t init_config:4; /* SOF_MAN_MOD_INIT_CONFIG_ */
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@softwarecki we've got the 20 reserved bits which come after the init_config in upstream version, we need to add the new fields into reserved only (and not move the init_config). This should keep us ABI compatible for a long time.

The reference FW added some new definitions to manifest
man_module_type structure. The SOF version must be updated to
synchronize with reference FW definitions.

Added fields:
- domain_rtos - indicates whether a module can be executed in RTOS
scheduling domain;
- core_type - LX7 HiFi4, Fusion etc.
- user_mode - module executed in non-priviledged mode
- large_param - IPC supports parameters above 4kB
- stack_on_bss - allocate DP task stack in module bss section

Signed-off-by: Jaroslaw Stelter <[email protected]>
Copy link
Collaborator

@kv2019i kv2019i left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this will work with current Linux kernel driver.

@lgirdwood lgirdwood merged commit f485d27 into thesofproject:main Sep 9, 2025
39 of 47 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants