sof/test/cmocka/memory_mock.x.in

27 lines
638 B
Plaintext
Raw Normal View History

memory: new memory layout for APL, ICL, CNL and SUE This will optimize memory usage and introduces two significant optimizations: > Separate the memory (heaps, stack) by cores so if we will turn off a specific core we can also turn off all memory of this core. > Remove fixed defines and gaps, previously stack was at fixed position: end of memory and buffer heap was everything between stack and fw. Now everything will be packed at sof_fw memory segment and takes only this memory which is really needed, everything else we can turn off. Changelog: BSS section now includes heaps and stack Removed many heap fixed position defines Removed gap before fw text section memmap init is using real linker positions for heaps Temporary stack for boot_ldr placed in heap_hp_buffer (safe) sof fw max_size and segment limited to memory configured by memory banks count Using new macro to stack init per core Stack is no longer a one big block for all cores (core_count*stack_size) System_runtime_heap and system_heap are no longer a one big block for all cores For suecreek memory it will also introduce similar changes previously introduced in other platforms (One shared memory block SOF_FW for SOF_TEXT, SOF_DATA and SOF_BSS sections Moved fw_ready near to .rodata and .data) Memory layout for every slave core aligned to hw memory bank: --align to memory bank-- system_heap system_runtime_heap stack --align to memory bank-- next slave core.. Similar layout applies to master core Signed-off-by: Adrian Bonislawski <adrian.bonislawski@linux.intel.com>
2019-05-28 17:43:50 +08:00
#include "include/mock_memory.h"
SECTIONS
{
.static_uuid_entries (COPY) : ALIGN(1024)
{
*(*.static_uuids)
}
.static_log_entries (COPY) : ALIGN(1024)
{
*(*.static_log*)
}
_comp_init_start = .;
_comp_init_end = .;
memory: new memory layout for APL, ICL, CNL and SUE This will optimize memory usage and introduces two significant optimizations: > Separate the memory (heaps, stack) by cores so if we will turn off a specific core we can also turn off all memory of this core. > Remove fixed defines and gaps, previously stack was at fixed position: end of memory and buffer heap was everything between stack and fw. Now everything will be packed at sof_fw memory segment and takes only this memory which is really needed, everything else we can turn off. Changelog: BSS section now includes heaps and stack Removed many heap fixed position defines Removed gap before fw text section memmap init is using real linker positions for heaps Temporary stack for boot_ldr placed in heap_hp_buffer (safe) sof fw max_size and segment limited to memory configured by memory banks count Using new macro to stack init per core Stack is no longer a one big block for all cores (core_count*stack_size) System_runtime_heap and system_heap are no longer a one big block for all cores For suecreek memory it will also introduce similar changes previously introduced in other platforms (One shared memory block SOF_FW for SOF_TEXT, SOF_DATA and SOF_BSS sections Moved fw_ready near to .rodata and .data) Memory layout for every slave core aligned to hw memory bank: --align to memory bank-- system_heap system_runtime_heap stack --align to memory bank-- next slave core.. Similar layout applies to master core Signed-off-by: Adrian Bonislawski <adrian.bonislawski@linux.intel.com>
2019-05-28 17:43:50 +08:00
_module_heap = HEAP_RUNTIME_BASE;
_buffer_heap = HEAP_BUFFER_BASE;
_system_heap = HEAP_SYSTEM_0_BASE;
_system_heap_start = HEAP_SYSTEM_0_BASE;
_system_runtime_heap = HEAP_SYS_RUNTIME_0_BASE;
_sof_core_s_start = SOF_CORE_S_START;
_runtime_shared_heap = HEAP_RUNTIME_SHARED_BASE;
_system_shared_heap = HEAP_SYSTEM_SHARED_BASE;
}
INSERT AFTER .text;