ARM Linux kernel startup requirements

Source: Internet
Author: User

The original English version "ARM Linux kernel boot requirements" was written by Russell king, the maintainer of the ARM Linux kernel. Here I will translate it into Chinese for your convenience.

Original: http://www.arm.linux.org.uk/developer/booting.php

Author: Russell king
Initial date: May 18,200 2

Revision: 1-17 September 20042-30 September 2004


To start ARM Linux, you first need a bootloader, which is a very small program (started before the kernel runs ). The first phase of bootloader is to initialize various hardware devices. Finally, it is to call the kernel and PASS Parameters of the first phase to the kernel.

In essence, the bootloader program should provide (to the minimum) the following aspects:

1. Set and initialize Ram

2. initialize a serial port

3. Check the Machine Type

4. Set the tag list required for Kernel startup

5. Call the kernel Image

1. Set and initialize Ram

Existing Bootloader: mandatory (required)

New Bootloader: mandatory (required)

Bootloader is used to locate and initialize the memory that all kernels will use in non-volatile data storage systems. It completes all the actions in the form of machine dependency. (It may use internal algorithms to automatically locate and classify all Ram resources, or it may use Ram-related knowledge of specific machines, or any other method that the designer deems appropriate ).

2. initialize a serial port

Existing Bootloader: optional, recommended

New Bootloader: Optional. Recommended

In this process, bootloader should be initialized to enable a serial device. This allows the kernel serial driver to automatically detect which serial port should be used as the kernel console. (Usually used for debugging or communication purposes ).

Optional. Through the specific serial port tag list, bootloader can pass parameters such as "console =" to the kernel, or some parameters in the serial port format, for example, in Linux/documentation/kernel-parameters.txt.

3. Check the machine ID

Existing Bootloader: Optional

New Bootloader: mandatory (required)

The bootloader must create and initialize the kernel tag list. A valid tag list starts with the atag_core tag and ends with atag_none. atag_core may be empty or not. The size of an empty atag_core tag is set to '2' (0x00000002), and the size of the atag_none tag must be set to 0.

The tag of any number can be placed in this tag list. However, it is not clear whether the duplicate tag is appended to the information carried by the previous tag, or whether it replaces the complete information.

The boot loader must pass at a minimum the size and location ofthe system memory, and root filesystem location. Therefore, the minimum tag list is as follows:

+-----------+base ->| ATAG_CORE |  |+-----------+  || ATAG_MEM  |  | increasing address+-----------+  || ATAG_NONE |  |+-----------+  v

The tag list should be stored in the system's Ram.

The tag list must be placed in a memory area. The kernel in this memory area can neither be decompressed nor be overwritten by a temporary file system. The recommended memory location is the first 16 KB size of RAM.

5. Call the kernel Image

Existing Bootloader: mandatory (required)

New Bootloader: mandatory (required)

Bootloader provides a connection option when calling the kernel. If the zimage image is stored in flash and is properly linked to start from flash, it is valid (valid) That bootloader calls zimage directly from flash ).

Zimage may also be placed in the system's RAM (any location of RAM) and called there. Note that the kernel uses 16 kB RAM under the kernel image to store page tables. Therefore, we recommend that you place this page table at 32kb of RAM.

In both cases, the following conditions must be met:

● CPU register settings

★R0 = 0;

★R1 = machine ID (as found in step 3)


★R2 = mark the physical address of the list in Ram

● CPU Mode

★All interruptions must be disabled

★The CPU must be set to SVC (operating system protection ),

● High-speed cache and mmus

★Off MMU (memory ing)

★The Instruction Cache can be set to on or off.

★The data cache must be disabled and cannot contain "dirty data"

● Device

★No response to the DMA Device

● Bootloader calls the kernel by directly redirecting to the First Command of the kernel image.



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.