ATF概述

 ATF(Arm Trusted Firmware)/TF-A Chapter 01. 介绍_puyoupuyou的专栏-CSDN博客

ATF(Arm Trusted Firmware)/TF-A Chapter 02 BL1-ROMCode_puyoupuyou的专栏-CSDN博客

ATF(Arm Trusted Firmware)/TF-A Chapter 02 BL1-ROMCode - Continued(1)_puyoupuyou的专栏-CSDN博客

ATF(Arm Trusted Firmware)/TF-A Chapter 02 BL1-ROMCode - Continued(2)_puyoupuyou的专栏-CSDN博客

ATF(Arm Trusted Firmware)/TF-A Chapter 03 Chain of Trust (CoT)_puyoupuyou的专栏-CSDN博客

ATF(Arm Trusted Firmware)/TF-A Chapter 04 Authentication Framework_puyoupuyou的专栏-CSDN博客

ATF(Arm Trusted Firmware)/TF-A Chapter 05 BL2_puyoupuyou的专栏-CSDN博客

1 ATF是干啥的

TF-A,arm trusted fireware是ARM提供的一套通用的软件架构+特定于平台的实现代码。

主要有两个作用:

  • 启动
  • runtime service,提供电源管理、core的hotplug和idle管理等。与启动不同,这部分代码在linux启动以后仍然工作,上层通过SMC(SMC是一条ARM指令,Generate exception targeting exception level3)陷入到runtime service里获取相应服务。

 2 组成

ATF框架里,包含BL1,BL2,BL31,不包含BL32,BL33

  • Boot Loader stage 1 (BL1) AP Trusted ROM: 用于实现bootrom
  • Boot Loader stage 2 (BL2) Trusted Boot Firmware,二级loader
  • Boot Loader stage 3-1 (BL31) EL3 Runtime Software, 提供PSCI(电源管理等)、secure和nosecure切换等运行时服务
  • Boot Loader stage 3-2 (BL32) Secure-EL1 Payload (optional), 第三方的secure OS,如TEE等
  • Boot Loader stage 3-3 (BL33) Non-trusted Firmware,一般是uboot

3 执行顺序

BL1->BL2->BL31/32->BL33
也不绝对,有些系统里没有BL1和BL2; 有些没有BL2。

511倾向用BL1->BL2->BL31->BL33完整启动流程。

4 代码结构

TF-A code is logically divided between the three boot loader stages mentioned in the previous sections. The code is
also divided into the following categories (present as directories in the source code):

  • Platform specific. Choice of architecture specific code depends upon the platform.
  • Common code. This is platform and architecture agnostic code.
  • Library code. This code comprises of functionality commonly used by all other code. The PSCI implementation and other EL3 runtime frameworks reside as Library components.
  • Stage specific. Code specific to a boot stage.
  • Drivers.
  • Services. EL3 runtime services (eg: SPD). Specific SPD services reside in the services/spd directory (e.g.
    services/spd/tspd).

Each boot loader stage uses code from one or more of the above mentioned categories. Based upon the above, the
code layout looks like this:

Directory

Used by BL1?

Used by BL2?

Used by BL31?

bl1YesNoNo
bl2NoYesNo
bl31NoNoYes
platYesYesYes
driversYesNoYes
commonYesYesYes
libYesYesYes
servicesNoNoYes

5 源代码

git clone https://github.com/ARM-software/arm-trusted-firmware.git

1. arm-trusted-firmware (ATF介绍)_每天进步一点-CSDN博客

参考

官方帮助,先看5.4节:
https://trustedfirmware-a.readthedocs.io/en/latest/

https://blog.csdn.net/puyoupuyou/article/details/85046544

https://blog.csdn.net/puyoupuyou/category_9888730.html

Trusted Firmware-A Documentation — Trusted Firmware-A documentation

  • 2
    点赞
  • 34
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值