-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
intel: adsp: fix firmware image in IMR overwriting #76196
Conversation
The IMR is used by the firmware to hold its own copy for hot-booting and for an "L3 heap," used for slow large allocations like loadable libraries. The beginning of the L3 heap is currently hard-coded and now the firmware has grown too large to fit into the dedicated area so that it gets overwritten by heap allocations. This is a critical bug that needs an urgent solution, for which we increase the offset, but a real fix must calculate the L3 heap offset automatically. BugLink: thesofproject/sof#9308 Signed-off-by: Guennadi Liakhovetski <[email protected]>
During debugging, I found another thing. At this line in |
@tmleman yes, I stumbled over that too, but I don't know what the correct fix there should be. I think |
A link to an explanation of the IMR memory layout and how parts of it get corrupted thesofproject/sof#9308 (comment) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix is sound. Agreed that the the tradition of manually-typed layout offsets in SOF (well, "SOF-derived code") has been stretched past the breaking point and needs a rework.
I just filed new issue #76247 to discuss and track a longer term solution. |
This reverts commit 8847de0. This should now work thanks to the "better" IMR addresses in zephyrproject-rtos/zephyr#76196 Note the longer term issue is still open: zephyrproject-rtos/zephyr#76247 Signed-off-by: Marc Herbert <[email protected]>
This reverts commit 8847de0. This should now work thanks to the "better" IMR addresses in zephyrproject-rtos/zephyr#76196 Note the longer term issue is still open: zephyrproject-rtos/zephyr#76247 Signed-off-by: Marc Herbert <[email protected]>
The IMR is used by the firmware to hold its own copy for hot-booting and for an "L3 heap," used for slow large allocations like loadable libraries. The beginning of the L3 heap is currently hard-coded and now the firmware has grown too large to fit into the dedicated area so that it gets overwritten by heap allocations. This is a critical bug that needs an urgent solution, for which we increase the offset, but a real fix must calculate the L3 heap offset automatically.
BugLink: thesofproject/sof#9308