Skip to content

Conversation

@abonislawski
Copy link
Member

  • rimage: toml_utils: add uint8/16 parsing support for TOML keys
  • rimage: select proper parse toml key functions based on data size

Copilot AI review requested due to automatic review settings September 22, 2025 09:21
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 enhances the TOML parsing utilities by adding support for smaller integer types (uint8 and uint16) and updates existing code to use appropriately sized parsing functions based on the data being parsed.

  • Added new parsing functions for uint8 and uint16 types (both hex and regular variants)
  • Updated existing code to use the most appropriate parsing function based on data size requirements
  • Improved type safety by matching parser return types to the actual field types being populated

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
tools/rimage/src/toml_utils.c Implements new uint8/uint16 parsing functions for both hex and decimal values
tools/rimage/src/include/rimage/toml_utils.h Adds function declarations for the new parsing utilities
tools/rimage/src/adsp_config.c Updates function calls to use appropriately sized parsers instead of uint32 variants

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

Extends existing parsing functionality

Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
Fix errno handling

Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>#
Select proper parse TOML keys functions to avoid
int overflow errors

Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
Copy link
Collaborator

@softwarecki softwarecki left a comment

Choose a reason for hiding this comment

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

Great work on this update!

@kv2019i kv2019i merged commit 4ebdd73 into thesofproject:main Sep 25, 2025
38 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.

3 participants