logging: mtrace: Reset host and dsp pointer during init#105357
Merged
nashif merged 1 commit intozephyrproject-rtos:mainfrom Mar 16, 2026
Merged
logging: mtrace: Reset host and dsp pointer during init#105357nashif merged 1 commit intozephyrproject-rtos:mainfrom
nashif merged 1 commit intozephyrproject-rtos:mainfrom
Conversation
After power on the slot memory used for mtrace has not been initialized and it's content is filled with 0xff. The first log out will try to use 0xffffffff as host and dsp pointer, which is not something which should be done. Set both pointers to 0 as after DSP reset this is the expected value on host side and also on firmware side. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
|
dcpleung
approved these changes
Mar 12, 2026
nordic-krch
approved these changes
Mar 12, 2026
kv2019i
approved these changes
Mar 12, 2026
Contributor
kv2019i
left a comment
There was a problem hiding this comment.
Not sure in which conditions this can happen, but if there is any possibility, this is a must, and any case doesn't hurt as it documents the expected logic.
| #endif | ||
|
|
||
| slot->host_ptr = 0; | ||
| slot->dsp_ptr = 0; |
Contributor
There was a problem hiding this comment.
@ujfalusi I wonder in which conditions this happens. The code does assume these to be zero after hw init, so indeed this go belly up. I just tried on ACE30 system and I see zeros at boot.
Contributor
Author
There was a problem hiding this comment.
It is reported as part of a Linux kernel PR: thesofproject/linux#5690 (comment)
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.



After power on the slot memory used for mtrace has not been initialized and it's content is filled with 0xff.
The first log out will try to use 0xffffffff as host and dsp pointer, which is not something which should be done.
Set both pointers to 0 as after DSP reset this is the expected value on host side and also on firmware side.