xref: /rk3399_ARM-atf/docs/plat/allwinner.rst (revision b35ce0c413a71689a2b46453b9c30596128f13dc)
1Allwinner ARMv8 SoCs
2====================
3
4Trusted Firmware-A (TF-A) implements the EL3 firmware layer for Allwinner
5SoCs with ARMv8 cores. Only BL31 is used to provide proper EL3 setup and
6PSCI runtime services.
7
8U-Boot's SPL acts as a loader, loading both BL31 and BL33 (typically U-Boot).
9Loading is done from SD card, eMMC or SPI flash, also via an USB debug
10interface (FEL).
11
12BL31 lives in SRAM A2, which is documented to be accessible from secure
13world only.
14
15Current limitations:
16
17-  Missing PMIC support
18
19After building bl31.bin, the binary must be fed to the U-Boot build system
20to include it in the FIT image that the SPL loader will process.
21bl31.bin can be either copied (or sym-linked) into U-Boot's root directory,
22or the environment variable BL31 must contain the binary's path.
23See the respective `U-Boot documentation`_ for more details.
24
25To build for machines with an A64 or H5 SoC:
26
27.. code:: shell
28
29    make CROSS_COMPILE=aarch64-linux-gnu- PLAT=sun50i_a64 DEBUG=1 bl31
30
31To build for machines with an H6 SoC:
32
33.. code:: shell
34
35    make CROSS_COMPILE=aarch64-linux-gnu- PLAT=sun50i_h6 DEBUG=1 bl31
36
37.. _U-Boot documentation: https://gitlab.denx.de/u-boot/u-boot/-/blob/master/board/sunxi/README.sunxi64
38
39Trusted OS dispatcher
40---------------------
41
42One can boot Trusted OS(OP-TEE OS, bl32 image) along side bl31 image on Allwinner A64.
43
44In order to include the 'opteed' dispatcher in the image, pass 'SPD=opteed' on the command line
45while compiling the bl31 image and make sure the loader (SPL) loads the Trusted OS binary to
46the beginning of DRAM (0x40000000).
47