Skip to content

Commit c4566db

Browse files
committed
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. Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
1 parent ee6ce8f commit c4566db

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

sound/soc/sof/intel/hda.c

Lines changed: 17 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,21 @@ 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+
u32 value;
423+
int i;
424+
425+
for (i = 0; i < HDA_EXT_ROM_STATUS_SIZE; i++) {
426+
value = snd_sof_dsp_read(sdev, HDA_DSP_BAR, HDA_DSP_SRAM_REG_ROM_STATUS + i * 0x4);
427+
snprintf(msg + strlen(msg), sizeof(msg) - strlen(msg), "0x%x ", value);
428+
}
429+
430+
dev_err(sdev->dev, "error: extended rom status:%s", msg);
431+
}
432+
417433
void hda_dsp_dump(struct snd_sof_dev *sdev, u32 flags)
418434
{
419435
struct sof_ipc_dsp_oops_xtensa xoops;
@@ -437,6 +453,7 @@ void hda_dsp_dump(struct snd_sof_dev *sdev, u32 flags)
437453
} else {
438454
dev_err(sdev->dev, "error: status = 0x%8.8x panic = 0x%8.8x\n",
439455
status, panic);
456+
hda_dsp_dump_ext_rom_status(sdev);
440457
hda_dsp_get_status(sdev);
441458
}
442459
}

0 commit comments

Comments
 (0)