The security guidance that is described in this document applies to any boards based on the devices listed in the table below, for die revision Y. Table 1. Applicable products Reference Products STM32MP13xx STM32MP131C, STM32MP131F, STM32MP133C, STM32MP133F, STM32MP135C, STM32MP135F UM2885 - Rev 2 - January 2023 www.st.com For further information contact your local STMicroelectronics sales office.
UM2885 General information General information ® This document applies to STM32MP13xx Arm -based MPUs. Note: Arm is a registered trademark of Arm Limited (or its subsidiaries) in the US and/or elsewhere. Table 2. Specific acronyms Acronym Description Boot hardware key Global partition table Hardware‑unique key Microprocessor...
Secure acceptance is the process in which the user securely receives the TOE and verifies its genuineness. The TOE is distributed as an STM32 MPU device, with a software package that can be obtained from www.st.com. Refer to the cover page for the applicable devices. How to accept an STM32MP13xx MPU device When the device is in the OTP‑SECURE Open default state, TOE genuineness can be verified using a debugger,...
UM2885 Secure installation and preparation of the operational environment (AGD_PRE.1.2C) • Alternatively, use the STM32CubeProgrammer graphical user interface (GUI) as follows: – On the right, select USB (not STLINK, set by default) in the connection picklist and click on the refresh button.
Secure installation and preparation of the operational environment (AGD_PRE.1.2C) Hardware setup STM32MP135F-DK Discovery kit board is used as described below. Connect the USB Micro-B to Type-A cable between your laptop and the ST-LINK/V2-1 port of the board. ® Connect the power supply using the USB Type-C connector (power 5V-3A).
Debug when the protections are disabled Software setup STMicroelectronics provides OpenSTLinux binary packages ("starter" packages) that can run directly on ST boards mounted with the TOE. Each starter package contains a set of complete, configured images to boot a non‑secure platform. OpenSTLinux is based on the Trusted Firmware-A (TF-A) reference implementation, which can be found at https://trustedfirmware-a.readthedocs.io.
Page 8
UM2885 Secure installation and preparation of the operational environment (AGD_PRE.1.2C) The user also needs to create a 128-bit secret to store in OTP the words 92 to 95 of the TOE. He also creates a 32-bit derivation constant to be stored in the encrypted FSBL extension header. With this information, the STM32 key generator tool can compute a 128-bit encryption key that is used to encrypt the FSBL image using AES CBC chaining mode.
Page 9
UM2885 Secure installation and preparation of the operational environment (AGD_PRE.1.2C) Step E: Image programming Once the image is signed, it can be programmed into the flash memory on the target board with the STM32CubeProgrammer tool. Supported flash memory and its associated flash memory mapping are described Available interfaces and methods of use (AGD_OPE.1.2C and AGD_OPE.1.3C).
UM2885 Secure installation and preparation of the operational environment (AGD_PRE.1.2C) Each binary image (signed or not) loaded by ROM code need to include a specific STM32 header added on top of the binary data. This header includes two extension headers: one for FSBL authentication, and one for FSBL decryption.
UM2885 Operational user guidance Operational user guidance User role The user role integrator, also called original equipment manufacturer (OEM), is the most relevant for this TOE. Indeed, the integrator is the one to: • Receive the TOE, • Perform the preparative procedures as described in TOE preparative procedures, •...
UM2885 Operational guidance for the integrator role Length (in Name Byte offset Description bits) Number of public keys in the 0x8C Number of public keys in the table (N=8) table N 1: P-256 NIST ECDSA algorithm 0x90 2: Brainpool 256 Authentication Public key hash table, to check the hash table starting at ECDSA public key...
Refer to the boot_api_context_t structure in https://github.com/STMicroelectronics/arm-trusted-firmware/blob/ v2.4-stm32mp/plat/st/stm32mp1/include/boot_api.h for details. Number of images in external flash memory The integrator can configure the TOE to use one or two copies of the FSBL in the external flash memory. In the case of using two copies, FSBL1 and FSBL2, the ROM code tries to load and launch the first copy and in case of failure, it then tries to load the second copy.
Page 14
UM2885 Operational guidance for the integrator role The integrator can change the TOE serial boot management or remove the serial boot functionality. Both options are in the scope of the certified configuration. Refer to Secure installation and preparation of the operational environment (AGD_PRE.1.2C) for details.
UM2885 Operational guidance for the integrator role Figure 6. Key management principle Tamper reaction (block or erase) Secure AES Peripheral usage Embedded non- Derived H/w key Tamper events volatile storage Hardware derivation (OTP, s/w secret) Unique Key TAMP Embedded with volatile side-channel Hw Key...
Page 16
UM2885 Operational guidance for the integrator role Note: Any keys encrypted by DHUK or BHK are not usable when a tamper event occurs. ® Crypto peripherals critical to secure ROM code are made secure only. Refer to TrustZone and MMU isolation usage in this section for details.
Page 17
UM2885 Operational guidance for the integrator role For example, it is recommended when cryptographic drivers execute in the secure mode of the Cortex‑A7, that the integrator verifies that the peripherals and the memory used by those drivers are read/write secure only. More specifically, the following hardware features must be used: •...
UM2885 Operational guidance for the integrator role Those methods are described in the tamper and backup registers (TAMP) section of the RM0475 reference manual and summarized in the following table. Note: When activated only a reset of the backup domain can deactivate the tamper protections. Table 7.
Page 19
UM2885 Operational guidance for the integrator role Method of use: • Power on the product as defined in RM0475 • Reset the device as defined in RM0475 • Device executes the ROM code. • ROM executes the authenticated code of the integrator when the TOE is in its certified configuration. This code uses SAES and PKA peripherals freely after the RNG peripheral is properly configured and clocked (in RCC).
Page 20
UM2885 Operational guidance for the integrator role Parameters: • Sticky read‑lock: Integrator can use the BSEC_SRLOCKx register to prevent reloading of selected shadow registers until the next system reset. • Sticky write‑lock: Integrator can use the BSEC_SWLOCKx register to lock the write to the selected shadow register until the next system reset.
UM2885 Operational guidance for the integrator role Figure 7. Tamper‑protected physical chip interfaces STM32 TAMPL/H Vdd domain switch REF- IWDG1 REF+ Backup DD_ANA domain DDCORE Vdd CPU Backup DDCPU RAM* C-A7 Monitoring Vdd DDR RTC + via ADC Backup regs DDQ_DDR 32 kHz subsystem...
Page 22
UM2885 Operational guidance for the integrator role Actions: • When the integrator activates a tamper input event linked to a physical chip interface, it must decide if it is the source of a potential tamper (ITAMPxNOER=1 in TAMP_CR3) or the source of a confirmed tamper (ITAMPxNOER=0 in TAMP_CR3).
UM2885 Operational guidance for the integrator role Figure 8. Quad-SPI NOR flash memory layout without GPT ‑ mode, two NOR flash memories Note: It is possible to use NOR flash memory either in single or dual mode. In dual are connected to the two ports of the NOR interface and the two memories are used in interlaced mode. Parallel NAND (via FMC) and serial NAND (via Quad-SPI) layouts contain n copies of FSBL in the first valid blocks.
UM2885 Operational guidance for the integrator role Figure 10. eMMC flash memory layout On the SD/MMC interface, the SD card layout contains versions of FSBL. The ROM code first looks for a GPT. If it finds it, it locates two FSBLs by looking for the two first GPT entries of which names begin with 'fsbl'. If it cannot find a GPT, the ROM code looks for FSBL1 at offset LBA34 and FSBL2 at offset LBA546.
UM2885 Operational guidance for the integrator role Table 8. Boot device selection via the boot pins and OTP (Flash memory) OTP word 3 TAMP_REG[20] OTP word 3 (primary Boot source #2 Boot source if BOOT pins (secondary Boot source #1 (force serial) boot source) if #1 fails...
UM2885 Operational guidance for the integrator role • NAND configurations. – For serial NANDs, the AFmux default setting is the same as for serial NOR. Refer to Table – For parallel NANDs, the AFmux default configurations, which are overwritten by OTP values defined by OTP words 5 to 7, are described in Table Table 11.
Page 27
UM2885 Operational guidance for the integrator role As part of the TOE configuration, the integrator can permanently disable flash memory interfaces by burning the relevant fuses of OTP word 3, as described in the parameters above. Disabling all the flash memory interfaces is not part of the certified TOE configuration.
UM2885 Operational guidance for the integrator role Table 14. Boot device selection via the boot pins and OTP (serial) OTP word 3 OTP word 3 (primary TAMP_REG[20] Boot source #2 Boot source if BOOT pins (secondary Boot source #1 (force serial) boot source) if #1 fails #2 fails...
UM2885 Operational guidance for the integrator role Method of use: • The method to provision and lock the RMA password, when the device is OTP‑SECURE Open, is described in Section 3.2.2 Secure installation. Alternatively, the method described in AN5510 can be used.
UM2885 Operational guidance for the integrator role To achieve the above TRUSTED_INTEGRATOR and TOE_PREPARATION security objectives, the following measures must be taken. • The integrator must verify the genuineness of the TOE as described in Secure Acceptance. • The integrator must follow all the guidelines described in User‑accessible functions and privileges (AGD_OPE.1.1C) Available interfaces and methods of use (AGD_OPE.1.2C and AGD_OPE.1.3C)
UM2885 Technical annexes Technical annexes Boot from parallel and serial NANDs Supported parallel NANDs The ROM code supports parallel NAND with the following parameters. Table 16. Parallel NAND support by ROM code Block size (Kbytes) Page size (Kbytes) Data width ECC (bits and code) 8, 16 4 (bch), 8 (bch), 1 (hamming)
UM2885 How to update OTP with U-Boot Needed for Parameter table offset Description Needed for parallel NAND serial NAND [85:84] Number of spare bytes per page [95:92] Number of pages per block [99:96] Number of blocks per unit Number of ECC bits correctability Note: Serial NAND memories are not ONFI compliant but most of them are ONFI compatible.
Page 33
UM2885 How to update OTP with U-Boot Word 0x00000008: 00000000 82004000 00000000 00000000 Word 0x0000000c: 7d04f0db 00470022 33385115 34383330 Word 0x00000010: 22986562 27010551 7a470140 06cc1608 Word 0x00000014: 5e560054 00000000 00000000 401a300c Word 0x00000018: ffffffff ffffffff ffffffff ffffffff Word 0x0000001c: ffffffff ffffffff ffffffff ffffffff When all the 96 OTPs are available (secure open device): Board $>...
UM2885 List of tables List of tables Table 1. Applicable products ..............1 Table 2.
Page 38
ST’s terms and conditions of sale in place at the time of order acknowledgment. Purchasers are solely responsible for the choice, selection, and use of ST products and ST assumes no liability for application assistance or the design of purchasers’...
Need help?
Do you have a question about the STM32MP13 Series and is the answer not in the manual?
Questions and answers