From 15fdbd938c1e9d8816c6f9cd28fbde8b916c8432 Mon Sep 17 00:00:00 2001 From: Marcin Maka Date: Thu, 13 Sep 2018 13:44:51 +0200 Subject: [PATCH] build: linker: x scripts for cavs platforms aligned Signed-off-by: Marcin Maka --- src/platform/apollolake/apollolake.x.in | 6 +-- src/platform/cannonlake/cannonlake.x.in | 64 ++++++++++++++++++++++++- src/platform/icelake/icelake.x.in | 64 ++++++++++++++++++++++++- 3 files changed, 127 insertions(+), 7 deletions(-) diff --git a/src/platform/apollolake/apollolake.x.in b/src/platform/apollolake/apollolake.x.in index 4aef637ec..503e2d1c3 100644 --- a/src/platform/apollolake/apollolake.x.in +++ b/src/platform/apollolake/apollolake.x.in @@ -235,7 +235,7 @@ SECTIONS _wnd3_end = ABSOLUTE(.); } >wnd3 :wnd3_phdr - .WindowVectors.text : ALIGN(4) + .WindowVectors.text : ALIGN(4) { _WindowVectors_text_start = ABSOLUTE(.); KEEP (*(.WindowVectors.text)) @@ -557,9 +557,9 @@ SECTIONS .buffer_heap (NOLOAD) : ALIGN(8) { . = ALIGN (32); - _system_heap_start = ABSOLUTE(.); + _buffer_heap_start = ABSOLUTE(.); . = . + HEAP_BUFFER_SIZE; - _system_heap_end = ABSOLUTE(.); + _buffer_heap_end = ABSOLUTE(.); } >buffer_heap :buffer_heap_phdr .sof_stack (NOLOAD) : ALIGN(8) diff --git a/src/platform/cannonlake/cannonlake.x.in b/src/platform/cannonlake/cannonlake.x.in index 03c7916d6..b73db3983 100644 --- a/src/platform/cannonlake/cannonlake.x.in +++ b/src/platform/cannonlake/cannonlake.x.in @@ -98,6 +98,21 @@ MEMORY sof_stack : org = SOF_STACK_END, len = SOF_STACK_BASE - SOF_STACK_END + buffer_hp_heap : + org = HEAP_HP_BUFFER_BASE, + len = HEAP_HP_BUFFER_SIZE + wnd0 : + org = HP_SRAM_WIN0_BASE, + len = HP_SRAM_WIN0_SIZE + wnd1 : + org = HP_SRAM_WIN1_BASE, + len = HP_SRAM_WIN1_SIZE + wnd2 : + org = HP_SRAM_WIN2_BASE, + len = HP_SRAM_WIN2_SIZE + wnd3 : + org = HP_SRAM_WIN3_BASE, + len = HP_SRAM_WIN3_SIZE } PHDRS @@ -130,6 +145,11 @@ PHDRS runtime_heap_phdr PT_LOAD; buffer_heap_phdr PT_LOAD; sof_stack_phdr PT_LOAD; + buffer_hp_heap_phdr PT_LOAD; + wnd0_phdr PT_LOAD; + wnd1_phdr PT_LOAD; + wnd2_phdr PT_LOAD; + wnd3_phdr PT_LOAD; } /* Default entry point: */ @@ -166,6 +186,46 @@ SECTIONS _MemoryExceptionVector_text_end = ABSOLUTE(.); } >vector_memory_text :vector_memory_text_phdr + .buffer_hp_heap (NOLOAD) : ALIGN(8) + { + . = ALIGN (32); + _buffer_hp_heap_start = ABSOLUTE(.); + . = . + HEAP_HP_BUFFER_SIZE; + _buffer_hp_heap_end = ABSOLUTE(.); + } >buffer_hp_heap :buffer_hp_heap_phdr + + .wnd0 (NOLOAD) : ALIGN(8) + { + . = ALIGN (32); + _wnd0_start = ABSOLUTE(.); + . = . + HP_SRAM_WIN0_SIZE; + _wnd0_end = ABSOLUTE(.); + } >wnd0 :wnd0_phdr + + .wnd1 (NOLOAD) : ALIGN(8) + { + . = ALIGN (32); + _wnd1_start = ABSOLUTE(.); + . = . + HP_SRAM_WIN1_SIZE; + _wnd1_end = ABSOLUTE(.); + } >wnd1 :wnd1_phdr + + .wnd2 (NOLOAD) : ALIGN(8) + { + . = ALIGN (32); + _wnd2_start = ABSOLUTE(.); + . = . + HP_SRAM_WIN2_SIZE; + _wnd2_end = ABSOLUTE(.); + } >wnd2 :wnd2_phdr + + .wnd3 (NOLOAD) : ALIGN(8) + { + . = ALIGN (32); + _wnd3_start = ABSOLUTE(.); + . = . + HP_SRAM_WIN3_SIZE; + _wnd3_end = ABSOLUTE(.); + } >wnd3 :wnd3_phdr + .WindowVectors.text : ALIGN(4) { _WindowVectors_text_start = ABSOLUTE(.); @@ -489,9 +549,9 @@ SECTIONS .buffer_heap (NOLOAD) : ALIGN(8) { . = ALIGN (32); - _system_heap_start = ABSOLUTE(.); + _buffer_heap_start = ABSOLUTE(.); . = . + HEAP_BUFFER_SIZE; - _system_heap_end = ABSOLUTE(.); + _buffer_heap_end = ABSOLUTE(.); } >buffer_heap :buffer_heap_phdr .sof_stack (NOLOAD) : ALIGN(8) diff --git a/src/platform/icelake/icelake.x.in b/src/platform/icelake/icelake.x.in index 0d76fa106..35847c5fd 100644 --- a/src/platform/icelake/icelake.x.in +++ b/src/platform/icelake/icelake.x.in @@ -98,6 +98,21 @@ MEMORY sof_stack : org = SOF_STACK_END, len = SOF_STACK_BASE - SOF_STACK_END + buffer_hp_heap : + org = HEAP_HP_BUFFER_BASE, + len = HEAP_HP_BUFFER_SIZE + wnd0 : + org = HP_SRAM_WIN0_BASE, + len = HP_SRAM_WIN0_SIZE + wnd1 : + org = HP_SRAM_WIN1_BASE, + len = HP_SRAM_WIN1_SIZE + wnd2 : + org = HP_SRAM_WIN2_BASE, + len = HP_SRAM_WIN2_SIZE + wnd3 : + org = HP_SRAM_WIN3_BASE, + len = HP_SRAM_WIN3_SIZE } PHDRS @@ -130,6 +145,11 @@ PHDRS runtime_heap_phdr PT_LOAD; buffer_heap_phdr PT_LOAD; sof_stack_phdr PT_LOAD; + buffer_hp_heap_phdr PT_LOAD; + wnd0_phdr PT_LOAD; + wnd1_phdr PT_LOAD; + wnd2_phdr PT_LOAD; + wnd3_phdr PT_LOAD; } /* Default entry point: */ @@ -166,6 +186,46 @@ SECTIONS _MemoryExceptionVector_text_end = ABSOLUTE(.); } >vector_memory_text :vector_memory_text_phdr + .buffer_hp_heap (NOLOAD) : ALIGN(8) + { + . = ALIGN (32); + _buffer_hp_heap_start = ABSOLUTE(.); + . = . + HEAP_HP_BUFFER_SIZE; + _buffer_hp_heap_end = ABSOLUTE(.); + } >buffer_hp_heap :buffer_hp_heap_phdr + + .wnd0 (NOLOAD) : ALIGN(8) + { + . = ALIGN (32); + _wnd0_start = ABSOLUTE(.); + . = . + HP_SRAM_WIN0_SIZE; + _wnd0_end = ABSOLUTE(.); + } >wnd0 :wnd0_phdr + + .wnd1 (NOLOAD) : ALIGN(8) + { + . = ALIGN (32); + _wnd1_start = ABSOLUTE(.); + . = . + HP_SRAM_WIN1_SIZE; + _wnd1_end = ABSOLUTE(.); + } >wnd1 :wnd1_phdr + + .wnd2 (NOLOAD) : ALIGN(8) + { + . = ALIGN (32); + _wnd2_start = ABSOLUTE(.); + . = . + HP_SRAM_WIN2_SIZE; + _wnd2_end = ABSOLUTE(.); + } >wnd2 :wnd2_phdr + + .wnd3 (NOLOAD) : ALIGN(8) + { + . = ALIGN (32); + _wnd3_start = ABSOLUTE(.); + . = . + HP_SRAM_WIN3_SIZE; + _wnd3_end = ABSOLUTE(.); + } >wnd3 :wnd3_phdr + .WindowVectors.text : ALIGN(4) { _WindowVectors_text_start = ABSOLUTE(.); @@ -489,9 +549,9 @@ SECTIONS .buffer_heap (NOLOAD) : ALIGN(8) { . = ALIGN (32); - _system_heap_start = ABSOLUTE(.); + _buffer_heap_start = ABSOLUTE(.); . = . + HEAP_BUFFER_SIZE; - _system_heap_end = ABSOLUTE(.); + _buffer_heap_end = ABSOLUTE(.); } >buffer_heap :buffer_heap_phdr .sof_stack (NOLOAD) : ALIGN(8)