Skip to content
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

rimage: manifest: uuid: llext: Get loadable module UUID from uuid-registry and unify module manifest uuid type #9793

Merged
merged 7 commits into from
Jan 31, 2025

Conversation

softwarecki
Copy link
Collaborator

@softwarecki softwarecki commented Jan 23, 2025

rimage: Change the UUID storage type in the module manifest to a sof-compatible structure to enable retrieval of the UUIDs from the registry.
llext: Obtain the UUIDs of loadable modules from the uuid-registry.

BTW: The MICSEL, CTC and RTC_AEC modules had an incorrect byte order in its uuid.

Change the type of the UUID parameter in the ipc4_get_drv function to avoid
unnecessary typecasting.

There are currently two ways to store UUIDs in SOF: as a byte array or
as a sof_uuid structure. The ipc4_get_drv function compares UUIDs using
the memcmp function, so it is not dependent on the type of the argument
passed.

This change is intended to prepare the code for standardizing the UUID
format across the project.

Signed-off-by: Adrian Warecki <[email protected]>
Change the uuid parameter type to void * in the parse_uuid function to make
it independent of the UUID type and avoid unnecessary type casting.

This change is intended to prepare the code for standardizing the UUID
format across the project.

Signed-off-by: Adrian Warecki <[email protected]>
Some identifiers are taken from the module manifest. Since the module
manifest structure (sof_man_module) is marked as packed, the pointer
to the sof_uuid structure may not be properly aligned.

Mark the sof_uuid structure as packed to avoid possible problems with
accessing fields of this structure from unaligned addresses.

Signed-off-by: Adrian Warecki <[email protected]>
Separate the SOF_REG_UUID macro to allow use it to initialize variables
with a value from the register.

Signed-off-by: Adrian Warecki <[email protected]>
Remove the reference to the first element of the array storing the uuid
to prepare the code for changing the uuid type from an array to a struct.

Signed-off-by: Adrian Warecki <[email protected]>
Add a & symbol for getting the address of a variable to prepare the code
for changing the uuid type from an array to a structure.

Signed-off-by: Adrian Warecki <[email protected]>
Change the UUID storage type in the module manifest to a sof-compatible
structure to enable retrieval of the UUIDs from the registry. Obtain the
UUIDs of loadable llext modules from the uuid-registry.

Signed-off-by: Adrian Warecki <[email protected]>
Copy link
Collaborator

@lyakh lyakh left a comment

Choose a reason for hiding this comment

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

very good and welcome change! Doing those UUIDs manually is a pain and error-prone! A bit "too late" should I say after I've converted almost all of them, but better late than never! :-) And it still seems to work after this change:

[ 1349.578565] <wrn> ipc: ipc4_get_drv: get_drv(): the provided UUID (b36ee4da-006f-47f9-a06d-fecbe2d8b6ce) can't be found!
[ 1349.583076] <inf> llext: llext_load: Loaded extension DRC

just would be good to rearrange a couple of changes, otherwise no objections!

src/ipc/ipc4/helper.c Show resolved Hide resolved
src/library_manager/lib_manager.c Show resolved Hide resolved
@softwarecki
Copy link
Collaborator Author

SOFCI TEST

@softwarecki
Copy link
Collaborator Author

@kv2019i Can we proceed with merge?

@kv2019i
Copy link
Collaborator

kv2019i commented Jan 31, 2025

Aa, sorry @softwarecki I thought this depended on the Zephyr side PR, but alas that is not the case as CI is passing. Let me proceed with merge. Sorry for the delay!

@kv2019i kv2019i merged commit cb057a5 into thesofproject:main Jan 31, 2025
46 of 51 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.

6 participants