From 2ee9a1930302ea6932efb3a680277f221d500e1a Mon Sep 17 00:00:00 2001 From: Andy Ross Date: Sat, 23 Nov 2024 06:51:33 -0800 Subject: [PATCH] fix window offsets (oops), very close now --- src/platform/mtk/include/platform/lib/memory.h | 3 ++- src/platform/mtk/platform.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/platform/mtk/include/platform/lib/memory.h b/src/platform/mtk/include/platform/lib/memory.h index 5c356cc791c7..284e994fe938 100644 --- a/src/platform/mtk/include/platform/lib/memory.h +++ b/src/platform/mtk/include/platform/lib/memory.h @@ -62,7 +62,8 @@ static inline void *platform_shared_get(void *ptr, int bytes) #define _MTK_WIN_OFF_K_STREAM (_MTK_WIN_SZ_K_EXCEPTION + _MTK_WIN_OFF_K_EXCEPTION) #define _MTK_WIN_OFF_K_TRACE (_MTK_WIN_SZ_K_STREAM + _MTK_WIN_OFF_K_STREAM) -#define MTK_IPC_WIN_BASE(reg) (MTK_IPC_BASE + 1024 * _MTK_WIN_OFF_K_##reg) +#define MTK_IPC_WIN_OFF(reg) (1024 * _MTK_WIN_OFF_K_##reg) #define MTK_IPC_WIN_SIZE(reg) (1024 * _MTK_WIN_SZ_K_##reg) +#define MTK_IPC_WIN_BASE(reg) (MTK_IPC_BASE + MTK_IPC_WIN_OFF(reg)) #endif /* _SOF_PLATFORM_MTK_LIB_MEMORY_H */ diff --git a/src/platform/mtk/platform.c b/src/platform/mtk/platform.c index 9b3aff26e0b5..2c1444aa670f 100644 --- a/src/platform/mtk/platform.c +++ b/src/platform/mtk/platform.c @@ -127,7 +127,7 @@ int platform_boot_complete(uint32_t boot_message) #define WINDOW(region) \ { .type = SOF_IPC_REGION_##region, \ .size = MTK_IPC_WIN_SIZE(region), \ - .offset = MTK_IPC_WIN_BASE(region), } + .offset = MTK_IPC_WIN_OFF(region), } struct ext_man_windows mtk_man_win __section(".fw_metadata") __aligned(EXT_MAN_ALIGN) = { .hdr = {