How to enable secure boot on STM32 MPU

Revision as of 10:54, 25 May 2022 by Registered User (Initial draft)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Applicable for STM32MP13x lines, STM32MP15x lines

1. Article purpose[edit source]

The main purpose of this article is to give main steps on how to enable security on MPU platforms.

2. Overview[edit source]

A STM32 MPU offers multiple ways to control and enforce security on the device. It exists some hardware and software mechanism that can be adapted by the users to set the MPU to the expected security level. These security protection mechanism are offers to users and fully customizable.

3. Device life cycle[edit source]

The STM32MP1 proposes different hardware state that manage different protection levels when changing state.

There are 3 modes defined at hardware level:

Alternate text
Device states
  • OPEN state: By default the device is in open state. Authentication is not mandatory. It can be used to test authentication as error does not prevent FSBL from being started. Debugger is enabled with a limited access.
  • CLOSED state: Once product secretsTODO link to keys have been provisioned into the device, it can be closed. On closed devices, authentication is mandatory. An authentication error prevents FSBL from being started. All debug access are default turn off.
  • RMA state: A closed device can be put once in RMA state and back again in CLOSED state. When the device is in RMA state, all ROM code features are disabled.

On STM32MP15x lines More info.png, it is possible to go back to close state.

4. Secure Boot[edit source]

The secure boot is essential to ensure the integrity and security of the platform at runtime.

The STM32 MPU trusted boot chain is designed to guarantee such a secure boot sequence.
It performs the following tasks:

  • Configuration of the platform firewall, which is the foundation for a safe execution of the platform
  • Configuration of the platform debug capabilities
  • Verification of the integrity (thanks to a hash algorithm) and authentication (using asymmetric cryptography algorithms) of the started software components, including the Secure and non-secure worlds.

TF-A is the recommended open source bootloader. Its implementation supports the trusted boot and peripheral access control with firewall.

Once the STM32 MPU is in CLOSED state, the secure boot is enabled and cannot be bypass.

4.1. STM32MP1 secure boot[edit source]

The STM32MP1 secure boot implementation is described in :