blob: ab6d8fe516434d305691e153564ba7bf590d217a [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
Yann Gautierbf5c5f12024-03-19 10:40:12 +010048Only one storage or serial device should be selected in the build command line,
49to save space and not overflow SYSRAM size, or else the platform won't build or boot.
Yann Gautiera250e122023-06-14 09:18:19 +020050
51Other configuration flags:
52
53- | ``DTB_FILE_NAME``: to precise board device-tree blob to be used.
54 | Default: stm32mp157c-ev1.dtb
55- | ``DWL_BUFFER_BASE``: the 'serial boot' load address of FIP,
56 | default location (end of the first 128MB) is used when absent
57- | ``STM32MP_EARLY_CONSOLE``: to enable early traces before clock driver is setup.
58 | Default: 0 (disabled)
59- | ``STM32MP_RECONFIGURE_CONSOLE``: to re-configure crash console (especially after BL2).
60 | Default: 0 (disabled)
61- | ``STM32MP_UART_BAUDRATE``: to select UART baud rate.
62 | Default: 115200
63
64
65Populate SD-card
66----------------
67
68Boot with FIP
69~~~~~~~~~~~~~
70The SD-card has to be formatted with GPT.
71It should contain at least those partitions:
72
73- fsbl: to copy the tf-a-stm32mp157c-ev1.stm32 binary (BL2)
74- fip (GUID 19d5df83-11b0-457b-be2c-7559c13142a5): which contains the FIP binary
75
76Usually, two copies of fsbl are used (fsbl1 and fsbl2) instead of one partition fsbl.
77
78--------------
79
Yann Gautierbf5c5f12024-03-19 10:40:12 +010080*Copyright (c) 2023-2024, STMicroelectronics - All Rights Reserved*