Boot and initialization in Linux

Source: Internet
Author: User
Article Title: boot and initialization in Linux. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.

 Overview of system boot and initialization

Related Code (the program of the boot sector and its auxiliary program, taking the x86 system as an example ):

\ Linux-2.4.22 \ arch \ i386 \ boot \ bootsect. S: Linux boot sector source code; 512 bytes

\ Linux-2.4.22 \ arch \ i386 \ boot \ setup. S: Helper Program;

\ Linux-2.4.22 \ arch \ i386 \ boot \ video. S: Helper Program for Screen Display during boot.

\ Linux-2.4.22 \ arch \ i386 \ boot \ compressed \ head. S,

\ Linux-2.4.22 \ arch \ i386 \ boot \ compressed \ misc. c: used to extract the kernel Image

-----------------------------------------

\ Linux-2.4.22 \ arch \ i386 \ kernel \ head. s system initialization entry

\ Linux-2.4.22 \ init \ main. c system initialization entry

Reference: \ linux-2.5.75 \ Documentation \ i386 \ boot.txt

Process description

System power-on, CPU RESET

Jump to address 0xFFFFFFF0, Which is BIOS

The BIOS completes this operation and reads the content of the first sector to 0x7c00.

Is bootsect. S.

Move yourself to the absolute address 0x90000 and transfer it

Continued execution

Read data from the disk by calling "int 0x13" on the read disk provided by BIOS

Input setup and kernel Images

Read (boot/setup. S) 2 kb code into memory 0x90200,

Then jump to the setup code to prepare for executing the kernel image.

Execute startup_32 () from 0x100000 for initialization (head. s)

--> Start_kernel () [main. c]-cpu_idle ()

The init () process created by start_kernel () is scheduled and executed.

 1. redirection of commands and Its Mechanism

L 80x86/Pentium address ing

0? 640 KB MS-DOS Area.

640? 768 KB Video Buffer Area.

768? 896 KB in 16-KB sections (total of eight sections)-Expansion Area.

896-960 KB in 16-KB sections (total of four sections)-Extended System BIOS Area.

960-KB? 1-MB memory (BIOS Area)-System BIOS Area.

Extended memory zone: from 1 MB to 4 gb-1

-High BIOS area from 4 GB to 4 GB? 2 MB

Intel 82875 P Memory Controller Hub (MCH)

Memery monitoring and initialization: Before performing operations on the memory interface, you must initialize the mch dram register. MCH must be configured to operate on the installed memory type. the memory type and size are checked through the System Management Bus (SMBus) on ICH5. the two-wire bus obtains DRAM type and size information through the Serial Presence Detect port on dram dimm.

The BIOS needs to determine the memory size and type of each row to configure the MCH memory interface.

[1] [2] [3] [4] [5] Next page

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.