Skip to content

Commit

Permalink
fix window offsets (oops), very close now
Browse files Browse the repository at this point in the history
  • Loading branch information
andyross committed Nov 23, 2024
1 parent 17b6f89 commit 2ee9a19
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/platform/mtk/include/platform/lib/memory.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
2 changes: 1 addition & 1 deletion src/platform/mtk/platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down

0 comments on commit 2ee9a19

Please sign in to comment.