summaryrefslogtreecommitdiffstats
path: root/sound/soc/sof/intel/bdw.c
diff options
context:
space:
mode:
authorKai Vehmanen <kai.vehmanen@linux.intel.com>2019-06-03 11:18:15 -0500
committerMark Brown <broonie@kernel.org>2019-06-03 17:56:38 +0100
commit14104eb6a351a5bad21fdd2cf05ca46ad5e5beab (patch)
tree8318963b9a795666a7801e09f9827a1da3c0ff53 /sound/soc/sof/intel/bdw.c
parentd6947bb234dcc86e878d502516d0fb9d635aa2ae (diff)
downloadlinux-14104eb6a351a5bad21fdd2cf05ca46ad5e5beab.tar.gz
linux-14104eb6a351a5bad21fdd2cf05ca46ad5e5beab.tar.bz2
linux-14104eb6a351a5bad21fdd2cf05ca46ad5e5beab.zip
ASoC: SOF: fix DSP oops definitions in FW ABI
The definitions for DSP oops structures were not aligned correctly to current FW ABI version 3.6.0, leading to invalid data being printed out to debug logs. Fix the structs and update related platform code accordingly. Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/sof/intel/bdw.c')
-rw-r--r--sound/soc/sof/intel/bdw.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/sound/soc/sof/intel/bdw.c b/sound/soc/sof/intel/bdw.c
index 8ff3ee520aea..70d524ef9bc0 100644
--- a/sound/soc/sof/intel/bdw.c
+++ b/sound/soc/sof/intel/bdw.c
@@ -220,17 +220,20 @@ static void bdw_get_registers(struct snd_sof_dev *sdev,
struct sof_ipc_panic_info *panic_info,
u32 *stack, size_t stack_words)
{
- /* first read regsisters */
- sof_mailbox_read(sdev, sdev->dsp_oops_offset, xoops, sizeof(*xoops));
+ u32 offset = sdev->dsp_oops_offset;
+
+ /* first read registers */
+ sof_mailbox_read(sdev, offset, xoops, sizeof(*xoops));
+
+ /* note: variable AR register array is not read */
/* then get panic info */
- sof_mailbox_read(sdev, sdev->dsp_oops_offset + sizeof(*xoops),
- panic_info, sizeof(*panic_info));
+ offset += xoops->arch_hdr.totalsize;
+ sof_mailbox_read(sdev, offset, panic_info, sizeof(*panic_info));
/* then get the stack */
- sof_mailbox_read(sdev, sdev->dsp_oops_offset + sizeof(*xoops) +
- sizeof(*panic_info), stack,
- stack_words * sizeof(u32));
+ offset += sizeof(*panic_info);
+ sof_mailbox_read(sdev, offset, stack, stack_words * sizeof(u32));
}
static void bdw_dump(struct snd_sof_dev *sdev, u32 flags)