-
Notifications
You must be signed in to change notification settings - Fork 308
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
[DNM] debug: debug_stream: Access debug slot directly using cavstool.py #9498
base: main
Are you sure you want to change the base?
[DNM] debug: debug_stream: Access debug slot directly using cavstool.py #9498
Conversation
e3ebc10
to
cafdef9
Compare
My latest cleanups were still un committed, thus the last update. |
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.
Let's sync with the version of cavstool.py that will get merged. Current version fails to
AttributeError: module 'cavstool' has no attribute 'fw_is_alive_dsp'. Did you mean: 'fw_is_alive'?
cafdef9
to
5c1957e
Compare
Latest push added some robustness improvements to the python script and config overlay for building debug_stream_thread_info. |
5c1957e
to
4bfe83a
Compare
The important part of this PR - the debug_stream.py direct access - is now split in two:
Then there is the debug_stream_overlay.conf added that is identical to the previous version and on simple typo fix commit. |
@jsarha does this PR depend on the Zephyr PRs ? if so , lets mark as DNM until Zephyr parts merged. |
Access debug slot directly using cavstool.py, by specifying the debug slot number where the debug_stream data is transferred. Adds one command line parameter for selecting the debug slot directly and adds an alternative mainloop for polling the slot through cavstool.py direct access. The commit also adds quite a few data consistency checks and error handling improvements as with the direct memory access its much more likely to get inconsistent data when the DSP is booting up, and code needs to be robust enough not to crash in such a situation. Also the logging messages about those checks failing has been lowered so that they are not too noisy. Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
The new cavstool.debug_slot_offset_by_type() opens an opportunity to improve debug_stream.py usability a bit. If the debugfs file is not found, then try to find the correct debug slot the correct slot using cavstool direct access and debug_slot_offset_by_type(). Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
Add overlay to build debug_stream protocol over a debug window slot, make room for the slot, and send thread info data through it. Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
A simple typo fix to a logging message. Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
4bfe83a
to
e040178
Compare
Fixed couple of simple codestyle issues found by checkpatch. |
The script actually does not stop from working even if the cavstool.py changes are not available, that is, if the debugfs file is there. But maybe the error messages if trying to use -c flag are too confusing. I'll add the tag. |
Access debug slot directly using cavstool.py, by specifying the debug slot number where the debug_stream data is transferred.
Adds one command line parameter for selecting the debug slot directly, adds an alternative mainloop for polling the slot through cavstool.py direct access, and relaxes some often occurring warning print. The warning prints happen when the FW boots and the cavstool code wakes up before the init code has initialized the slot.
NOTE:
This code depends from this PR: zephyrproject-rtos/zephyr#78753 . However, since the import line is in the function that is only called if the --direct-access-slot flag is present, the old code will still work without cavstool.py, but that would in turn need this PR: thesofproject/linux#5154