Draft
Conversation
added 2 commits
February 4, 2026 00:51
Use spinlock instead of mutex to allow ISR context usage. Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
Set exception dump hooks if CONFIG_EXCEPTION_DUMP_HOOK=y. This enables sending a simple text report of fatal exceptions. To get this working one needs these config options: CONFIG_EXCEPTION_DUMP_HOOK=y CONFIG_SOF_DEBUG_STREAM_SLOT=y CONFIG_SOF_DEBUG_STREAM_TEXT_MSG=y CONFIG_SOF_DEBUG_STREAM_SLOT_NUMBER=2 CONFIG_SOF_TELEMETRY=n CONFIG_SOF_TELEMETRY_PERFORMANCE_MEASUREMENTS=n CONFIG_SOF_TELEMETRY_IO_PERFORMANCE_MEASUREMENTS=n If system hangs and an the exception is reported successfully the report can be seen with debug_stream.py (which should be installed in the same directory with cavstool.py). It does matter if the too was not running at the time. The report should be available there in the debug slot window for debug_stream.py to decode as long as system remains up. The report should looks something like this: CPU 2: ** FATAL EXCEPTION ** CPU 2 EXCCAUSE 63 (zephyr exception) ** PC 0xa00315db VADDR (nil) ** PS 0x60d20 ** (INTLEVEL:0 EXCM: 0 UM:1 RING:0 WOE:1 OWB:13 CALLINC:2) ** A0 0xa0074680 SP 0xa00e7b60 A2 0x4 A3 0xa00e7b70 ** A4 0xa00e7b50 A5 0x4 A6 0x1 A7 0x4 ** A8 0xa007459a A9 0xa00e7af0 A10 0xa00afe61 A11 0xa00e7b70 ** A12 0xa00e7b50 A13 0x4 A14 0xffffff3c A15 0xa00fb740 ** LBEG 0xa003ae05 LEND 0xa003ae14 LCOUNT 0xa0077bf3 ** SAR 0x14 ** THREADPTR (nil) Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
b3c5f35 to
fd97e52
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is experimental debug_stream exception dump handler. It should be able to report fatal exceptions through debug_stream using debug window slot and debug_stream.py. To get it working one needs zephyrproject-rtos/zephyr#103449 too.
I tried to get backtrace dumpped too, but for some reason all my attempts so far rendered everything unusable, maybe I try again after my vacation.