ArmTrustFirmware

主要从四个部分去讲解

一、 安全引导的作用
二、 安全引导的原理
三、 ATF的启动过程框架
四、 ATF的启动过程Code解析

什么是ATF

ARM Trusted Firmware中的Trusted Firmware-A(TF-A),是其中的一个类别、项目。这个是在armV8中引入的安全解决方案。它主要包括启动和运行过程中的特权级划分,对ArmV7中的TZ进行了提高,主要是补充了启动过程中信任链的传导,细化运行过程中的特权级区间。

安全引导/启动

什么是安全引导/启动

指的是在系统的启动过程中,使用链式验证电子签名的方式来验证系统里的重要镜像文件的可靠性,然后再加载镜像文件的引导过程。

为什么要安全引导/启动

它可以保护二级厂商系统的独立性和完整性,在V8架构中arm提供了arm可信固件ATF。

目的

Bootloader、kernel、TEE os的启动都由ATF来加载和引导。对于V8,bootloader、kernel、TEE os镜像文件的验签工作都是在ATF中完成的。

启动流程以及阶段划分

分为两种类型:冷启动(restart)和热启动(reset)
1
2
3
4
5
6
7
五个步骤/阶段:

1. BL1 - AP Trusted ROM(normal is BootRom)
2. BL2 - Trusted Boot Firmware (normal is Trusted Bootloader)
3. BL31- EL3 Runtime Firmware (normal is SML,manage SMC handle and interrupt, run in secure monitor)
4. BL32- Secure-EL1 Payload (normal is TEE os Image)
5. BL33- Non-Trusted Firmware (normal is uboot,linux kernel)
ATF will output BL1,BL2,BL31,and provide BL32, BL33 interface.
I think the interface ATF provide is BL32 and BL33 can be specified, and ATF is actually a framework, it contains five procedures can be 
defined by manufacturer.