Linux重新启动过程

Linux重新启动过程

本文介绍了ARM Linux重新启动过程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

重启程序如何在运行Linux的ARM SOC上工作,例如,引导加载程序是否会重新初始化DDR内存?有人可以详细解释重启过程吗。

How reboot procedure works on ARM SOCs running Linux, e.g do boot loaders reinitialize DDR memory? can anybody please explain me rebooting process in detail.

推荐答案

这太广泛了。它不仅取决于SoC供应商,还取决于硬件和软件。

This is way too broad. It's not only SoC vendor dependent, but also hardware and software dependent.

但是,最典型的设置是:


  1. CPU执行第一阶段的引导加载程序(FSB)。

  1. CPU executes first-stage bootloader (FSB).

FSB位于芯片上它本身可以存储在ROM或EEPROM中,并且非常小(AT91RM9200 FSB的最大值为10kB,AFAIR)。然后,FSB初始化最少的外设集(时钟,RAM,闪存),将第二级引导程序(U引导)转移到RAM并执行。

FSB is located on the chip itself in ROM or EEPROM and is very small (AT91RM9200 FSB is 10kB max, AFAIR). FSB then initializes minimum set of peripherals (clocks, RAM, flash), transfers second-stage bootloader (U-Boot) to RAM, and executes it.

U-Boot启动。

U-Boot初始化一些其他硬件(串行,以太网等),将Linux内核传输到RAM,准备指向内核输入参数的指针并跳转

U-Boot initializes some other hardware (serial, ethernet, etc), transfers Linux kernel to RAM, prepares the pointer to kernel input parameters and jumps into it's entry point.

Linux内核启动。

Linux kernel starts.

魔术在这里发生。该系统现在可以通过SSH控制台为您提供cookie和/或执行需要执行的任何操作。

Magic happens here. The system now able to serve you cookies via SSH console and/or executes whatever needs to be executed.

有关热启动 的更深入信息:

A bit more in-depth info about warm start:

热启动是一个软件重置,而冷启动开机或硬件重置。一些(大多数?)SoC能够将有关热启动的信息传递给FSB / SSB。这样,引导加载程序就可以通过跳过已经初始化的外围设备的重新初始化来最大程度地减少总的引导时间。

Warm start is a software reset, while cold start is power-on or hardware reset. Some (most?) SoC's are able to pass the info to FSB/SSB about warm start. This way bootloaders are able to minimize the overall boot time by skipping re-initializion of already initialized peripherals.

再次,这是我在15年以上的经验中最典型的设置。嵌入式世界。

Again, this is most typical setup from my 15+ years experience in embedded world.

这篇关于ARM Linux重新启动过程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-24 08:36