From 02d37bbdefe84d9758e486b6341906ad8b825799 Mon Sep 17 00:00:00 2001 From: Paul Olaru Date: Wed, 18 Mar 2020 16:39:15 +0200 Subject: [PATCH] platform: imx8m: Add more heap memory The extra memory blocks are required for SDMA proper functioning. Signed-off-by: Paul Olaru --- src/platform/imx8m/include/platform/lib/memory.h | 3 ++- src/platform/imx8m/lib/memory.c | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/platform/imx8m/include/platform/lib/memory.h b/src/platform/imx8m/include/platform/lib/memory.h index c24f3fee1..ae9cec3f6 100644 --- a/src/platform/imx8m/include/platform/lib/memory.h +++ b/src/platform/imx8m/include/platform/lib/memory.h @@ -109,6 +109,7 @@ #define HEAP_RT_COUNT512 4 #define HEAP_RT_COUNT1024 4 #define HEAP_RT_COUNT2048 4 +#define HEAP_RT_COUNT4096 4 /* Heap section sizes for system runtime heap */ #define HEAP_SYS_RT_COUNT64 128 @@ -133,7 +134,7 @@ HEAP_RT_COUNT32 * 32 + HEAP_RT_COUNT64 * 64 + \ HEAP_RT_COUNT128 * 128 + HEAP_RT_COUNT256 * 256 + \ HEAP_RT_COUNT512 * 512 + HEAP_RT_COUNT1024 * 1024 + \ - HEAP_RT_COUNT2048 * 2048) + HEAP_RT_COUNT2048 * 2048 + HEAP_RT_COUNT4096 * 4096) #define HEAP_BUFFER_BASE (HEAP_RUNTIME_BASE + HEAP_RUNTIME_SIZE) #define HEAP_BUFFER_SIZE \ diff --git a/src/platform/imx8m/lib/memory.c b/src/platform/imx8m/lib/memory.c index 0246a1791..773b20f2f 100644 --- a/src/platform/imx8m/lib/memory.c +++ b/src/platform/imx8m/lib/memory.c @@ -32,6 +32,7 @@ static SHARED_DATA struct block_hdr mod_block256[HEAP_RT_COUNT256]; static SHARED_DATA struct block_hdr mod_block512[HEAP_RT_COUNT512]; static SHARED_DATA struct block_hdr mod_block1024[HEAP_RT_COUNT1024]; static SHARED_DATA struct block_hdr mod_block2048[HEAP_RT_COUNT2048]; +static SHARED_DATA struct block_hdr mod_block4096[HEAP_RT_COUNT4096]; /* Heap memory map for modules */ static SHARED_DATA struct block_map rt_heap_map[] = { @@ -43,6 +44,7 @@ static SHARED_DATA struct block_map rt_heap_map[] = { BLOCK_DEF(512, HEAP_RT_COUNT512, mod_block512), BLOCK_DEF(1024, HEAP_RT_COUNT1024, mod_block1024), BLOCK_DEF(2048, HEAP_RT_COUNT2048, mod_block2048), + BLOCK_DEF(4096, HEAP_RT_COUNT4096, mod_block4096), }; /* Heap blocks for buffers */