mbox series

[0/9] ASoC: SOF: ipc4/Intel: Support for firmware exception handling

Message ID 20230919092416.4137-1-peter.ujfalusi@linux.intel.com (mailing list archive)
Headers show
Series ASoC: SOF: ipc4/Intel: Support for firmware exception handling | expand

Message

Peter Ujfalusi Sept. 19, 2023, 9:24 a.m. UTC
Hi,

When a firmware crashes it creats a panic information into a telemetry slot.
The panic format is defined by Zephyr, includes stack and additional information
to help to identify the reason for the crash.
Part of the firmware exception handling the firmware also sends an
EXCEPTION_CAUGHT notification.

This series implements the kernel side handling of the exception:
print information into the kernel log
export the whole telemetry slot to user space for tools extract additional
information from the panic dump.

Regards,
Peter
---
Rander Wang (9):
  ASoC: SOF: Xtensa: dump ar registers to restore call stack
  ASoC: SOF: ipc4-mtrace: move debug slot related definitions to
    header.h
  ASoC: SOF: ipc4: add a helper function to search debug slot
  ASoC: SOF: ipc4: add definition of telemetry slot for exception
    handling
  ASoC: SOF: ipc4: add exception node in sof debugfs directory
  ASoC: SOF: Intel: add telemetry retrieval support on Intel platforms
  ASoC: SOF: Intel: mtl: dump dsp stack
  ASoC: SOF: Intel: hda: add ipc4 FW panic support on CAVS 2.5+
    platforms
  ASoC: SOF: ipc4: handle EXCEPTION_CAUGHT notification from firmware

 include/sound/sof/ipc4/header.h | 17 ++++++
 sound/soc/sof/Makefile          |  2 +-
 sound/soc/sof/intel/Makefile    |  3 +-
 sound/soc/sof/intel/hda.c       | 14 +++++
 sound/soc/sof/intel/hda.h       |  1 +
 sound/soc/sof/intel/mtl.c       |  3 ++
 sound/soc/sof/intel/telemetry.c | 95 +++++++++++++++++++++++++++++++++
 sound/soc/sof/intel/telemetry.h | 35 ++++++++++++
 sound/soc/sof/intel/tgl.c       |  1 +
 sound/soc/sof/ipc4-mtrace.c     | 34 ++++--------
 sound/soc/sof/ipc4-priv.h       |  3 ++
 sound/soc/sof/ipc4-telemetry.c  | 95 +++++++++++++++++++++++++++++++++
 sound/soc/sof/ipc4-telemetry.h  | 73 +++++++++++++++++++++++++
 sound/soc/sof/ipc4.c            | 29 ++++++++++
 sound/soc/sof/xtensa/core.c     | 11 ++++
 15 files changed, 391 insertions(+), 25 deletions(-)
 create mode 100644 sound/soc/sof/intel/telemetry.c
 create mode 100644 sound/soc/sof/intel/telemetry.h
 create mode 100644 sound/soc/sof/ipc4-telemetry.c
 create mode 100644 sound/soc/sof/ipc4-telemetry.h

Comments

Mark Brown Sept. 21, 2023, 4:30 p.m. UTC | #1
On Tue, 19 Sep 2023 12:24:07 +0300, Peter Ujfalusi wrote:
> When a firmware crashes it creats a panic information into a telemetry slot.
> The panic format is defined by Zephyr, includes stack and additional information
> to help to identify the reason for the crash.
> Part of the firmware exception handling the firmware also sends an
> EXCEPTION_CAUGHT notification.
> 
> This series implements the kernel side handling of the exception:
> print information into the kernel log
> export the whole telemetry slot to user space for tools extract additional
> information from the panic dump.
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/9] ASoC: SOF: Xtensa: dump ar registers to restore call stack
      commit: 58bb5081cba130f12c26d8e4d5e9416a0272f07e
[2/9] ASoC: SOF: ipc4-mtrace: move debug slot related definitions to header.h
      commit: 4287205065f244f4d40ae6aa7875b3ebffedcf8d
[3/9] ASoC: SOF: ipc4: add a helper function to search debug slot
      commit: a397899f81d52202265d4977a99085f53e426826
[4/9] ASoC: SOF: ipc4: add definition of telemetry slot for exception handling
      commit: ab05061d25806515358d184eb4d305f7f12befdc
[5/9] ASoC: SOF: ipc4: add exception node in sof debugfs directory
      commit: 80b567f8995757d36008f835853cea8d2f7c34c0
[6/9] ASoC: SOF: Intel: add telemetry retrieval support on Intel platforms
      commit: c8b54a2f7af41740b5faad2f6846d927b14369ca
[7/9] ASoC: SOF: Intel: mtl: dump dsp stack
      commit: e449b18ff03c2f90430d00486fd713854b28c077
[8/9] ASoC: SOF: Intel: hda: add ipc4 FW panic support on CAVS 2.5+ platforms
      commit: eb6e5dab11401c64f5d5576c71e5fc0a4c7b321a
[9/9] ASoC: SOF: ipc4: handle EXCEPTION_CAUGHT notification from firmware
      commit: c1c48fd6bbe788458e3685fea74bdb3cb148ff93

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark