Registered User m (→Boot time) |
Registered User mNo edit summary Tag: 2017 source edit |
||
(25 intermediate revisions by 5 users not shown) | |||
Line 1: | Line 1: | ||
<noinclude>{{ApplicableFor | |||
|MPUs list=STM32MP15x | |||
|MPUs checklist=STM32MP13x, STM32MP15x, STM32MP25x | |||
}}</noinclude> | |||
==Article purpose== | ==Article purpose== | ||
The purpose of this article is to: | The purpose of this article is to: | ||
* briefly introduce the Arm<sup>®</sup> Cortex<sup>®</sup>-M4 core and its main features | * briefly introduce the Arm<sup>®</sup> Cortex<sup>®</sup>-M4 core and its main features, | ||
* indicate the | * indicate the peripheral management at boot time and at runtime (including whether it can be managed by the secure contexts), | ||
* list the software frameworks and drivers managing the peripheral, | |||
==Peripheral overview== | ==Peripheral overview== | ||
The Arm Cortex-M4 is seen as a coprocessor on [[STM32MP15 microprocessor | STM32MP15]], where the [[Arm Cortex-A7]] is the main processor that controls it. The Cortex-M4 is present across all the [[STM32MP15_microprocessor#STM32MP15x_lines | STM32MP15x lines]]. | The '''Arm Cortex-M4''' is seen as a coprocessor on [[STM32MP15 microprocessor | STM32MP15]], where the [[Arm Cortex-A7]] is the main processor that controls it. The Cortex-M4 is present across all the [[STM32MP15_microprocessor#STM32MP15x_lines | STM32MP15x lines]]. | ||
The Cortex-M4 is a Armv7E-M 32-bit processor. The Armv7E-M architecture corresponds to the Armv7-M architecture, with DSP extension. Among a wide range of features, it includes a memory protection unit (MPU) and a single-precision floating point unit (FPU). | |||
The Cortex-M4 '''does not''' support secure mode: it only supports a non-secure mode that defines the Cortex-M4 non-secure [[:Category:STM32_MPU_microprocessor_devices#Hardware_execution_contexts | hardware execution context]]. | |||
Refer to the [[STM32MP15 resources#Reference manuals|STM32MP15 reference manuals]] for the complete list of features, and to the software frameworks and drivers, introduced below, to see which features are implemented. | |||
==Peripheral usage== | |||
=== | ===Boot time assignment=== | ||
The Cortex-M4 | The Cortex-M4 can be startup at boot time by U-Boot SSBL ([[boot chain overview |see boot chain]]) , as explained in the [[How to start the coprocessor from the bootloader]] article. | ||
Thanks to a specific [[STM32 MPU OP-TEE_overview | OP-TEE trusted application (TA)]] running on the [[Security_overview | Arm<sup>®</sup> TrustZone]] and to the [[ETZPC_internal_peripheral | ETZPC peripheral]], it is possible to authenticate the Cortex<sup>®</sup>-M4 firmware and install it on isolated MCU RAM to ensure its integrity during the execution. For details, please refer to [[How_to_protect_the_coprocessor_firmware]] article. | |||
{{#lst:STM32MP1_internal_peripherals_assignment_table_template|stm32mp1_boottime}} | |||
<section begin=stm32mp15_boottime /> | |||
| rowspan="1" | Core/Processors | |||
| rowspan="1" | [[Arm_Cortex-M4|Cortex-M4]] | |||
| Cortex-M4 | |||
| | |||
| | |||
| <span title="assignable peripheral" style="font-size:21px">☐</span> | |||
| [[How to start the coprocessor from the bootloader]] <br>[[How_to_protect_the_coprocessor_firmware]] | |||
|- | |||
<section end=stm32mp15_boottime /> | |||
|} | |||
== | ===Runtime assignment=== | ||
The Cortex-M4 can be started and stopped at runtime by the [[ Linux remoteproc framework overview| Linux remoteproc framework]]. | |||
Thanks to a specific [[STM32 MPU OP-TEE_overview | OP-TEE trusted application (TA)]] running on the [[Security_overview | Arm<sup>®</sup> TrustZone]] and to the [[ETZPC_internal_peripheral | ETZPC peripheral]], it is possible to authenticate the Cortex-M4 firmware and to install it on isolated MCU RAM to ensure its integrity during the execution. For details, please refer to [[How_to_protect_the_coprocessor_firmware]] article. | |||
Once started, the Cortex-M4 executes the [[STM32CubeMP15 Package architecture | STM32CubeMP1]] firmware, which controls the Cortex-M4 internal resources (MPU, WFI,...) | |||
{{#lst:STM32MP1_internal_peripherals_assignment_table_template|stm32mp15_runtime}} | |||
<section begin=stm32mp15_runtime /> | |||
| rowspan="1" | Core/Processors | |||
| rowspan="1" | [[Arm_Cortex-M4|Cortex-M4]] | |||
| Cortex-M4 | |||
| <span title="assignable peripheral" style="font-size:21px">☐</span> | |||
| <span title="assignable peripheral" style="font-size:21px">☐</span> | |||
| <span title="system peripheral" style="font-size:21px">✓</span> | |||
| Controlled by [[ Linux remoteproc framework overview| LInux ]] or [[STM32 MPU OP-TEE_overview | OP-TEE]]. <br> Running the [[STM32CubeMP15 Package architecture | STM32CubeMP1]] firmware. | |||
|- | |||
<section end=stm32mp15_runtime /> | |||
|} | |||
== | ==Software frameworks and drivers== | ||
Below are listed the software frameworks and drivers managing the Cortex-M4 for the embedded software components listed in the above tables. | |||
* The Cortex-M4 runs applications developed using to the [[STM32CubeMP15 Package architecture | STM32CubeMP1]] distribution package. | |||
The Cortex-M4 runs the [[ | * The Cortex-M4 can be startup at boot time or at runtime, with or without firmware authentication, using the remoteproc frameworks available in different components of the [[OpenSTLinux architecture overview | OpenSTLinux]] distribution: | ||
:* '''Linux<sup>®</sup>''': [[ Linux remoteproc framework overview| Linux remoteproc framework]] | |||
The Cortex-M4 | :* '''U-Boot''': {{CodeSource | U-Boot | drivers/remoteproc }} | ||
:* '''OP-TEE''': [[How_to_protect_the_coprocessor_firmware#Code_source | OP-TEE remoteproc source code]] | |||
* The Cortex-M4 operates as a coprocessor, either autonomously as any external microcontroller, or communicating with the main processor (Cortex-A7) via the [[Linux RPMsg framework overview|RPMsg]] communication pipe. | |||
== | ==How to assign and configure the peripheral== | ||
Two steps to configure the Cortex-M4 and the [[How to assign an internal peripheral to an execution context | peripherals assigned]] to it: | |||
# As the main processor of the system, the Cortex-A7 (running [[OpenSTLinux architecture overview |OpenSTLinux]] distribution) first takes care of the initialization of all system resources: supplies, clock tree, and so on. | # As the main processor of the system, the Cortex-A7 (running [[OpenSTLinux architecture overview |OpenSTLinux]] distribution) first takes care of the initialization of all system resources: supplies, clock tree, and so on. | ||
# The [[ | # The [[STM32CubeMP15 Package architecture | STM32CubeMP1]] package then takes care of all the Cortex-M4 local configuration (NVIC, MPU, and so on). It can rely on the [[Resource_manager_for_coprocessing | resource manager]] to modify system resources without interfering with the Cortex-A7. | ||
==How to go further== | ==How to go further== | ||
Line 59: | Line 82: | ||
<noinclude> | <noinclude> | ||
[[Category:Arm processors]] | |||
{{ArticleBasedOnModel | Internal peripheral article model}} | {{ArticleBasedOnModel | Internal peripheral article model}} | ||
{{PublicationRequestId | 19286 | 2021-03-10 | }} | {{PublicationRequestId | 19286 | 2021-03-10 | }} | ||
<noinclude> | </noinclude> |
Latest revision as of 15:06, 25 July 2024
1. Article purpose
The purpose of this article is to:
- briefly introduce the Arm® Cortex®-M4 core and its main features,
- indicate the peripheral management at boot time and at runtime (including whether it can be managed by the secure contexts),
- list the software frameworks and drivers managing the peripheral,
2. Peripheral overview
The Arm Cortex-M4 is seen as a coprocessor on STM32MP15, where the Arm Cortex-A7 is the main processor that controls it. The Cortex-M4 is present across all the STM32MP15x lines.
The Cortex-M4 is a Armv7E-M 32-bit processor. The Armv7E-M architecture corresponds to the Armv7-M architecture, with DSP extension. Among a wide range of features, it includes a memory protection unit (MPU) and a single-precision floating point unit (FPU).
The Cortex-M4 does not support secure mode: it only supports a non-secure mode that defines the Cortex-M4 non-secure hardware execution context.
Refer to the STM32MP15 reference manuals for the complete list of features, and to the software frameworks and drivers, introduced below, to see which features are implemented.
3. Peripheral usage
3.1. Boot time assignment
The Cortex-M4 can be startup at boot time by U-Boot SSBL (see boot chain) , as explained in the How to start the coprocessor from the bootloader article.
Thanks to a specific OP-TEE trusted application (TA) running on the Arm® TrustZone and to the ETZPC peripheral, it is possible to authenticate the Cortex®-M4 firmware and install it on isolated MCU RAM to ensure its integrity during the execution. For details, please refer to How_to_protect_the_coprocessor_firmware article.
Click on to expand or collapse the legend...
Domain | Peripheral | Boot time allocation | Comment ![]() | |||
---|---|---|---|---|---|---|
Instance | Cortex-A7 secure (ROM code) |
Cortex-A7 secure (TF-A BL2) |
Cortex-A7 non-secure (U-Boot) | |||
Core/Processors | Cortex-M4 | Cortex-M4 | ☐ | How to start the coprocessor from the bootloader How_to_protect_the_coprocessor_firmware |
3.2. Runtime assignment
The Cortex-M4 can be started and stopped at runtime by the Linux remoteproc framework.
Thanks to a specific OP-TEE trusted application (TA) running on the Arm® TrustZone and to the ETZPC peripheral, it is possible to authenticate the Cortex-M4 firmware and to install it on isolated MCU RAM to ensure its integrity during the execution. For details, please refer to How_to_protect_the_coprocessor_firmware article.
Once started, the Cortex-M4 executes the STM32CubeMP1 firmware, which controls the Cortex-M4 internal resources (MPU, WFI,...)
Click on to expand or collapse the legend...
Domain | Peripheral | Runtime allocation | Comment ![]() | |||
---|---|---|---|---|---|---|
Instance | Cortex-A7 secure (OP-TEE) |
Cortex-A7 non-secure (Linux) |
Cortex-M4 (STM32Cube) | |||
Core/Processors | Cortex-M4 | Cortex-M4 | ☐ | ☐ | ✓ | Controlled by LInux or OP-TEE. Running the STM32CubeMP1 firmware. |
4. Software frameworks and drivers
Below are listed the software frameworks and drivers managing the Cortex-M4 for the embedded software components listed in the above tables.
- The Cortex-M4 runs applications developed using to the STM32CubeMP1 distribution package.
- The Cortex-M4 can be startup at boot time or at runtime, with or without firmware authentication, using the remoteproc frameworks available in different components of the OpenSTLinux distribution:
- Linux®: Linux remoteproc framework
- U-Boot: drivers/remoteproc
- OP-TEE: OP-TEE remoteproc source code
- The Cortex-M4 operates as a coprocessor, either autonomously as any external microcontroller, or communicating with the main processor (Cortex-A7) via the RPMsg communication pipe.
5. How to assign and configure the peripheral
Two steps to configure the Cortex-M4 and the peripherals assigned to it:
- As the main processor of the system, the Cortex-A7 (running OpenSTLinux distribution) first takes care of the initialization of all system resources: supplies, clock tree, and so on.
- The STM32CubeMP1 package then takes care of all the Cortex-M4 local configuration (NVIC, MPU, and so on). It can rely on the resource manager to modify system resources without interfering with the Cortex-A7.
6. How to go further
Refer to the Arm website[1] for more detailed information on this core.
7. References