
From: Simon Glass sjg@chromium.org Date: Tue, 1 Feb 2022 08:42:35 -0700
It seems that rk3399 uses bl31.elf and splits out the sections into pieces. What a mess! I wonder if that is necessary for ATF to work? It seems to do the same for TEE.
That's because bl31.elf really consists of three binary blobs packed together into a single ELF object. This is done such that specific bits needed for suspend/resume land in the AP's SRAM and the PMU's SRAM while the majority lands in DRAM. The splitting happens to make U-Boot's ITS stuff happy.
I suppose this could be done in a different way by packing the ELF binary itself into the FIT image, but then SPL has to parse the ELF headers and copy things in place which may be challenging.
(I'm not familliar with the TEE stuff)