Registered User mNo edit summary |
Registered User No edit summary |
||
(6 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{ApplicableFor | |||
|MPUs list=STM32MP13x, STM32MP15x | |MPUs list=STM32MP13x, STM32MP15x, STM32MP21x, STM32MP23x, STM32MP25x | ||
|MPUs checklist=STM32MP13x, STM32MP15x | |MPUs checklist=STM32MP13x, STM32MP15x, STM32MP21x, STM32MP23x, STM32MP25x | ||
}}</noinclude> | }} | ||
<noinclude></noinclude> | |||
== Article purpose == | == Article purpose == | ||
The '''Reserved-memory''' mechanism<ref>https://www.kernel.org/doc/Documentation/devicetree/bindings/reserved-memory/reserved-memory. | The '''Reserved-memory''' mechanism<ref>https://www.kernel.org/doc/Documentation/devicetree/bindings/reserved-memory/reserved-memory.yaml</ref> allows reserving memory regions in the kernel. This mechanism is used by drivers to allocate buffers in specific memory regions (such as internal SRAM) or to get a dedicated memory pool that will not be managed by Linux<sup>®</sup> conventionnal memory allocator (in DDR).<br /> | ||
== Use cases == | == Use cases == | ||
In OpenSTLinux, the '''reserved-memory''' is used: | In OpenSTLinux, the '''reserved-memory''' is used: | ||
* On {{MicroprocessorDevice | device=1}} by: | * On '''{{MicroprocessorDevice | device=1}}''' by: | ||
:* the [[Dmaengine overview|dmaengine driver]] to reserve the region where [[DMA internal peripheral|DMA]] buffers are allocated, typically in internal SRAM ([[STM32MP13 SRAM internal memory|STM32MP13 SRAM]] or [[STM32MP15 MCU SRAM internal memory|STM32MP15 MCU SRAM]]). | :* the [[Dmaengine overview|dmaengine driver]] to reserve the region where [[DMA internal peripheral|DMA]] buffers are allocated, typically in internal SRAM ([[STM32MP13 SRAM internal memory|STM32MP13 SRAM]] or [[STM32MP15 MCU SRAM internal memory|STM32MP15 MCU SRAM]]). | ||
* On {{MicroprocessorDevice | device=15}} by: | * On '''{{MicroprocessorDevice | device=15}}''' by: | ||
:* the [[Linux remoteproc framework overview|remoteproc driver]] to reserve the regions in [[RETRAM internal memory|RETRAM]] and [[STM32MP15 MCU SRAM internal memory|MCU SRAM]] where the coprocessor firmware will be loaded. | :* the [[Linux remoteproc framework overview|remoteproc driver]] to reserve the regions in [[RETRAM internal memory|RETRAM]] and [[STM32MP15 MCU SRAM internal memory|MCU SRAM]] where the coprocessor firmware will be loaded. | ||
:* the [[Linux_RPMsg_framework_overview|RPMsg driver]] to reserve the region where [[Linux RPMsg framework overview|RPMsg]] buffers used for interprocess communication with the coprocessor, are allocated, typically [[STM32MP15 MCU SRAM internal memory|MCU SRAM]]. | :* the [[Linux_RPMsg_framework_overview|RPMsg driver]] to reserve the region where [[Linux RPMsg framework overview|RPMsg]] buffers used for interprocess communication with the coprocessor, are allocated, typically [[STM32MP15 MCU SRAM internal memory|MCU SRAM]]. | ||
:* the Vivante Gcnano driver to reserve the region where the GPU working memory is allocated, typically the [[DDRCTRL and DDRPHYC internal peripherals|DDR]]. | |||
* On '''{{MicroprocessorDevice | device=2}}''' by: | |||
:* the [[Dmaengine overview|dmaengine driver]] to reserve the region where [[DMA internal peripheral|DMA]] buffers are allocated, typically in internal [[STM32MP2 SRAM internal memory|STM32MP2 SRAM]]. | |||
:* the [[Linux remoteproc framework overview|remoteproc driver]] to reserve the regions in [[RETRAM internal memory|RETRAM]] and [[STM32MP2 SRAM internal memory|SRAM]] where the coprocessor firmware will be loaded. | |||
:* the [[Linux_RPMsg_framework_overview|RPMsg driver]] to reserve the region where [[Linux RPMsg framework overview|RPMsg]] buffers used for interprocess communication with the coprocessor, are allocated, typically [[STM32MP2 SRAM internal memory|SRAM]]. | |||
:* the LTDC driver, see [[DRM KMS overview|DRM KMS overview]]. | |||
* On '''{{MicroprocessorDevice | device=23}}''' and '''{{MicroprocessorDevice | device=25}}''' by: | |||
:* the Vivante Gcnano driver to reserve the region where the GPU working memory is allocated, typically the [[DDRCTRL and DDRPHYC internal peripherals|DDR]]. | :* the Vivante Gcnano driver to reserve the region where the GPU working memory is allocated, typically the [[DDRCTRL and DDRPHYC internal peripherals|DDR]]. | ||
Latest revision as of 15:46, 15 October 2024
1. Article purpose[edit | edit source]
The Reserved-memory mechanism[1] allows reserving memory regions in the kernel. This mechanism is used by drivers to allocate buffers in specific memory regions (such as internal SRAM) or to get a dedicated memory pool that will not be managed by Linux® conventionnal memory allocator (in DDR).
2. Use cases[edit | edit source]
In OpenSTLinux, the reserved-memory is used:
- On STM32MP1 Series by:
- the dmaengine driver to reserve the region where DMA buffers are allocated, typically in internal SRAM (STM32MP13 SRAM or STM32MP15 MCU SRAM).
- the remoteproc driver to reserve the regions in RETRAM and MCU SRAM where the coprocessor firmware will be loaded.
- the RPMsg driver to reserve the region where RPMsg buffers used for interprocess communication with the coprocessor, are allocated, typically MCU SRAM.
- the Vivante Gcnano driver to reserve the region where the GPU working memory is allocated, typically the DDR.
- On STM32MP2 unknown microprocessor device by:
- the dmaengine driver to reserve the region where DMA buffers are allocated, typically in internal STM32MP2 SRAM.
- the remoteproc driver to reserve the regions in RETRAM and SRAM where the coprocessor firmware will be loaded.
- the RPMsg driver to reserve the region where RPMsg buffers used for interprocess communication with the coprocessor, are allocated, typically SRAM.
- the LTDC driver, see DRM KMS overview.
- On STM32MP23 unknown microprocessor device and STM32MP25 unknown microprocessor device by:
- the Vivante Gcnano driver to reserve the region where the GPU working memory is allocated, typically the DDR.
3. References[edit | edit source]