0.11 Way (a): BIOS boot process

Source: Internet
Author: User

The BIOS constructs the interrupt vector table at the beginning of the memory, followed by the BIOS data area, and also the interrupt service program corresponding to the interrupt vector table. We are using these interrupt service programs to load the kernel into memory.
Interruption is a significant concept in the operating system and is a technical tool.

Load kernel programs and prepare for protected mode

For Linux 0.11来 said, the computer will be divided into three batches of the operating system successive kernel code, the first batch of BIOS interrupt int 0x19 The first sector bootsect content loaded into memory; the second batch, the third batch under the command of Bootsect, The contents of the subsequent 4 sectors and the subsequent 240 sectors are loaded into memory, respectively.

Let's take a look at the interrupt service program that int 0x19 points to--"Start load service program". First of all, this program is BIOS design, the code is fixed, and operating system-independent, its purpose is to find a floppy disk and load the first sector .
So the BIOS is independent of the operating system.

Then the first sector is loaded into the memory 0x07c00 location, the operating system appears.
This sector contains the Linux 0.11 boot program (commonly known as bootloader).

Here's a distinction: BIOS and bootloader are different. After the BIOS, Bootloader began to work. Bootloader is divided into two parts on a PC: the first-stage bootstrapper is located in the master Boot Record (MBR) to boot the second-stage bootstrapper on a partition, such as NTLDR, BOOTMGR, and GNU
Grub and so on. So the grub that we often see belongs to bootloader, of course it's not the BIOS.
In the case of ARM board porting, we usually crop the uboot so that the board has the right bootloader, but unlike the PC, there is no BIOS for embedded Linux, but it runs the bootloader directly from flash and then loads the kernel, So the BIOS is omitted.

So the first sector is called the boot sector (boot sector). The loading of the first sector marks the impending effect of the code in Linux 0.11. The code in the first sector is assembler Bootsect.s, which is the first time in memory that the Linux operating system has its own code, albeit just the boot code, since the computer was powered on.

To the present process is this:
Boot--bios--bootsect.s

For the BIOS developers, they only need to do: After the command to start the operating system, only from the boot sector to load the code into the 0X07C00 location, and this sector is stored in the operating system is not the boot program, regardless, the responsibility is pushed to the user. This means that the user wants to make sure the operating system is properly installed. The designer of the operating system must "locate" the program that was initially executed in the boot sector, while the rest of the program can be designed differently depending on the operating system.

0.11 Way (a): BIOS boot process

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.