diff --git a/rimage b/rimage index 5aeb95b19bba..9a26e4558094 160000 --- a/rimage +++ b/rimage @@ -1 +1 @@ -Subproject commit 5aeb95b19bba15801fef4ee37760a6e776d3bd1a +Subproject commit 9a26e4558094f19f3f7becd89eb9e8a9a9dd82b9 diff --git a/src/platform/apollolake/include/platform/lib/memory.h b/src/platform/apollolake/include/platform/lib/memory.h index 74bc6e9681c1..adb79b7dde68 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 8 +#define HEAP_COUNT1024 4 +#define HEAP_COUNT2048 2 +#define HEAP_COUNT4096 1 + +#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)) diff --git a/src/platform/cannonlake/include/platform/lib/memory.h b/src/platform/cannonlake/include/platform/lib/memory.h index 3cdd05b5a90e..ab806f60bd1b 100644 --- a/src/platform/cannonlake/include/platform/lib/memory.h +++ b/src/platform/cannonlake/include/platform/lib/memory.h @@ -243,14 +243,31 @@ #define HEAP_SYS_RT_X_COUNT512 8 #define HEAP_SYS_RT_X_COUNT1024 4 +/* 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 + +#if HP_SRAM_SIZE < 0x200000 +#define RT_TIMES 3 +#define RT_SHARED_TIMES 6 +#else +#define RT_TIMES 8 +#define RT_SHARED_TIMES 16 +#endif + /* Heap section sizes for module pool */ -#define HEAP_RT_COUNT64 128 -#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 \ @@ -260,11 +277,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 + \ diff --git a/src/platform/icelake/include/platform/lib/memory.h b/src/platform/icelake/include/platform/lib/memory.h index be02df627266..8ed3dfbb6ef4 100644 --- a/src/platform/icelake/include/platform/lib/memory.h +++ b/src/platform/icelake/include/platform/lib/memory.h @@ -240,14 +240,31 @@ #define HEAP_SYS_RT_X_COUNT512 8 #define HEAP_SYS_RT_X_COUNT1024 4 +/* 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 + +#if HP_SRAM_SIZE < 0x200000 +#define RT_TIMES 1 +#define RT_SHARED_TIMES 1 +#else +#define RT_TIMES 8 +#define RT_SHARED_TIMES 16 +#endif + /* Heap section sizes for module pool */ -#define HEAP_RT_COUNT64 128 -#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 \ @@ -257,11 +274,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 + \ diff --git a/src/platform/tigerlake/include/platform/lib/memory.h b/src/platform/tigerlake/include/platform/lib/memory.h index ecf152ed5fa0..d9b783fb6358 100644 --- a/src/platform/tigerlake/include/platform/lib/memory.h +++ b/src/platform/tigerlake/include/platform/lib/memory.h @@ -135,47 +135,47 @@ /* * The HP SRAM Region on Tigerlake is organised like this :- - * +--------------------------------------------------------------------------+ - * | Offset | Region | Size | - * +------------------+-------------------------+-----------------------------+ - * | SRAM_SW_REG_BASE | SW Registers W0 | SRAM_SW_REG_SIZE | - * +------------------+-------------------------+-----------------------------+ - * | SRAM_OUTBOX_BASE | Outbox W0 | SRAM_MAILBOX_SIZE | - * +------------------+-------------------------+-----------------------------+ - * | SRAM_INBOX_BASE | Inbox W1 | SRAM_INBOX_SIZE | - * +------------------+-------------------------+-----------------------------+ - * | SRAM_DEBUG_BASE | Debug data W2 | SRAM_DEBUG_SIZE | - * +------------------+-------------------------+-----------------------------+ - * | SRAM_EXCEPT_BASE | Debug data W2 | SRAM_EXCEPT_SIZE | - * +------------------+-------------------------+-----------------------------+ - * | SRAM_STREAM_BASE | Stream data W2 | SRAM_STREAM_SIZE | - * +------------------+-------------------------+-----------------------------+ - * | SRAM_TRACE_BASE | Trace Buffer W3 | SRAM_TRACE_SIZE | - * +------------------+-------------------------+-----------------------------+ - * | HP_SRAM_BASE | DMA | HEAP_HP_BUFFER_SIZE | - * +------------------+-------------------------+-----------------------------+ - * | SOF_FW_START | text | | - * | | data | | - * | | BSS | | - * +------------------+-------------------------+-----------------------------+ - * | | Runtime Heap | HEAP_RUNTIME_SIZE | - * +------------------+-------------------------+-----------------------------+ - * | | Runtime shared Heap | HEAP_RUNTIME_SHARED_SIZE | - * | |-------------------------+-----------------------------+ - * | | System shared Heap | HEAP_SYSTEM_SHARED_SIZE | - * | |-------------------------+-----------------------------+ - * | | Module Buffers | HEAP_BUFFER_SIZE | - * +------------------+-------------------------+-----------------------------+ - * | | Primary core Sys Heap | HEAP_SYSTEM_M_SIZE | - * +------------------+-------------------------+-----------------------------+ - * | | Pri. Sys Runtime Heap | HEAP_SYS_RUNTIME_M_SIZE | - * +------------------+-------------------------+-----------------------------+ - * | | Primary core Stack | SOF_STACK_SIZE | - * +------------------+-------------------------+-----------------------------+ - * | | Sec. core Sys Heap | SOF_CORE_S_T_SIZE | - * | | Sec. Sys Runtime Heap | | - * | | Secondary core Stack | | - * +------------------+-------------------------+-----------------------------+ + * +----------------------------------------------------------------------------+ + * | Offset | Region | Size | + * +--------------------+-------------------------+-----------------------------+ + * | SRAM_SW_REG_BASE | SW Registers W0 | SRAM_SW_REG_SIZE | + * +--------------------+-------------------------+-----------------------------+ + * | SRAM_OUTBOX_BASE | Outbox W0 | SRAM_OUTBOX_SIZE | + * +--------------------+-------------------------+-----------------------------+ + * | SRAM_INBOX_BASE | Inbox W1 | SRAM_INBOX_SIZE | + * +--------------------+-------------------------+-----------------------------+ + * | SRAM_DEBUG_BASE | Debug data W2 | SRAM_DEBUG_SIZE | + * +--------------------+-------------------------+-----------------------------+ + * | SRAM_EXCEPT_BASE | Debug data W2 | SRAM_EXCEPT_SIZE | + * +--------------------+-------------------------+-----------------------------+ + * | SRAM_STREAM_BASE | Stream data W2 | SRAM_STREAM_SIZE | + * +--------------------+-------------------------+-----------------------------+ + * | SRAM_TRACE_BASE | Trace Buffer W3 | SRAM_TRACE_SIZE | + * +--------------------+-------------------------+-----------------------------+ + * | HEAP_HP_BUFFER_BASE| DMA | HEAP_HP_BUFFER_SIZE | + * +--------------------+-------------------------+-----------------------------+ + * | SOF_FW_START | text | | + * | | data | | + * | | BSS | | + * +--------------------+-------------------------+-----------------------------+ + * | | Runtime Heap | HEAP_RUNTIME_SIZE | + * +--------------------+-------------------------+-----------------------------+ + * | | Runtime shared Heap | HEAP_RUNTIME_SHARED_SIZE | + * | |-------------------------+-----------------------------+ + * | | System shared Heap | HEAP_SYSTEM_SHARED_SIZE | + * | |-------------------------+-----------------------------+ + * | | Module Buffers | HEAP_BUFFER_SIZE | + * +--------------------+-------------------------+-----------------------------+ + * | | Primary core Sys Heap | HEAP_SYSTEM_M_SIZE | + * +--------------------+-------------------------+-----------------------------+ + * | | Pri. Sys Runtime Heap | HEAP_SYS_RUNTIME_M_SIZE | + * +--------------------+-------------------------+-----------------------------+ + * | | Primary core Stack | SOF_STACK_SIZE | + * +--------------------+-------------------------+-----------------------------+ + * | | Sec. core Sys Heap | SOF_CORE_S_T_SIZE | + * | | Sec. Sys Runtime Heap | | + * | | Secondary core Stack | | + * +--------------------+-------------------------+-----------------------------+ */ /* HP SRAM */ @@ -249,14 +249,31 @@ #define HEAP_SYS_RT_X_COUNT512 8 #define HEAP_SYS_RT_X_COUNT1024 4 +/* 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 + +#if HP_SRAM_SIZE < 0x200000 +#define RT_TIMES 3 +#define RT_SHARED_TIMES 6 +#else +#define RT_TIMES 8 +#define RT_SHARED_TIMES 16 +#endif + /* Heap section sizes for module pool */ -#define HEAP_RT_COUNT64 128 -#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 \ @@ -266,11 +283,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 + CONFIG_CORE_COUNT) +#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 + \