Skip to content

Commit 792e18c

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

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
@@ -230,8 +230,11 @@ static inline size_t get_l3_heap_size(void)
230230
* - actual IMR heap start
231231
*/
232232
size_t offset = IMR_L3_HEAP_BASE - L3_MEM_BASE_ADDR;
233+
size_t size = ace_imr_get_mem_size();
233234

234-
return ROUND_DOWN(ace_imr_get_mem_size() - offset, L3_MEM_PAGE_SIZE);
235+
if (size > MB(48))
236+
size = MB(16);
237+
return ROUND_DOWN(size - offset, L3_MEM_PAGE_SIZE);
235238
}
236239

237240
void l3_heap_save(void)

0 commit comments

Comments
 (0)