使用固件映像包 ( FIP ) 允许将引导加载程序映像(以及可能的其他payloads)打包到单个文件中,TF-A 可以从非易失性平台存储中加载该文件。从 FIP 加载镜像的驱动程序已添加到storage层,并允许从支持的平台storage读取该package。下面提供并描述了用于创建固件映像包的工具.
4.11.1 固件镜像包布局(Firmware Image Package layout)
FIP Layout由随后的payload data的tab表组成(table of contents : ToC)。ToC 本身有一个标题,后跟一个或多个表条目。ToC 由结束标记条目终止,并且由于 ToC 的大小为 0 字节,因此偏移量等于 FIP 文件的总大小。所有 ToC 条目都描述了一些已附加到二进制包末尾的payload data。使用 ToC 条目中提供的信息,可以检索相应的payload date。
------------------ | ToC Header | |----------------| | ToC Entry 0 | |----------------| | ToC Entry 1 | |----------------| | ToC End Marker | |----------------| | | | Data 0 | | | |----------------| | | | Data 1 | | | ------------------
讯享网
ToC 头文件和条目格式在头文件中描述 include/tools_share/firmware_image_package.h。该文件由工具和 TF-A 使用。
ToC 标头具有以下字段:
讯享网`name`: The name of the ToC. This is currently used to validate the header. `serial_number`: A non-zero number provided by the creation tool `flags`: Flags associated with this data. Bits 0-31: Reserved Bits 32-47: Platform defined Bits 48-63: Reserved
ToC 条目具有以下字段:
`uuid`: All files are referred to by a pre-defined Universally Unique IDentifier [UUID] . The UUIDs are defined in `include/tools_share/firmware_image_package.h`. The platform translates the requested image name into the corresponding UUID when accessing the package. `offset_address`: The offset address at which the corresponding payload data can be found. The offset is calculated from the ToC base address. `size`: The size of the corresponding payload data in bytes. `flags`: Flags associated with this entry. None are yet defined.
4.11.2 固件镜像包创建工具 --fiptool
源码 : tools/fiptool
工具的编译:make [DEBUG=1] [V=1] fiptool

4.11.3 固件映像包 ( FIP )的加载
固件映像包 ( FIP ) 驱动程序可以从非易失性平台存储上的二进制包加载映像。
引导加载程序映像根据函数指定的平台策略加载plat_get_image_source()。 该函数是由平台厂商来实现的。
个人理解:这里应该是在BL2 调用 plat_get_image_source() 的,在ATF代码中,有两处地方会加载这些FIP镜像。



版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容,请联系我们,一经查实,本站将立刻删除。
如需转载请保留出处:https://51itzy.com/kjqy/40447.html