Basic concepts of bootloader

Source: Internet
Author: User

Iv. Commonalities of arm bootloader
For an arm system, bootloader is essentially a "tool" for guiding and loading kernel images. In terms of implementation, it must provide the following functions. More specifically, it must do the following:

(1) initialize RAM (required): bootloader must be able to initialize Ram, because in the future, the system will use it to save some volatile data, but the specific implementation depends on the specific CPU and hardware systems.

(2) initialize the serial port (optional, recommended): bootloader should initialize and enable at least one serial port through which to contact the console for debugging and even communicate with the PC.
(3) create a list of kernel parameters (recommended for Linux ).
(4) Start the kernel image (required): depending on the storage media stored in the kernel image, two startup modes are available: falsh startup and ram startup, the following system status must be met:
CPU register settings: R0 = 0
R1 = machine type;
R2 = start parameter mark the starting address of the list in Ram;
The settings of these three registers are passed through the startup parameters when the kernel is last started.
CPU mode: Disable interrupt; SVC mode;
There is no need to support interrupt implementation in bootloader, which is a kernel mechanism and Management of Device Driver Management.
Category; SVC mode is a protection mode of the system, so that some operations can only be performed in SVC Mode
For example, some specific register access operations.
Cache and MMU settings:
MMU must be disabled; data cache must be disabled; command cache can be disabled or enabled;
All operations on the address in bootloader use a physical address, which is a real address and does not exist.
Address, so the MMU must be disabled. Bootloader is mainly used to load kernel images. image data must be written back.
The data cache must be disabled. However, there are no mandatory rules for instruction cache,
Generally, it is recommended to disable the command cache.
The bootloader starts the kernel image by directly redirecting to the kernel image using the jump statement.
Command statement.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.