Skip to content

Commit 5536702

Browse files
committed
[INTERNAL] W/A: Workaround for invalid IMR size reported by simulator
Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
1 parent 629979c commit 5536702

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

zephyr/lib/alloc.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,8 +228,11 @@ static inline size_t get_l3_heap_size(void)
228228
* - actual IMR heap start
229229
*/
230230
size_t offset = IMR_L3_HEAP_BASE - L3_MEM_BASE_ADDR;
231+
size_t size = ace_imr_get_mem_size();
231232

232-
return ROUND_DOWN(ace_imr_get_mem_size() - offset, L3_MEM_PAGE_SIZE);
233+
if (size > MB(48))
234+
size = MB(16);
235+
return ROUND_DOWN(size - offset, L3_MEM_PAGE_SIZE);
233236
}
234237

235238
void l3_heap_save(void)

0 commit comments

Comments
 (0)