soc: intel_apl_adsp: Fix memory corruption

sizeof(sram) is the size of the whole structure.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
This commit is contained in:
Andrei Emeltchenko 2019-12-13 16:01:19 +02:00 committed by Johan Hedberg
commit 2eb257913a

View file

@ -98,8 +98,7 @@ static void send_fw_ready(void)
&fw_ready_apl, sizeof(fw_ready_apl));
memcpy((void *)(MAILBOX_DSPBOX_BASE + sizeof(fw_ready_apl)),
&sram_window,
(sizeof(sram_window) + sram_window.ext_hdr.hdr.size));
&sram_window, sizeof(sram_window));
SOC_DCACHE_FLUSH((void *)MAILBOX_DSPBOX_BASE, MAILBOX_DSPBOX_SIZE);