Debug stream debugfs
This commit simply maps the identified debug-stream debug window slot as a debugfs file.
@jsarha, what I would do is: rename the
ipc4-telemetry.ctoipc4-debugfs.cor 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 thesof_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.hshould remain as it is.
@ujfalusi I took a shot at this. I still try make sure the zephyr tool can still read the execption file.
@ujfalusi @kv2019i , according to my tests the exception debugfs file works just as well after this change as it did before. That is, neither version works. I have no idea where the problem is, but I am quite sure this version is equivalent to the older version, so I'd hope to get this merged.
@jsarha @ujfalusi ping - can we unblock ?
@jsarha @ujfalusi ping - can we unblock ?
This is not as important anymore as before, as the latest debug_stream.py is able to access its debug-window-slot directly using cavstool.py functions. However, I still think the debugfs file is a cleaner way to do this, so I still think this PR is valid.
@jsarha @ujfalusi ping - can we unblock ?
This is not as important anymore as before, as the latest debug_stream.py is able to access its debug-window-slot directly using cavstool.py functions. However, I still think the debugfs file is a cleaner way to do this, so I still think this PR is valid.
ok, we can park now and see how well existing tools work - if slow or inconsistent we can continue here.
@jsarha @ujfalusi ping - can we unblock ?
This is not as important anymore as before, as the latest debug_stream.py is able to access its debug-window-slot directly using cavstool.py functions. However, I still think the debugfs file is a cleaner way to do this, so I still think this PR is valid.
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. @jsarha some conflicts.
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.
@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 !
@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?