From b4175f155dc0a9f5c56c5c0fab34974fd4e1e483 Mon Sep 17 00:00:00 2001 From: Serhiy Katsyuba Date: Mon, 13 Oct 2025 13:12:57 +0200 Subject: [PATCH] ipc: Fix incorrect dcache invalidate struct sof_ipc_cmd_hdr belongs to IPC3. There is no 'size' field in IPC4 payload at that offset. comp_data is zeroed on init and on IPC4 it is only used to send responses by get_large_config. Probably get_large_config is rarely used as, otherwise, that would result in invalidates of dcache with weird sizes and problems at runtime. Signed-off-by: Serhiy Katsyuba --- src/ipc/ipc-common.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ipc/ipc-common.c b/src/ipc/ipc-common.c index 2368ea9163fd..d8ee7dcfc140 100644 --- a/src/ipc/ipc-common.c +++ b/src/ipc/ipc-common.c @@ -55,9 +55,11 @@ int ipc_process_on_core(uint32_t core, bool blocking) return -EACCES; } +#if CONFIG_IPC_MAJOR_3 /* The other core will write there its response */ dcache_invalidate_region((__sparse_force void __sparse_cache *)MAILBOX_HOSTBOX_BASE, ((struct sof_ipc_cmd_hdr *)ipc->comp_data)->size); +#endif /* * If the primary core is waiting for secondary cores to complete, it