From 3ae9d9914e9c0df043eb9cb87025a354e92e89cd Mon Sep 17 00:00:00 2001 From: Piotr Hoppe Date: Tue, 10 Nov 2026 16:28:10 +0100 Subject: [PATCH] zephyr: alloc: access manifest through uncached alias Use an uncached pointer when reading the firmware manifest to calculate the L3 heap start. This removes the need for explicit cache invalidation before accessing the manifest header. Signed-off-by: Piotr Hoppe --- zephyr/lib/alloc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zephyr/lib/alloc.c b/zephyr/lib/alloc.c index 89bd49286831..e7cf3632a5a9 100644 --- a/zephyr/lib/alloc.c +++ b/zephyr/lib/alloc.c @@ -212,10 +212,10 @@ static struct k_heap l3_heap_copy __imrdata; static uintptr_t calc_l3_heap_start(void) { const struct sof_man_fw_desc *desc = - (const struct sof_man_fw_desc *)IMR_BOOT_LDR_MANIFEST_BASE; + sys_cache_uncached_ptr_get((__sparse_force void __sparse_cache *) + IMR_BOOT_LDR_MANIFEST_BASE); uintptr_t image_end; - sys_cache_data_invd_range((void *)&desc->header, sizeof(desc->header)); image_end = IMR_BOOT_LDR_MANIFEST_BASE + desc->header.preload_page_count * HOST_PAGE_SIZE;