blob: 931dd57fe1a6fd25992633a67cb37f7a5f804020 [file] [log] [blame]
Yann Gautiera250e122023-06-14 09:18:19 +02001STM32 MPUs
2==========
3
4STM32 MPUs are microprocessors designed by STMicroelectronics
5based on Arm Cortex-A. This page presents the common configuration of STM32
6MPUs, more details and dedicated configuration can be found in each STM32 MPU
Yann Gautiere6ecc3c2023-03-17 14:02:12 +01007page (:ref:`STM32MP1` or :ref:`STM32MP2`)
Yann Gautiera250e122023-06-14 09:18:19 +02008
9Design
10------
11The STM32 MPU resets in the ROM code of the Cortex-A.
12The primary boot core (core 0) executes the boot sequence while
13secondary boot core (core 1) is kept in a holding pen loop.
14The ROM code boot sequence loads the TF-A binary image from boot device
15to embedded SRAM.
16
17The TF-A image must be properly formatted with a STM32 header structure
18for ROM code is able to load this image.
19Tool stm32image can be used to prepend this header to the generated TF-A binary.
20
21Boot
22~~~~
23Only BL2 (with STM32 header) is loaded by ROM code. The other binaries are
24inside the FIP binary: BL31 (for Aarch64 platforms), BL32 (OP-TEE), U-Boot
25and their respective device tree blobs.
26
27Boot sequence
28~~~~~~~~~~~~~
29
30ROM code -> BL2 (compiled with RESET_TO_BL2) -> OP-TEE -> BL33 (U-Boot)
31
32Build Instructions
33------------------
34Boot media(s) supported by BL2 must be specified in the build command.
35Available storage medias are:
36
37- ``STM32MP_SDMMC``
38- ``STM32MP_EMMC``
39- ``STM32MP_RAW_NAND``
40- ``STM32MP_SPI_NAND``
41- ``STM32MP_SPI_NOR``
42
43Serial boot devices:
44
45- ``STM32MP_UART_PROGRAMMER``
46- ``STM32MP_USB_PROGRAMMER``
47
48
49Other configuration flags:
50
51- | ``DTB_FILE_NAME``: to precise board device-tree blob to be used.
52 | Default: stm32mp157c-ev1.dtb
53- | ``DWL_BUFFER_BASE``: the 'serial boot' load address of FIP,
54 | default location (end of the first 128MB) is used when absent
55- | ``STM32MP_EARLY_CONSOLE``: to enable early traces before clock driver is setup.
56 | Default: 0 (disabled)
57- | ``STM32MP_RECONFIGURE_CONSOLE``: to re-configure crash console (especially after BL2).
58 | Default: 0 (disabled)
59- | ``STM32MP_UART_BAUDRATE``: to select UART baud rate.
60 | Default: 115200
61
62
63Populate SD-card
64----------------
65
66Boot with FIP
67~~~~~~~~~~~~~
68The SD-card has to be formatted with GPT.
69It should contain at least those partitions:
70
71- fsbl: to copy the tf-a-stm32mp157c-ev1.stm32 binary (BL2)
72- fip (GUID 19d5df83-11b0-457b-be2c-7559c13142a5): which contains the FIP binary
73
74Usually, two copies of fsbl are used (fsbl1 and fsbl2) instead of one partition fsbl.
75
76--------------
77
78*Copyright (c) 2023, STMicroelectronics - All Rights Reserved*