[ATF]ARMv8 cpu cold boot

本文软件分析使用arm-trust-firmwire v1.3版本。基于公开的fvp platform分析流程。

*   Boot Loader stage 1 (BL1) _AP Trusted ROM_
*   Boot Loader stage 2 (BL2) _Trusted Boot Firmware_
*   Boot Loader stage 3-1 (BL31) _EL3 Runtime Software_
*   Boot Loader stage 3-2 (BL32) _Secure-EL1 Payload_ (optional)
*   Boot Loader stage 3-3 (BL33) _Non-trusted Firmware

由于各个平台的cold boot流程有所差异。bl2所指的各有不同命名。
从bl2跳转后就进入了bl31, bl31的入口即bl31_entrypoint
reset to bl31=0,只有主cpu的cold boot会从bl31_entrypoint进来,所以在前面的引导启动流程里面应该已经设置了cpu endianness以及memory初始化。
reset to bl31=1,意味着大量的工作都在bl31的代码中完成,如下图片的分析在定义reset to bl31以及armv8的代码基础来画的流程。
cold boot 判断:
在reset to bl31定义后,意味着cold boot/warm boot都是从bl31_entrypoint进入,在v1.3的版本coold boot是确定的,在cold boot第一次起来后,cpu reset 后的warm boot跳转到warm boot的地址了。
Platform_mem_init :
这个mem init主要是指ddr相关的配置,这可以在这里完成也可以在bl2的代码完成。
Bl33_image_ep_info:
这个结构体保存的信息需要关注,从bl31到bl32/bl33的相关信息在这里面。

cold boot 需要重点配置的模块:cci>mmu>gic>security>timer>pmu。
smc的接口初始化在cold boot里面完成。
psci cpu cold boot

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值