From 152532f556f85cb94645e71ab49974373c5fe7fe Mon Sep 17 00:00:00 2001 From: Nicolas Granger Date: Mon, 19 Jun 2023 15:20:35 +0200 Subject: [PATCH 1/2] soc: stm32: add mmio memory region We need to declare the shared memory region. Signed-off-by: Nicolas Granger --- soc/arm/st_stm32/stm32mp1/linker.ld | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/soc/arm/st_stm32/stm32mp1/linker.ld b/soc/arm/st_stm32/stm32mp1/linker.ld index 1ff5da841e5946..d99a8067d1f724 100644 --- a/soc/arm/st_stm32/stm32mp1/linker.ld +++ b/soc/arm/st_stm32/stm32mp1/linker.ld @@ -9,8 +9,16 @@ #include +MEMORY +{ + LINKER_DT_REGIONS() + + /* Used by and documented in include/linker/intlist.ld */ + MMIO_REGION (wx) : ORIGIN = 0x10050000, LENGTH = 2K +} + SECTIONS - { +{ #include #ifdef CONFIG_OPENAMP_RSC_TABLE @@ -18,6 +26,11 @@ SECTIONS SECTION_PROLOGUE(.resource_table,, SUBALIGN(4)) { KEEP(*(.resource_table*)) - } GROUP_LINK_IN(ROMABLE_REGION) + } GROUP_LINK_IN(ROMABLE_REGION) #endif + + SECTION_PROLOGUE(.mmio_table,, SUBALIGN(4)) + { + KEEP(*(.mmio_table*)) + } GROUP_LINK_IN(MMIO_REGION) } From 2dbf1dc0bbac04937ee34a5dd702f9d86744546a Mon Sep 17 00:00:00 2001 From: Nicolas Granger Date: Thu, 27 Jul 2023 08:26:36 +0200 Subject: [PATCH 2/2] Linker: Use the real size for the MMIO region It was working with 2k but in practice we are declaring 32k everywhere. And 2k is not enough for both vrings and dma buffers. Signed-off-by: Nicolas Granger --- soc/arm/st_stm32/stm32mp1/linker.ld | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/soc/arm/st_stm32/stm32mp1/linker.ld b/soc/arm/st_stm32/stm32mp1/linker.ld index d99a8067d1f724..0d713918709526 100644 --- a/soc/arm/st_stm32/stm32mp1/linker.ld +++ b/soc/arm/st_stm32/stm32mp1/linker.ld @@ -14,7 +14,7 @@ MEMORY LINKER_DT_REGIONS() /* Used by and documented in include/linker/intlist.ld */ - MMIO_REGION (wx) : ORIGIN = 0x10050000, LENGTH = 2K + MMIO_REGION (wx) : ORIGIN = 0x10050000, LENGTH = 32K } SECTIONS