Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 20 additions & 32 deletions src/platform/apollolake/include/platform/lib/memory.h
Original file line number Diff line number Diff line change
Expand Up @@ -253,35 +253,23 @@
#define SOF_TEXT_BASE (SOF_FW_START)

/* Heap section sizes for system runtime heap for primary core */
#define HEAP_SYS_RT_0_COUNT64 64
#define HEAP_SYS_RT_0_COUNT512 8
#define HEAP_SYS_RT_0_COUNT1024 2
#define HEAP_SYS_RT_0_COUNT64 128
#define HEAP_SYS_RT_0_COUNT512 16
#define HEAP_SYS_RT_0_COUNT1024 4

/* Heap section sizes for system runtime heap for secondary core */
#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 8
#define HEAP_COUNT1024 4
#define HEAP_COUNT2048 2
#define HEAP_COUNT4096 1

#define RT_TIMES 1
#define RT_SHARED_TIMES 1
#define HEAP_SYS_RT_X_COUNT64 64
#define HEAP_SYS_RT_X_COUNT512 8
#define HEAP_SYS_RT_X_COUNT1024 4

/* Heap section sizes for module pool */
#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)
#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

/* Heap configuration */
#define HEAP_RUNTIME_SIZE \
Expand All @@ -291,11 +279,11 @@
HEAP_RT_COUNT4096 * 4096)

/* Heap section sizes for runtime shared heap */
#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_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_SIZE \
(HEAP_RUNTIME_SHARED_COUNT64 * 64 + HEAP_RUNTIME_SHARED_COUNT128 * 128 + \
Expand All @@ -310,8 +298,8 @@
#define HEAP_BUFFER_BLOCK_SIZE 0x100
#define HEAP_BUFFER_COUNT (HEAP_BUFFER_SIZE / HEAP_BUFFER_BLOCK_SIZE)

#define HEAP_SYSTEM_M_SIZE 0x4000 /* heap primary core size */
#define HEAP_SYSTEM_S_SIZE 0x3000 /* heap secondary core size */
#define HEAP_SYSTEM_M_SIZE 0x8000 /* heap primary core size */
#define HEAP_SYSTEM_S_SIZE 0x6000 /* heap secondary core size */
#define HEAP_SYSTEM_T_SIZE \
(HEAP_SYSTEM_M_SIZE + ((CONFIG_CORE_COUNT - 1) * HEAP_SYSTEM_S_SIZE))

Expand Down