From 3b12451be19f034d23a2c24dec67bacc26480794 Mon Sep 17 00:00:00 2001 From: Laurentiu Mihalcea Date: Mon, 19 Aug 2024 13:53:58 +0300 Subject: [PATCH] platform: imx93_a55: handle linker additions at SOF level SOF requires some additions to the Zephyr linker script. This should be handled inside SOF instead of Zephyr. Since 3f2790b89ca5 ("soc: imx93: remove custom linker script") removes the custom linker script from Zephyr, this means the custom SOF linker sections will have to be handled on SOF side. This also includes a Zephyr hash bump to 3f2790b89ca5, which brings the following (potentially) relevant patches: dc5f1bfb3f2e west: fix for Python prior to 3.10 3f2790b89ca5 soc: imx9: remove custom linker script d389c95935c5 soc: intel_adsp: ace: Configurable SRAM retention mode and cleanup be041b14fe51 Intel: ADSP: move HPSRAM mask into assembly b3b8360f3993 west: runners: Add `west rtt` command with pyocd implementation Signed-off-by: Laurentiu Mihalcea --- src/platform/imx93_a55/linker/data-sections.ld | 15 +++++++++++++++ src/platform/imx93_a55/linker/rwdata.ld | 3 +++ west.yml | 2 +- zephyr/CMakeLists.txt | 8 ++++++++ 4 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 src/platform/imx93_a55/linker/data-sections.ld create mode 100644 src/platform/imx93_a55/linker/rwdata.ld diff --git a/src/platform/imx93_a55/linker/data-sections.ld b/src/platform/imx93_a55/linker/data-sections.ld new file mode 100644 index 000000000000..9efabbbb2aa9 --- /dev/null +++ b/src/platform/imx93_a55/linker/data-sections.ld @@ -0,0 +1,15 @@ +SECTION_PROLOGUE(.static_uuid_entries,,) +{ + *(*.static_uuids) +} GROUP_ROM_LINK_IN(RAMABLE_REGION, ROMABLE_REGION) + +SECTION_PROLOGUE(.static_log_entries,,) +{ + *(*.static_log*) +} GROUP_ROM_LINK_IN(RAMABLE_REGION, ROMABLE_REGION) + +SECTION_PROLOGUE(.fw_metadata,,) +{ + KEEP (*(*.fw_metadata)) + . = ALIGN(16); +} GROUP_ROM_LINK_IN(RAMABLE_REGION, ROMABLE_REGION) diff --git a/src/platform/imx93_a55/linker/rwdata.ld b/src/platform/imx93_a55/linker/rwdata.ld new file mode 100644 index 000000000000..2692c40dfbf6 --- /dev/null +++ b/src/platform/imx93_a55/linker/rwdata.ld @@ -0,0 +1,3 @@ +_trace_ctx_start = ABSOLUTE(.); +*(.trace_ctx) +_trace_ctx_end = ABSOLUTE(.); diff --git a/west.yml b/west.yml index e2f9502251c8..2f40c4ba040d 100644 --- a/west.yml +++ b/west.yml @@ -43,7 +43,7 @@ manifest: - name: zephyr repo-path: zephyr - revision: 689d1edee1d57f052b1d4572d67618c0b0e2b8a4 + revision: dc5f1bfb3f2eee3e3775175232d508660f5d6efe remote: zephyrproject # Import some projects listed in zephyr/west.yml@revision diff --git a/zephyr/CMakeLists.txt b/zephyr/CMakeLists.txt index 54b979f6853b..5fe2a32c73b0 100644 --- a/zephyr/CMakeLists.txt +++ b/zephyr/CMakeLists.txt @@ -393,6 +393,14 @@ if (CONFIG_SOC_MIMX9352_A55) ${SOF_SRC_PATH}/schedule/zephyr_ll.c ) + # SOF-specific linker script additions + zephyr_linker_sources(RWDATA + ${sof_top_dir}/src/platform/imx93_a55/linker/rwdata.ld + ) + zephyr_linker_sources(DATA_SECTIONS + ${sof_top_dir}/src/platform/imx93_a55/linker/data-sections.ld + ) + set(PLATFORM "imx93_a55") endif()