匿名
未登录
登录
百问网嵌入式Linux wiki
搜索
查看“Boot chain overview”的源代码
来自百问网嵌入式Linux wiki
名字空间
页面
讨论
更多
更多
页面选项
Read
查看源代码
历史
←
Boot chain overview
因为以下原因,您没有权限编辑本页:
您所请求的操作仅限于该用户组的用户使用:
用户
您可以查看与复制此页面的源代码。
__FORCETOC__ == Generic boot sequence == === Linux start-up === Starting Linux<sup>®</sup> on a processor is done in several steps that progressively initialize the platform peripherals and memories. These steps are explained in the following paragraphs and illustrated by the diagram on the right, which also gives typical memory sizes for each stage. [[File: Boot_chains_overview.png|thumb|upright=4|right|link=|Generic Linux boot chain]] ==== ROM code ==== The ROM code is a piece of software that takes its name from the read only memory (ROM) where it is stored. It fits in a few tens of Kbytes and maps its data in embedded RAM. It is the first code executed by the processor, and it embeds all the logic needed to select the boot device (serial link or Flash) from which the first-stage boot loader (FSBL) is loaded to the embedded RAM.<br> Most products require to trust the application that is running on the device and the ROM code is the first link in the chain of trust that must be established across all started components: this trust is established by authenticating the FSBL before starting it. In turn, the FSBL and each following component will authenticate the next one, up to a level defined by the product manufacturer. ==== First stage boot loader (FSBL) ==== Among other things, the first stage boot loader (FSBL) initializes (part of) the clock tree and the external RAM controller. Finally, the FSBL loads the second-stage boot loader (SSBL) into the external RAM and jumps to it.<br /> The [[TF-A overview|Trusted Firmware-A (TF-A)]] and [[U-Boot overview|U-Boot]] secondary program loader (U-Boot SPL) are two possible FSBLs. ==== Second-stage boot loader (SSBL) ==== The second-stage boot loader (SSBL) runs in a wide RAM so it can implement complex features (USB, Ethernet, display, and so on), that are very useful to make Linux kernel loading more flexible (from a Flash device, a network, and so on), and user-friendly (by showing a splash screen to the user). [[U-Boot overview|U-Boot]] is commonly used as a Linux bootloader in embedded systems. ==== Linux kernel space ==== The Linux kernel is started in the external memory and it initializes all the peripheral drivers that are needed on the platform. ==== Linux user space ==== Finally, the Linux kernel hands control to the user space starting the init process that runs all initialization actions described in the root file system (rootfs), including the application framework that exposes the user interface (UI) to the user.<br /> === Other services start-up === [[File: STM32MP boot chain.png|thumb|upright=2|right|link=|STM32MP boot chain]] In addition to <span style="color:#FFFFFF; background:{{STDarkBlue}};"> Linux </span> startup, the boot chain also installs the secure monitor and may support coprocessor firmware loading. <br /><br /> For instance, for the STM32MP15, the boot chain starts: * the <span style="color:#FFFFFF; background:{{STPink}};"> secure monitor </span>, supported by the Arm<sup>®</sup> Cortex<sup>®</sup>-A secure context (TrustZone). Examples of use of a secure monitor are: user authentication, key storage, and tampering management. * the <span style="color:#FFFFFF; background:{{STLightBlue}};"> coprocessor </span> firmware, running on the Arm Cortex-M core. This can be used to offload real-time or low-power services. <br /> The dotted lines in the diagram on the right mean that: * the <span style="color:#FFFFFF; background:{{STLightBlue}};"> coprocessor </span> can be started by the '''second stage boot loader (SSBL)''', known as “'''early boot'''”, or '''Linux kernel''' <br clear=all> == STM32MP boot sequence == === Diagram frames and legend === [[File:Boot diagrams contexts.png|thumb|upright=2|right|link=|STM32MP hardware execution contexts]] The [[Getting_started_with_STM32_MPU_devices#Multiple-core_architecture_concepts|hardware execution contexts]] are shown with vertical frames in the boot diagrams: * the <span style="color:#FFFFFF; background:{{STPink}};"> Arm Cortex-A secure </span> context, in pink * the <span style="color:#FFFFFF; background:{{STDarkBlue}};"> Arm Cortex-A non-secure </span> context, in dark blue * the <span style="color:#FFFFFF; background:{{STLightBlue}};"> Arm Cortex-M </span> context, in light blue The horizontal frame in: * the bottom part shows the '''boot chain''' * the top part shows the '''runtime''' services, that are installed by the '''boot chain''' <br clear=all> [[File:Boot chains legend.png|thumb|upright=2|right|link=|Boot chain diagrams legend]] The legend on the right shows how information about the various components shown in the frames, and which are involved in the boot process, is highlighted: * The box '''color''' shows the component source code origin * The '''arrows''' show the loading and calling actions between the components * The '''Cube''' logo is used on the top right corner of components that can be configured via [[STM32CubeMX]] * The '''lock''' show the components that can be authenticated during the boot process <br clear=all> === STM32MP15 boot chain === ==== Overview ==== [[File: STM32MPU Embedded Software architecture overview.png|link=STM32MPU Embedded Software architecture overview|thumb|Zoom out to STM32MPU Embedded Software]] STM32MP15 boot chain uses [[TF-A overview|Trusted Firmware-A (TF-A)]] as the FSBL in order to fulfill all the requirements for security-sensitive customers, and it uses [[U-Boot overview|U-Boot]] as the SSBL. Note that the authentication is optional with this boot chain, so it can run on any STM32MP15 device [[STM32MP15_microprocessor#Part_number_codification|security]] variant (that is, with or without the Secure boot).<br> Refer to the [[Security overview|security overview]] for an introduction of the secure features available on STM32MP15, from the secure boot up to trusted applications execution. [[File:Trusted boot chain.png|center|link=|frame|STM32MP15 boot chain]] <br clear=all> Note: * The STM32MP15 coprocessor can be started at the SSBL level by the [[U-Boot overview|U-Boot early boot]] feature or, later, by the [[Linux remoteproc framework overview|Linux remoteproc framework]], depending on the application startup time-targets. ==== ROM code ==== The [[STM32MP15 ROM code overview|ROM code]] starts the processor in secure mode. It supports the FSBL authentication and offers authentication services to the FSBL. ==== First stage boot loader (FSBL) ==== The FSBL is executed from the [[SYSRAM_internal_memory|SYSRAM]].<br /> Among other things, this boot loader initializes (part of) the clock tree and the [[DDRCTRL and DDRPHYC internal peripherals|DDR controller]]. Finally, the FSBL loads the second-stage boot loader (SSBL) into the DDR external RAM and jumps to it.<br> [[TF-A overview|Trusted Firmware-A (TF-A)]] is the FSBL used on the STM32MP15.<br> ==== Second stage boot loader (SSBL) ==== [[U-Boot overview|U-Boot]] is commonly used as a bootloader in embedded software and it is the one used on STM32MP15. ==== Linux ==== Linux<sup>®</sup> OS is loaded in DDR by U-Boot and executed in the non-secure context. ==== Secure OS / Secure Monitor ==== The Cortex-A7 secure world can implement a minimal secure monitor (from [[TF-A_overview#BL32|TF-A]] or [[U-Boot overview|U-Boot]]) or a real secure OS, such as [[OP-TEE overview|OP-TEE]]. ==== Coprocessor firmware ==== The coprocessor [[STM32CubeMP1 architecture|STM32Cube]] firmware can be started at the SSBL level by [[U-Boot overview|U-Boot]] with the remoteproc feature (rproc command) or, later, by [[Linux remoteproc framework overview|Linux remoteproc framework]], depending on the application startup time-targets.
该页面使用的模板:
模板:STDarkBlue
(
查看源代码
)
模板:STLightBlue
(
查看源代码
)
模板:STPink
(
查看源代码
)
返回至
Boot chain overview
。
导航
导航
WIKI首页
官方店铺
资料下载
交流社区
所有页面
所有产品
MPU-Linux开发板
MCU-单片机开发板
Linux开发系列视频
单片机开发系列视频
所有模块配件
Wiki工具
Wiki工具
特殊页面
页面工具
页面工具
用户页面工具
更多
链入页面
相关更改
页面信息
页面日志