Introduction to the open-source BIOS project for Linux

Source: Internet
Author: User
Article Title: an open-source BIOS project for 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.

In many systems, a large part of boot time is spent on providing traditional support for MS-DOS. Many projects, including LinuxBIOS and Open Firmware, attempt to use the latest code to replace the original BIOS system. They only implement the functions required to load and run the Linux kernel. This article briefly introduces the content of this field.

  Bell!

Although it seems quite natural to sound the horn when the PC hardware is powered on, there are actually some code to drive the speaker. This code is used to boot the firmware. In most PCs, this is called BIOS (short for basic input/output system ). BIOS provides underlying hardware support. Early x86 operating systems used them to access disks, monitors, and other things.

The first thing the BIOS needs to do is to perform various power-on tests: Determine (and possibly test) the available memory, and determine the clock speed. If the test succeeds, the machine's Horn will sound. This process is called power-on self test or POST. computers are very humorous about themselves. This term is often used as a verb: "This machine cannot pass the POST test, so we should replace the memory ".

Typically, diagnostics include Bell codes (different vendors provide different codes), or code that can be written to a specific bare address. Some plug-in cards can easily access the code. The standard solution is that the diagnostic code is written to port 80. Some manufacturers sell a card that displays the latest content written to port 80 in a hexadecimal format. If we want to perform strict debugging, we may want to have such a card or use a Better invention, such as PC Weasel, which can record the latest (256) POST Code for your reading. (For more information about PC Weasel, see the references section below .) Of course, the exact meaning of these codes varies with BIOS, and only some vendors provide documents. Fortunately, open-source vendors provide good documentation.

  What features does BIOS provide for us?

An operating system such as a MS-DOS can load other device drivers, such as a CD-ROM drive, but all hardware drivers are loaded at startup. The standard interfaces provided for these drivers are handled by the BIOS. For this reason, the BIOS needs to detect, identify, and initialize the device.

Similarly, the BIOS is responsible for initializing the memory. Not all operating systems need to initialize the memory, but early DOS systems usually need to perform this operation, even if most BIOS needs to be initialized for compatibility purposes today. This process may take a long time to complete, and many modern systems allow it to be permanently or partially disabled. At the same time, the BIOS tries to determine how much memory is available in the system. Other boot operations may also include initialization and enabling of the processor cache, configuring Dual CPU, building a processor information table, and building a connection to the PCI device in the system, even run the boot ROM provided by these devices, which can load other drivers.

There is a lot of work to do here. In fact, this is so complicated that some of my systems will take a minute or longer to complete the POST and subsequent driver initialization processes. BIOS can perform various hardware scans to find bootable devices. On some systems, BIOS can even perform network boot through Ethernet. One of my systems will spend about five seconds initializing network boot parameters, even if the network boot function is disabled. This is really annoying!

Last (but not least), BIOS still needs to perform a lot of initialization work. No matter which system you want to boot, some (but not all) of this work will be very useful. Allocating an interrupt request (IRQ) to a device is indeed a very useful service because it allows the OS to get only one service list and start running without programming them. Many devices have configuration registers. BIOS can write reasonable or correct values to these registers based on the settings in the system writable memory. (In general, such memory is called CMOS, although they are not strictly required to be implemented using this technology .)

What will happen after the BIOS completes these features? It looks for a piece of code somewhere (usually on a disk) and runs it, which usually loads an operating system. If the operating system is DOS or something similar, this setting means that we can quickly have our own command prompt.

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

Related Article

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.