-
Notifications
You must be signed in to change notification settings - Fork 136
Debug stream debugfs #5154
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
base: topic/sof-dev
Are you sure you want to change the base?
Debug stream debugfs #5154
Conversation
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.
@jsarha, what I would do is:
rename the ipc4-telemetry.c
to ipc4-debugfs.c
or something generic and use this to export the raw slots on the needed base.
You can have a single exported function as entry point, you can even move here the sof_ipc4_find_debug_slot_offset_by_type()
function...
I know, mtrace is also uses debug slot, but it has been special cased out...
The ipc4-telemetry.h
should remain as it is.
672baba
to
68be79a
Compare
@ujfalusi I took a shot at this. I still try make sure the zephyr tool can still read the execption file. |
ok, we can park now and see how well existing tools work - if slow or inconsistent we can continue here. |
I think this is useful in situations where no Python runtime is available. @ranj063 @ujfalusi @bardliao lets move forward with this. |
68be79a
to
2bd0077
Compare
Rephrased the first commit message a bit and resurrected ipc4-telemetry.h in the last commit (and updated the message accordingly), which is currently actually used. The code still works with debug_stream.py. |
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.
LGTM.
2bd0077
to
b9782ad
Compare
@lgirdwood , @lyakh , the phantom commit is now removed, and there was no complaints about the other commits, so this should be good now? Thanks @ujfalusi ! |
Adds sof_ipc4_create_debug_slot_ro_debugfs_node() -function for mapping a SOF Intel ipc4 debug window slot as debugfs file. The actual slot is specified with slot_type parameter. The alternatives are defined in include/sound/sof/ipc4/header.h and the slot is found with sof_ipc4_find_debug_slot_offset_by_type(). It also takes the data_offset parameter that specifies where the payload data in the slot begins. The portion that is mapped to the debugfs file is everything after the offset. The last parameter is the name of the file. Signed-off-by: Jyri Sarha <[email protected]>
Add new debug window slot type for debug-stream protocol. For details see src/debug/debug_stream/debug_stream_slot.h under SOF sources [1]. [1] https://github.com/thesofproject/sof Signed-off-by: Jyri Sarha <[email protected]>
Maps debug-stream debug window slot as read-only debugfs file with sof_ipc4_create_debug_slot_ro_debugfs_node() -function. Signed-off-by: Jyri Sarha <[email protected]>
… file Remove sof_ipc4_create_exception_debugfs_node() and ipc4-telemetry.c, and use sof_ipc4_create_debug_slot_ro_debugfs_node() instead for mapping "exception" debugfs file. In running system the SOF_IPC4_DEBUG_SLOT_TELEMETRY is used for telemetry data, but if configured, Zephyr exception data is dumped in the same debug window slot, right after the separator word. Signed-off-by: Jyri Sarha <[email protected]>
b9782ad
to
7d84e22
Compare
@lyakh is this Ok now? @bardliao , @lgirdwood only appled three last suggestions from Guennadi (Copyright 2024-2025), free in only one place sof_debug_slot_debugfs_entry_read(), and rename sof_ipc4_create_debug_slot_debugfs_node() to sof_ipc4_create_debug_slot_ro_debugfs_node() . Could you check those and reaprove if Ok. |
@lgirdwood should we still get this merged? @ujfalusi should I rebase, the PR getting old, again? |
This commit simply maps the identified debug-stream debug window slot as a debugfs file.