当前位置:   article > 正文

ATF概述_linux atf

linux 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博客

参考

  1. 官方帮助,先看5.4节:
  2. https://trustedfirmware-a.readthedocs.io/en/latest/
  3. https://blog.csdn.net/puyoupuyou/article/details/85046544

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

Trusted Firmware-A Documentation — Trusted Firmware-A documentation

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/我家自动化/article/detail/129930
推荐阅读
相关标签
  

闽ICP备14008679号