Difference between revisions of "Coprocessor management overview"

[quality revision] [quality revision]
m
 
m
 

Template:ArticleMainWriter Template:ArticleApprovedVersion

SUMMARY
Applicable for STM32MP15x lines

This article provides an overview of the management of the heterogeneous asymmetric architecture implemented in the STM32 MPU microprocessor family. It provides information on mechanisms put in place to help developers to design software in the multiprocessor system.

1 System overview[edit]

The STM32 MPU multiprocessor system allows to run independent firmware firmwares on each CPU core. The below subsystems are involved in the management of the coexistence of the 2 two CPU subsystems:

  • A Master CPU core is a general purpose Arm® Cortex®-A processor. It is acting as main processor and optimized to run the Linux® based OS.
  • A Slave (or coprocessor) MCU core is a general-purpose Arm® Cortex®-M processor. It coprocessor which can run the RTOS optimized for microcontrollers or a bare-metal application.
  • Internal memory regions. The memory with access is granted for both the master and/or the slave processors:
    • To load and execute coprocessor firmware and define static common structures.
    • To share buffers for inter processing communication through a messaging infrastructure.
  • An Inter ProCessor Controller inter-processor communication controller peripheral allowing a signaling system by a dedicated mailbox.
  • Internal peripheral resources that can be assigned to the master or the slave processor.

Copro-hw-overview.png

2 Functional features and design[edit]

In order to manage the coprocessor system, a list of services is proposed relying on the open-source RemoteProc and RPMsg frameworks: . These frameworks are introduced in chapters below with links to dedicated articles for further explanation.

Copro-sw-overview.png

2.1 Load and control the Cortex-M firmware[edit]

The Linux OS integrates the RemoteProc framework that allows to load firmware and control remote processors.

2.2 Resources management (for shared peripheral, clocks, GPIOs...)

To manage the resource allocation conflicts in multiprocessing system, the Resources management proposes some

[edit]

The resource manager proposes services to manage common resources and avoid any conflict.

  • Peripheral assignment request: the mechanism used to ensure that a peripheral is reserved for a processor usage. The principle is that a firmware requests the peripheral before starting to use it,
rely
  • Coprocessor resource configuration set: services available in the main processor (Cortex-A running Linux) to configure the system resources needed to operate the peripheral on the coprocessor. The service is implemented by rproc_srm driver.

2.3 Inter processor communication[edit]

Inter processor communication is based on RPMsg framework and Mailbox mechanisms.

Copro-sw-ipc-overview.png

  • On Cortex-A:
  • The RemoteProc framework is in charge of enabling the IPC on Linux side, based on information available in the firmware resource table.
  • The RPMsg service is implemented by the RPMsg framework.
  • The Mailbox service is implemented by the stm32_ipcc mailbox
framework
  • driver.
  • On Cortex-M:
  • The RPMsg service is implemented by the OpenAMP library .
  • The Mailbox service is implemented by the HAL_IPCC driver.

Copro-sw-overview.png


<noinclude>

{{ArticleMainWriter | ArnaudP}}
{{ArticleApprovedVersion | ArnaudP | FabienD(Passed 05Nov18), GeraldB(Not Done), LoicP(Not Done)|  14Mar'18 | AlainF - 28Nov'18 - 9717 | 06Dec'18}} 

[[Category:Coprocessor management Linux]]
[[Category:Coprocessor management STM32Cube]]</noinclude>


'''SUMMARY '''<br>
{{ApplicableFor
|MPUs list=STM32MP15x
|MPUs checklist=STM32MP13x, STM32MP15x
}}</noinclude>
This article provides an overview of the management of the heterogeneous asymmetric architecture implemented in the STM32 MPU microprocessor family. It provides information on mechanisms put in place to help developers to design software in the multiprocessor system.

== System overview==
The STM32 MPU multiprocessor system allows to run independent firmwarefirmwares on each CPU core. The below subsystems are involved in the management of the coexistence of the 2two CPU subsystems:
* A Master CPU core is a general purpose  Arm<sup>&reg;</sup> Cortex<sup>&reg;</sup>-A processor. It is acting as main processor and optimized to run the Linux<sup>&reg;</sup> based OS.
* A Slave (or coprocessor) MCU core is a general-purpose Arm<sup>&reg;</sup> Cortex<sup>&reg;</sup>-M processor. Itcoprocessor which can run the RTOS optimized for microcontrollers or a bare-metal application.
* [[STM32MP15_RAM_mapping#Memory_mapping| Internal memory regions]]. The memory access is  with access granted for both the master and /or the slave processors: 
** To load and execute coprocessor firmware and define static common structures.
** To share buffers for inter processing communication through a messaging infrastructure.
* [[IPCC internal peripheral| An Inter ProCessor Controllerinter-processor communication controller peripheral]] allowing a signaling system by a dedicated mailbox.
* [[STM32MP15 peripherals overview | Internal peripheral resources]] that can be assigned to the master or the slave processor.

[[File:copro-hw-overview.png|link=]]

==Functional features and design==
In order to manage the coprocessor system, a list of services is proposed relying on the open-source '''RemoteProc''' and '''RPMsg''' frameworks:

* '''Load and control Cortex-M firmware'''
:.
These frameworks are introduced in chapters below with links to dedicated articles for further explanation.

[[File:copro-sw-overview.png|800px|link=]]

===Load and control the Cortex-M firmware===The Linux OS integrates the[[Linux remoteproc framework overview | RemoteProc]] framework that allows to load firmware and control remote processors. 
* '''===Resources management (for shared peripheral, clocks, GPIOs...)'''
:To manage the resource allocation conflicts in multiprocessing system, the ===
The [[Resource_manager_for_coprocessing | Resources managementresource manager]] proposes some services to manage common resources.
: and avoid any conflict.* '''Peripheral assignment request''': the mechanism used to ensure that a peripheral is reserved for a processor usage. The principle is that a firmware requests the peripheral before starting to use it, relyrelying on the [[ETZPC table. 
::_internal_peripheral| ETZPC]] table. 
:* On Cortex-A: At boot time, the ETZPC and Linux device tree are configured according to the [[TF-A_overview|TF-A]]<sup>&reg;</sup> device tree (refer to [[How to assign an internal peripheral to a runtime context]] for details).
::* On Cortex-M: the service is implemented by the '''Resource manager''' utilities.
:* '''Coprocessor resource configuration set''': services available in the main processor (Cortex-A running Linux) to configure the system resources needed to operate the peripheral on the coprocessor. The service is implemented by '''rproc_srm''' driver.
* '''===Inter processor communication'''
:===Inter processor communication is based on '''RPMsg''' framework and '''Mailbox''' mechanisms.:*On Cortex-A:
::

[[File:copro-sw-ipc-overview.png|800px|link=]]

*On Cortex-A:
:* The [[Linux remoteproc framework overview | RemoteProc]] framework is in charge of enabling the IPC on Linux side, based on information available in the firmware [[Coprocessor_resource_table | resource table]]. 
::* The RPMsg service is implemented by the [[Linux RPMsg framework overview| RPMsg]] framework.
::* The Mailbox service is implemented by the [[Linux Mailbox framework overview| stm32_ipcc mailbox]] framework.

: ]] driver.
*On Cortex-M:
::* The RPMsg service is implemented by the [httphttps://www.multicore-associationopenampproject.org/workgroup/oamp.php OpenAMP] library .
:: OpenAMP] library .
:* The Mailbox service is implemented by the HAL_IPCC driver.
[[File:copro-sw-overview.png|link=]]<noinclude>

[[Category:Coprocessor management Linux]]
[[Category:Coprocessor management STM32Cube]]
{{PublicationRequestId | 9717| 2018-11-28}}</noinclude>
(16 intermediate revisions by 4 users not shown)
Line 1: Line 1:
<noinclude>
+
<noinclude>{{ApplicableFor
{{ArticleMainWriter | ArnaudP}}
+
|MPUs list=STM32MP15x
{{ArticleApprovedVersion | ArnaudP | FabienD(Passed 05Nov18), GeraldB(Not Done), LoicP(Not Done)|  14Mar'18 | AlainF - 28Nov'18 - 9717 | 06Dec'18}}  
+
|MPUs checklist=STM32MP13x, STM32MP15x
 
+
}}</noinclude>
[[Category:Coprocessor management Linux]]
 
[[Category:Coprocessor management STM32Cube]]
 
</noinclude>
 
 
 
'''SUMMARY '''<br>
 
 
This article provides an overview of the management of the heterogeneous asymmetric architecture implemented in the STM32 MPU microprocessor family. It provides information on mechanisms put in place to help developers to design software in the multiprocessor system.
 
This article provides an overview of the management of the heterogeneous asymmetric architecture implemented in the STM32 MPU microprocessor family. It provides information on mechanisms put in place to help developers to design software in the multiprocessor system.
   
 
== System overview==
 
== System overview==
The STM32 MPU multiprocessor system allows to run independent firmware on each CPU core. The below subsystems are involved in the management of the coexistence of the 2 CPU subsystems:
+
The STM32 MPU multiprocessor system allows to run independent firmwares on each CPU core. The below subsystems are involved in the management of the coexistence of the two CPU subsystems:
* A Master CPU core is a general purpose Arm<sup>&reg;</sup> Cortex<sup>&reg;</sup>-A processor. It is optimized to run the Linux<sup>&reg;</sup> based OS.
+
* A Arm<sup>&reg;</sup> Cortex<sup>&reg;</sup>-A acting as main processor and optimized to run the Linux<sup>&reg;</sup> based OS.
* A Slave (or coprocessor) MCU core is a general-purpose Arm<sup>&reg;</sup> Cortex<sup>&reg;</sup>-M processor. It can run the RTOS optimized for microcontrollers or a bare-metal application.
+
* A Arm<sup>&reg;</sup> Cortex<sup>&reg;</sup>-M coprocessor which can run the RTOS optimized for microcontrollers or a bare-metal application.
* [[STM32MP15_RAM_mapping#Memory_mapping| Internal memory regions]]. The memory access is granted for both master and slave processors:  
+
* [[STM32MP15_RAM_mapping#Memory_mapping| Internal memory regions]] with access granted for both the master and/or the slave processors:  
 
** To load and execute coprocessor firmware and define static common structures.
 
** To load and execute coprocessor firmware and define static common structures.
 
** To share buffers for inter processing communication through a messaging infrastructure.
 
** To share buffers for inter processing communication through a messaging infrastructure.
* [[IPCC internal peripheral| An Inter ProCessor Controller peripheral]] allowing a signaling system by a dedicated mailbox.
+
* [[IPCC internal peripheral| An inter-processor communication controller peripheral]] allowing a signaling system by a dedicated mailbox.
 
* [[STM32MP15 peripherals overview | Internal peripheral resources]] that can be assigned to the master or the slave processor.
 
* [[STM32MP15 peripherals overview | Internal peripheral resources]] that can be assigned to the master or the slave processor.
   
Line 23: Line 18:
   
 
==Functional features and design==
 
==Functional features and design==
In order to manage the coprocessor system, a list of services is proposed relying on the open-source RemoteProc and RPMsg frameworks:
+
In order to manage the coprocessor system, a list of services is proposed relying on the open-source '''RemoteProc''' and '''RPMsg''' frameworks.
  +
These frameworks are introduced in chapters below with links to dedicated articles for further explanation.
   
* '''Load and control Cortex-M firmware'''
+
[[File:copro-sw-overview.png|800px|link=]]
:The Linux OS integrates the[[Linux remoteproc framework overview | RemoteProc]] framework that allows to load firmware and control remote processors.
 
   
* '''Resources management (shared peripheral, clocks, GPIOs...)'''
+
===Load and control the Cortex-M firmware===
:To manage the resource allocation conflicts in multiprocessing system, the [[Resource_manager_for_coprocessing | Resources management]] proposes some services to manage common resources.
+
The Linux OS integrates the[[Linux remoteproc framework overview | RemoteProc]] framework that allows to load firmware and control remote processors.  
:* '''Peripheral assignment request''': the mechanism used to ensure that a peripheral is reserved for a processor usage. The principle is that a firmware requests the peripheral before starting to use it, rely on the ETZPC table.
 
::* On Cortex-A: At boot time, the ETZPC and Linux device tree are configured according to the [[TF-A_overview|TF-A]]<sup>&reg;</sup> device tree (refer to [[How to assign an internal peripheral to a runtime context]] for details).
 
::* On Cortex-M: the service is implemented by the '''Resource manager''' utilities.
 
   
:* '''Coprocessor resource configuration set''': services available in the main processor (Cortex-A running Linux) to configure the system resources needed to operate the peripheral on the coprocessor. The service is implemented by '''rproc_srm''' driver.
+
===Resources management (for shared peripheral, clocks, GPIOs...)===
  +
The [[Resource_manager_for_coprocessing | resource manager]] proposes services to manage common resources and avoid any conflict.
  +
* '''Peripheral assignment request''': the mechanism used to ensure that a peripheral is reserved for a processor usage. The principle is that a firmware requests the peripheral before starting to use it, relying on the [[ETZPC_internal_peripheral| ETZPC]] table.
  +
:* On Cortex-A: At boot time, the ETZPC and Linux device tree are configured according to the [[TF-A_overview|TF-A]]<sup>&reg;</sup> device tree (refer to [[How to assign an internal peripheral to a runtime context]] for details).
  +
:* On Cortex-M: the service is implemented by the '''Resource manager''' utilities.
   
* '''Inter processor communication'''
+
* '''Coprocessor resource configuration set''': services available in the main processor (Cortex-A running Linux) to configure the system resources needed to operate the peripheral on the coprocessor. The service is implemented by '''rproc_srm''' driver.
:Inter processor communication is based on '''RPMsg''' framework and '''Mailbox''' mechanisms.
+
 
:*On Cortex-A:
+
===Inter processor communication===
::* The [[Linux remoteproc framework overview | RemoteProc]] framework is in charge of enabling the IPC on Linux side, based on information available in the firmware [[Coprocessor_resource_table | resource table]].  
+
Inter processor communication is based on '''RPMsg''' framework and '''Mailbox''' mechanisms.
::* The RPMsg service is implemented by the [[Linux RPMsg framework overview| RPMsg]] framework.
+
 
::* The Mailbox service is implemented by the [[Linux Mailbox framework overview|mailbox]] framework.
+
[[File:copro-sw-ipc-overview.png|800px|link=]]
  +
 
  +
*On Cortex-A:
  +
:* The [[Linux remoteproc framework overview | RemoteProc]] framework is in charge of enabling the IPC on Linux side, based on information available in the firmware [[Coprocessor_resource_table | resource table]].  
  +
:* The RPMsg service is implemented by the [[Linux RPMsg framework overview| RPMsg]] framework.
  +
:* The Mailbox service is implemented by the [[Linux Mailbox framework overview| stm32_ipcc mailbox ]] driver.
 
   
 
   
:*On Cortex-M:
+
*On Cortex-M:
::* The RPMsg service is implemented by the [http://www.multicore-association.org/workgroup/oamp.php OpenAMP] library .
+
:* The RPMsg service is implemented by the [https://www.openampproject.org OpenAMP] library .
::* The Mailbox service is implemented by the HAL_IPCC driver.
+
:* The Mailbox service is implemented by the HAL_IPCC driver.
   
[[File:copro-sw-overview.png|link=]]
+
<noinclude>
  +
[[Category:Coprocessor management Linux]]
  +
[[Category:Coprocessor management STM32Cube]]
  +
{{PublicationRequestId | 9717| 2018-11-28}}
  +
</noinclude>