diff --git a/src/platform/apollolake/include/platform/lib/memory.h b/src/platform/apollolake/include/platform/lib/memory.h index 74bc6e968..3ff53d927 100644 --- a/src/platform/apollolake/include/platform/lib/memory.h +++ b/src/platform/apollolake/include/platform/lib/memory.h @@ -253,23 +253,35 @@ #define SOF_TEXT_BASE (SOF_FW_START) /* Heap section sizes for system runtime heap for primary core */ -#define HEAP_SYS_RT_0_COUNT64 128 -#define HEAP_SYS_RT_0_COUNT512 16 -#define HEAP_SYS_RT_0_COUNT1024 4 +#define HEAP_SYS_RT_0_COUNT64 64 +#define HEAP_SYS_RT_0_COUNT512 8 +#define HEAP_SYS_RT_0_COUNT1024 2 /* Heap section sizes for system runtime heap for secondary core */ -#define HEAP_SYS_RT_X_COUNT64 64 -#define HEAP_SYS_RT_X_COUNT512 8 -#define HEAP_SYS_RT_X_COUNT1024 4 +#define HEAP_SYS_RT_X_COUNT64 32 +#define HEAP_SYS_RT_X_COUNT512 4 +#define HEAP_SYS_RT_X_COUNT1024 2 + +/* Heap section counts base */ +#define HEAP_COUNT64 128 +#define HEAP_COUNT128 128 +#define HEAP_COUNT256 96 +#define HEAP_COUNT512 12 +#define HEAP_COUNT1024 3 +#define HEAP_COUNT2048 1 +#define HEAP_COUNT4096 0 + +#define RT_TIMES 1 +#define RT_SHARED_TIMES 1 /* Heap section sizes for module pool */ -#define HEAP_RT_COUNT64 160 -#define HEAP_RT_COUNT128 64 -#define HEAP_RT_COUNT256 128 -#define HEAP_RT_COUNT512 8 -#define HEAP_RT_COUNT1024 4 -#define HEAP_RT_COUNT2048 1 -#define HEAP_RT_COUNT4096 1 +#define HEAP_RT_COUNT64 (HEAP_COUNT64 * RT_TIMES) +#define HEAP_RT_COUNT128 (HEAP_COUNT128 * RT_TIMES) +#define HEAP_RT_COUNT256 (HEAP_COUNT256 * RT_TIMES) +#define HEAP_RT_COUNT512 (HEAP_COUNT512 * RT_TIMES) +#define HEAP_RT_COUNT1024 (HEAP_COUNT1024 * RT_TIMES) +#define HEAP_RT_COUNT2048 (HEAP_COUNT2048 * RT_TIMES) +#define HEAP_RT_COUNT4096 (HEAP_COUNT4096 * RT_TIMES) /* Heap configuration */ #define HEAP_RUNTIME_SIZE \ @@ -279,11 +291,11 @@ HEAP_RT_COUNT4096 * 4096) /* Heap section sizes for runtime shared heap */ -#define HEAP_RUNTIME_SHARED_COUNT64 (64 + 32 * CONFIG_CORE_COUNT) -#define HEAP_RUNTIME_SHARED_COUNT128 64 -#define HEAP_RUNTIME_SHARED_COUNT256 4 -#define HEAP_RUNTIME_SHARED_COUNT512 16 -#define HEAP_RUNTIME_SHARED_COUNT1024 4 +#define HEAP_RUNTIME_SHARED_COUNT64 (HEAP_COUNT64 * RT_SHARED_TIMES) +#define HEAP_RUNTIME_SHARED_COUNT128 (HEAP_COUNT128 * RT_SHARED_TIMES) +#define HEAP_RUNTIME_SHARED_COUNT256 (HEAP_COUNT256 * RT_SHARED_TIMES) +#define HEAP_RUNTIME_SHARED_COUNT512 (HEAP_COUNT512 * RT_SHARED_TIMES) +#define HEAP_RUNTIME_SHARED_COUNT1024 (HEAP_COUNT1024 * RT_SHARED_TIMES) #define HEAP_RUNTIME_SHARED_SIZE \ (HEAP_RUNTIME_SHARED_COUNT64 * 64 + HEAP_RUNTIME_SHARED_COUNT128 * 128 + \ @@ -298,8 +310,8 @@ #define HEAP_BUFFER_BLOCK_SIZE 0x100 #define HEAP_BUFFER_COUNT (HEAP_BUFFER_SIZE / HEAP_BUFFER_BLOCK_SIZE) -#define HEAP_SYSTEM_M_SIZE 0x8000 /* heap primary core size */ -#define HEAP_SYSTEM_S_SIZE 0x6000 /* heap secondary core size */ +#define HEAP_SYSTEM_M_SIZE 0x4000 /* heap primary core size */ +#define HEAP_SYSTEM_S_SIZE 0x3000 /* heap secondary core size */ #define HEAP_SYSTEM_T_SIZE \ (HEAP_SYSTEM_M_SIZE + ((CONFIG_CORE_COUNT - 1) * HEAP_SYSTEM_S_SIZE))