rimage: Add support to ignore detached sections#10624
rimage: Add support to ignore detached sections#10624dbaluta wants to merge 1 commit intothesofproject:mainfrom
Conversation
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>
|
What is the content of this non-critical data/code sections? Can we safely skip loading them? |
I think they are data and code that do not need to benefit from the reduced access time of the SRAM (or they are too big to fit in the SRAM) and for platforms using them we cannot skip them. Like for Intel. Thus |
@softwarecki I think "non performance critical" was meant, i.e. cold sections, which of course cannot be skipped |
|
So if they are needed, what is the purpose of separating them into a separate |
I honestly don't know. This is Intel stuff. @lyakh @lgirdwood can you help answer @softwarecki question. |
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.