rimage: Add support to ignore detached sections#10624
Open
dbaluta wants to merge 1 commit intothesofproject:mainfrom
Open
rimage: Add support to ignore detached sections#10624dbaluta wants to merge 1 commit intothesofproject:mainfrom
dbaluta wants to merge 1 commit intothesofproject:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new -d CLI option to rimage to optionally skip marking ELF sections as “detached” (e.g., to avoid incorrect DRAM-range-based detachment on platforms where the DRAM link range overlaps other memories).
Changes:
- Add
-dflag and plumb it throughstruct imageinto module section parsing. - Extend
module_parse_sections()API to accept anignore_detachedboolean. - Gate
out_section->detachedcomputation based on the new flag.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| tools/rimage/src/rimage.c | Adds -d option handling and passes the new flag into section parsing. |
| tools/rimage/src/module.c | Updates section detachment logic to honor ignore_detached. |
| tools/rimage/src/include/rimage/rimage.h | Adds ignore_detached field to the global image context. |
| tools/rimage/src/include/rimage/module.h | Updates module_parse_sections() declaration to include the new parameter. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
0fa3427 to
7d0a655
Compare
There are some non-critical data and code sections that are kept in DRAM to be accessed and executed from there without being copyind to SRAM. Such sections are marked as detached and linked into a separate "cold.mod" module. SOF marks sections between: SOF_MODULE_DRAM_LINK_START (0x00000000) to SOF_MODULE_DRAM_LINK_END (0x080000000) but this overalps with ITCM memory on M7 core of i.MX8MP. Add an option to ignore marking section as detached. Ideally in the future the dram start/end should be configured per platform. By default the behavior is unmodified, to enable this option one would need to pass `-d` to rimage. Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
There are some non-critical data and code sections that are kept in DRAM to be accessed and executed from there without being copyind to SRAM.
Such sections are marked as detached and linked into a separate "cold.mod" module.
SOF marks sections between: SOF_MODULE_DRAM_LINK_START (0x00000000) to SOF_MODULE_DRAM_LINK_END (0x080000000) but this overalps with ITCM memory on M7 core of i.MX8MP.
Add an option to ignore marking section as detached.
Ideally in the future the dram start/end should be configured per platform.
By default the behavior is unmodified, to enable this option one would need to pass
-dto rimage.