Skip to content

Commit 428d0a2

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

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

zephyr/lib/alloc.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,8 +241,10 @@ 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-
245-
return ROUND_DOWN(ace_imr_get_mem_size() - offset, L3_MEM_PAGE_SIZE);
244+
size_t size = ace_imr_get_mem_size();
245+
if (size > MB(48))
246+
size = MB(16);
247+
return ROUND_DOWN(size - offset, L3_MEM_PAGE_SIZE);
246248
}
247249

248250
void l3_heap_save(void)

0 commit comments

Comments
 (0)