Skip to content

logging: mtrace: Reset host and dsp pointer during init#105357

Merged
nashif merged 1 commit intozephyrproject-rtos:mainfrom
ujfalusi:peter/pr/mtrace_reset_pointers_on_inint
Mar 16, 2026
Merged

logging: mtrace: Reset host and dsp pointer during init#105357
nashif merged 1 commit intozephyrproject-rtos:mainfrom
ujfalusi:peter/pr/mtrace_reset_pointers_on_inint

Conversation

@ujfalusi
Copy link
Copy Markdown
Contributor

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.

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>
@sonarqubecloud
Copy link
Copy Markdown

@ujfalusi ujfalusi requested a review from kv2019i March 12, 2026 13:40
Copy link
Copy Markdown
Contributor

@kv2019i kv2019i left a comment

Choose a reason for hiding this comment

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

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;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It is reported as part of a Linux kernel PR: thesofproject/linux#5690 (comment)

@kv2019i kv2019i added the platform: Intel ADSP Intel Audio platforms label Mar 12, 2026
@nashif nashif merged commit 4d8b77c into zephyrproject-rtos:main Mar 16, 2026
31 of 32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants