Skip to content

Commit 4d0d111

Browse files
committed
W/A: Workaround for invalid IMR size reported by simulator
Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
1 parent bea91a8 commit 4d0d111

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

zephyr/lib/alloc.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,8 +241,11 @@ static inline size_t get_l3_heap_size(void)
241241
* - actual IMR heap start
242242
*/
243243
size_t offset = IMR_L3_HEAP_BASE - L3_MEM_BASE_ADDR;
244+
size_t size = ace_imr_get_mem_size();
244245

245-
return ROUND_DOWN(ace_imr_get_mem_size() - offset, L3_MEM_PAGE_SIZE);
246+
if (size > MB(48))
247+
size = MB(16);
248+
return ROUND_DOWN(size - offset, L3_MEM_PAGE_SIZE);
246249
}
247250

248251
void l3_heap_save(void)

0 commit comments

Comments
 (0)