Registered User mNo edit summary |
Registered User mNo edit summary |
||
Line 33: | Line 33: | ||
* On {{MicroprocessorDevice | device=13}}, [[OP-TEE overview|OP-TEE]] is default located in DDR and it jumps into [[TF-A_BL2_overview|TF-A BL2]] FSBL resident code in SYSRAM to configure the DDRCTRL and DDRPHYC | * On {{MicroprocessorDevice | device=13}}, [[OP-TEE overview|OP-TEE]] is default located in DDR and it jumps into [[TF-A_BL2_overview|TF-A BL2]] FSBL resident code in SYSRAM to configure the DDRCTRL and DDRPHYC | ||
* On {{MicroprocessorDevice | device=15}}, [[OP-TEE overview|OP-TEE]] is default located in SYSRAM so it embeds the services to configure the DDRCTRL and DDRPHYC | * On {{MicroprocessorDevice | device=15}}, [[OP-TEE overview|OP-TEE]] is default located in SYSRAM so it embeds the services to configure the DDRCTRL and DDRPHYC | ||
On Standby exit, the [[ | On Standby exit, the [[STM32 MPU ROM code overview|ROM code]] loads the [[Boot chain overview|FSBL]] that again configures the DDRCTRL and DDRPHYC before proceeding with the wake-up procedure. | ||
<br /> | <br /> | ||
The [[TZC internal peripheral|TZC]] controller configures DDR memory access. | The [[TZC internal peripheral|TZC]] controller configures DDR memory access. |
Latest revision as of 16:26, 1 February 2022
1. Article purpose[edit source]
The purpose of this article is to:
- briefly introduce the DDRCTRL and DDRPHYC peripherals and their main features
- indicate the level of security supported by those hardware blocks
- explain how they can be allocated to the runtime contexts and linked to the corresponding software components
- explain, when necessary, how to configure the DDRCTRL and DDRPHYC peripherals.
2. Peripheral overview[edit source]
DDRCTRL and DDRPHYC peripherals are used to configure the physical interface to the external DDR memory.
Notice that it is possible to perform DDR bandwidth measurement thanks to the DDRPERFM internal peripheral.
2.1. Features[edit source]
Refer to STM32MP13 reference manuals or STM32MP15 reference manuals for the complete features list, and to the software components, introduced below, to see which features are actually implemented.
2.2. Security support[edit source]
DDRCTRL and DDRPHYC are secure (under ETZPC control).
Access to the DDR memory can be filtered via the TZC controller.
3. Peripheral usage and associated software[edit source]
3.1. Boot time[edit source]
DDRCTRL and DDRPHYC are kept secure and used by the FSBL to initialize the access to the DDR where it loads the SSBL (U-Boot) for execution.
STMicroelectronics wishes to make the DDR memory configuration as easy as possible, for this reason a dedicated application note[1] has been published and a DDR tuning function is available in STM32CubeMX tool in order to generate the device tree configuration that is given to the FSBL to perform this initialization.
3.2. Runtime[edit source]
3.2.1. Overview[edit source]
DDRCTRL and DDRPHYC are accessed at runtime by the secure monitor (from the FSBL or OP-TEE) to put the DDR in self-refresh state before going into Stop or Standby low power mode:
- On STM32MP13x lines
, OP-TEE is default located in DDR and it jumps into TF-A BL2 FSBL resident code in SYSRAM to configure the DDRCTRL and DDRPHYC
- On STM32MP15x lines
, OP-TEE is default located in SYSRAM so it embeds the services to configure the DDRCTRL and DDRPHYC
On Standby exit, the ROM code loads the FSBL that again configures the DDRCTRL and DDRPHYC before proceeding with the wake-up procedure.
The TZC controller configures DDR memory access.
3.2.2. Software frameworks[edit source]
3.2.2.1. On STM32MP13x lines
[edit source]
Domain | Peripheral | Software components | Comment | |
---|---|---|---|---|
OP-TEE | Linux | |||
Core/RAM | DDR via DDRCTRL | TF-A BL2 DDR resident driver in SYSRAM |
3.2.2.2. On STM32MP15x lines
[edit source]
Domain | Peripheral | Software components | Comment | ||
---|---|---|---|---|---|
OP-TEE | Linux | STM32Cube | |||
Core/RAM | DDR via DDRCTRL | DDR OP-TEE driver |
3.2.3. Peripheral configuration[edit source]
The DDRCTRL and DDRPHYC device tree configuration is generated via STM32CubeMX tool, according to the DDR characteristics (type, size, frequency, speed grade). This configuration is applied during boot time by the FSBL (see Boot chain overview).
3.2.4. Peripheral assignment[edit source]
3.2.4.1. On STM32MP13x lines
[edit source]
Click on the right to expand the legend...
Domain | Peripheral | Runtime allocation | Comment | ||
---|---|---|---|---|---|
Instance | Cortex-A7 secure (OP-TEE) |
Cortex-A7 non-secure (Linux) | |||
Core/RAM | DDR via DDRCTRL | DDR | ✓ | ✓ |
3.2.4.2. On STM32MP15x lines
[edit source]
Click on the right to expand the legend...
Domain | Peripheral | Runtime allocation | Comment | |||
---|---|---|---|---|---|---|
Instance | Cortex-A7 secure (OP-TEE) |
Cortex-A7 non-secure (Linux) |
Cortex-M4 (STM32Cube) | |||
Core/RAM | DDR via DDRCTRL | DDR | ✓ | ✓ |
4. References[edit source]