But it is just software, and the basic idea is this. ATF is a "hypervisor" (which makes it better than a supervisor). It runs at the highest and most privileged level, hence it needs to be the first thing booted by the on chip bootrom. Once it gets itself running and happy, it then will load and start U-Boot at a less privileged level. U-Boot could then load an operating system at an even less privileged level, but as far as I know it does not.
The documentation calls it an EL3 `Secure Monitor`.
There is a nice PDF file and plenty of documentation from ARM.
The PDF file is 636 pages.
The exciting part is that it is all open source and not all that gigantic. It took me perhaps 5 minutes to clone the sources and then build them for the RK3399. The process goes like this:
git clone --depth 1 https://github.com/ARM-software/arm-trusted-firmware.git cd arm-trusted-firmware make realclean make CROSS_COMPILE=aarch64-linux-gnu- PLAT=rk3399 cd ..Here is a log of the build process: The PDF document is wonderfully informative and accessible, with information about both Rockchip and Allwinner chips.
make CROSS_COMPILE=aarch64-linux-gnu- PLAT=sun50i_a64 DEBUG=1 bl31Apparently the Allwinner H5 needs only bl31!
The innocent reader should know that the H5 is also known as the sun50i, specifically the sun50iw2p1.
The "plat" directory in the ATF code shows:
common sun50i_a64 sun50i_h6 sun50i_h616 sun50i_r329Using grep to search for the string "H5" reveals (in sun50i_a64/sunxi_power.c) various tests on SUNXI_SOC_H5. In the file plat/allwinner/common/include/sunxi_def.h we see:
#define SUNXI_SOC_A64 0x1689 #define SUNXI_SOC_H5 0x1718 #define SUNXI_SOC_H6 0x1728 #define SUNXI_SOC_H616 0x1823 #define SUNXI_SOC_R329 0x1851The above is sort of a menu of available Allwinner SOC.
Tom's electronics pages / [email protected]