1. What's OP-TEE[edit source]
OP-TEE is an open source SW component hosted by [Firmware] organisation. It allows the development and integration of services and applications running on Cortex-A trusted execution environment (also called secure context), that is isolated from Cortex-A non-secure context running the Linux® -based OS.
Description extracted from the OP-TEE site[1]:
- "OP-TEE is a Trusted Execution Environment (TEE) designed as companion to a non-secure Linux kernel running on Arm; Cortex-A cores using the TrustZone technology. OP-TEE implements TEE Internal Core API v1.1.x which is the API exposed to Trusted Applications and the TEE Client API v1.0, which is the API describing how to communicate with a TEE. Those APIs are defined in the GlobalPlatform API specifications."
OP-TEE is delivered under a BSD style license and can run secure (trusted) applications, named TAs, without restriction on their licensing model. It allows customers to reuse STM32 MPU support developped by ST in the TEE of their choice.
For more details about OP-TEE open source project and internal architecture, please refer to OP-TEE overview (name to change)
2. OP-TEE roles in OSTL[edit source]
ST made the choice to implement OP-TEE in all STM32 MPU platforms (STM32MP1 and STM32MP2) for several reasons:
- To have an open source solution for Cortex-A secure context which can be a reference implementation for customers
- To have the same boot architecture for secure and non-secure device to ease customer life if he wants to activate security during his project development
- To support firmware update including platform system configuration without impacting FSBL. Indeed OP-TEE binary is part of FIP image which can easily be updated at the same time of the Linux distribution. FSBL could be considered as immutuable.
In OSTL implementation, OP-TEE is responsible for:
- System configuration at boot time: that means preparing the platform for applications and coprocessor execution by configuring all system resources like clock tree, memory and peripheral firewall, bus QoS...
- System resource management at runtime: that means providing services based on SCMI API to access resources that are either exclusively controlled by Cortex-A secure context or that are shared between several execution contexts. In this last case, system resource management services act as platform arbitrer.
- Secure services at runtime: Based on GlobalPlatform TEE API specifications, provide secure services like cryptographie, secure storage, random number generator, user trusted application support or trusted coprocessor management. All services could be enabled or disabled according to customer product requirements.
On STM32MP1 series, due to Armv7-a architecture limitation, OP-TEE is also implementing:
- Low power Cortex-A management: Based on PSCI standard API, OP-TEE is providing Cortex-A and system low power support.
3. OP-TEE profiles[edit source]
To easily adapt OP-TEE content to customer product needs, ST proposes different profiles which can be selected by compilation flags.
3.1. System resource manager profile[edit source]
In the mode, OP-TEE is limited to system resources initialization and management. It configures clock tree and firewall according to Device Tree configuration and provide SCMI server. On STM32MP1 series, it also provide PSCI services for low power management. The following figure shows an overview of OP-TEE services in this configuration.
3.2. Secure Service profile[edit source]
In addition of system management services, this profile enables OP-TEE secure services including trusted applications (TAs) support. The following figure shows an overview of OP-TEE services in this configuration.
![]() |
Note that even if it is possible to disable system resource management support in OP-TEE, ST doesn't recommand this option in order to guarantee integrity of peripherals used by Cortex-A secure context |
For more information about OP-TEE profiles activation, please refer to STM32MPU OP-TEE configuration