Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions subsys/logging/backends/log_backend_adsp_mtrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,18 @@ static void mtrace_init(void)

slot = adsp_dw_request_slot(&slot_desc, NULL);
#else
struct adsp_debug_slot *slot = (struct adsp_debug_slot *)
ADSP_DW->slots[ADSP_DW_SLOT_NUM_MTRACE];

if (ADSP_DW->descs[ADSP_DW_SLOT_NUM_MTRACE].type == MTRACE_LOGGING_SLOT_TYPE(MTRACE_CORE)) {
return;
}

ADSP_DW->descs[ADSP_DW_SLOT_NUM_MTRACE].type = MTRACE_LOGGING_SLOT_TYPE(MTRACE_CORE);
#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)

}

static size_t mtrace_out(int8_t *str, size_t len, size_t *space_left)
Expand Down
Loading