Skip to content

Commit 29c8e43

Browse files
ranj063broonie
authored andcommitted
ASoC: SOF: Intel: hda: add extended rom status dump to error log
Dump the extended ROM status information to the error logs to aid with remote support. The analysis of these logs requires access to non-public technical information. Reviewed-by: Kai Vehmanen <[email protected]> Reviewed-by: Jaska Uimonen <[email protected]> Signed-off-by: Ranjani Sridharan <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 878694d commit 29c8e43

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

sound/soc/sof/intel/hda.c

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
#include "shim.h"
3838

3939
#define EXCEPT_MAX_HDR_SIZE 0x400
40+
#define HDA_EXT_ROM_STATUS_SIZE 8
4041

4142
#if IS_ENABLED(CONFIG_SND_SOC_SOF_INTEL_SOUNDWIRE)
4243

@@ -414,6 +415,22 @@ void hda_dsp_dump_skl(struct snd_sof_dev *sdev, u32 flags)
414415
}
415416
}
416417

418+
/* dump the first 8 dwords representing the extended ROM status */
419+
static void hda_dsp_dump_ext_rom_status(struct snd_sof_dev *sdev)
420+
{
421+
char msg[128];
422+
int len = 0;
423+
u32 value;
424+
int i;
425+
426+
for (i = 0; i < HDA_EXT_ROM_STATUS_SIZE; i++) {
427+
value = snd_sof_dsp_read(sdev, HDA_DSP_BAR, HDA_DSP_SRAM_REG_ROM_STATUS + i * 0x4);
428+
len += snprintf(msg + len, sizeof(msg) - len, " 0x%x", value);
429+
}
430+
431+
dev_err(sdev->dev, "error: extended rom status:%s", msg);
432+
}
433+
417434
void hda_dsp_dump(struct snd_sof_dev *sdev, u32 flags)
418435
{
419436
struct sof_ipc_dsp_oops_xtensa xoops;
@@ -437,6 +454,7 @@ void hda_dsp_dump(struct snd_sof_dev *sdev, u32 flags)
437454
} else {
438455
dev_err(sdev->dev, "error: status = 0x%8.8x panic = 0x%8.8x\n",
439456
status, panic);
457+
hda_dsp_dump_ext_rom_status(sdev);
440458
hda_dsp_get_status(sdev);
441459
}
442460
}

0 commit comments

Comments
 (0)