xref: /rk3399_ARM-atf/docs/plat/imx8m.rst (revision 10bf3d7ca3994f0abc119a0773f8023e19acafd1)
124dba2b3SPaul BeesleyNXP i.MX 8M Series
224dba2b3SPaul Beesley==================
381136819SBai Ping
481136819SBai PingThe i.MX 8M family of applications processors based on Arm Corte-A53 and Cortex-M4
581136819SBai Pingcores provide high-performance computing, power efficiency, enhanced system
681136819SBai Pingreliability and embedded security needed to drive the growth of fast-growing
781136819SBai Pingedge node computing, streaming multimedia, and machine learning applications.
881136819SBai Ping
9e3c07d2fSJacky Baiimx8mq is dropped in TF-A CI build due to the small OCRAM size, but still actively
10e3c07d2fSJacky Baimaintained in NXP official release.
11e3c07d2fSJacky Bai
1281136819SBai PingBoot Sequence
1324dba2b3SPaul Beesley-------------
1481136819SBai Ping
1581136819SBai PingBootrom --> SPL --> BL31 --> BL33(u-boot) --> Linux kernel
1681136819SBai Ping
1781136819SBai PingHow to build
1824dba2b3SPaul Beesley------------
1981136819SBai Ping
2081136819SBai PingBuild Procedure
2124dba2b3SPaul Beesley~~~~~~~~~~~~~~~
2281136819SBai Ping
2381136819SBai Ping-  Prepare AARCH64 toolchain.
2481136819SBai Ping
2581136819SBai Ping-  Build spl and u-boot firstly, and get binary images: u-boot-spl.bin,
2681136819SBai Ping   u-boot-nodtb.bin and dtb for the target board.
2781136819SBai Ping
2881136819SBai Ping-  Build TF-A
2981136819SBai Ping
3081136819SBai Ping   Build bl31:
3181136819SBai Ping
3281136819SBai Ping   .. code:: shell
3381136819SBai Ping
34650a435cSMark Dykes       CROSS_COMPILE=aarch64-linux-gnu- make PLAT=<Target_SoC> bl31
3581136819SBai Ping
3681136819SBai Ping   Target_SoC should be "imx8mq" for i.MX8MQ SoC.
37179f82a2SJacky Bai   Target_SoC should be "imx8mm" for i.MX8MM SoC.
3858fdd608SJacky Bai   Target_SoC should be "imx8mn" for i.MX8MN SoC.
39a775ef25SJacky Bai   Target_SoC should be "imx8mp" for i.MX8MP SoC.
4081136819SBai Ping
4181136819SBai PingDeploy TF-A Images
4224dba2b3SPaul Beesley~~~~~~~~~~~~~~~~~~
4381136819SBai Ping
4481136819SBai PingTF-A binary(bl31.bin), u-boot-spl.bin u-boot-nodtb.bin and dtb are combined
4581136819SBai Pingtogether to generate a binary file called flash.bin, the imx-mkimage tool is
4681136819SBai Pingused to generate flash.bin, and flash.bin needs to be flashed into SD card
4781136819SBai Pingwith certain offset for BOOT ROM. the u-boot and imx-mkimage will be upstreamed
4881136819SBai Pingsoon, this doc will be updated once they are ready, and the link will be posted.
49ad329e50SYing-Chun Liu (PaulLiu)
50ad329e50SYing-Chun Liu (PaulLiu)TBBR Boot Sequence
51ad329e50SYing-Chun Liu (PaulLiu)------------------
52ad329e50SYing-Chun Liu (PaulLiu)
53ad329e50SYing-Chun Liu (PaulLiu)When setting NEED_BL2=1 on imx8mm. We support an alternative way of
54ad329e50SYing-Chun Liu (PaulLiu)boot sequence to support TBBR.
55ad329e50SYing-Chun Liu (PaulLiu)
56ad329e50SYing-Chun Liu (PaulLiu)Bootrom --> SPL --> BL2 --> BL31 --> BL33(u-boot with UEFI) --> grub
57ad329e50SYing-Chun Liu (PaulLiu)
58ad329e50SYing-Chun Liu (PaulLiu)This helps us to fulfill the SystemReady EBBR standard.
59ad329e50SYing-Chun Liu (PaulLiu)BL2 will be in the FIT image and SPL will verify it.
60ad329e50SYing-Chun Liu (PaulLiu)All of the BL3x will be put in the FIP image. BL2 will verify them.
61ad329e50SYing-Chun Liu (PaulLiu)In U-boot we turn on the UEFI secure boot features so it can verify
62ad329e50SYing-Chun Liu (PaulLiu)grub. And we use grub to verify linux kernel.
63*10bf3d7cSYing-Chun Liu (PaulLiu)
64*10bf3d7cSYing-Chun Liu (PaulLiu)Measured Boot
65*10bf3d7cSYing-Chun Liu (PaulLiu)-------------
66*10bf3d7cSYing-Chun Liu (PaulLiu)
67*10bf3d7cSYing-Chun Liu (PaulLiu)When setting MEASURED_BOOT=1 on imx8mm we can let TF-A generate event logs
68*10bf3d7cSYing-Chun Liu (PaulLiu)with a DTB overlay. The overlay will be put at PLAT_IMX8M_DTO_BASE with
69*10bf3d7cSYing-Chun Liu (PaulLiu)maximum size PLAT_IMX8M_DTO_MAX_SIZE. Then in U-boot we can apply the DTB
70*10bf3d7cSYing-Chun Liu (PaulLiu)overlay and let U-boot to parse the event log and update the PCRs.
71