Basic input/output system BIOS

Source: Internet
Author: User
Tags clear screen

The basic input and output system (Basicinput output System,bios) is one of the most closely related software in computer system software, it contains the most basic interrupt service program, System Setup program, power-on self-test program and system startup bootstrap program. The BIOS program is the first program to start after the computer power on, complete the hardware detection and basic setup functions, the BIOS also for the operating system and other self-starting program development, loading provides interface, is the most basic system software. This paper mainly introduces the configuration and function of BIOS.

I. Overview of the BIOS

In the process of daily use of the computer, especially in the installation of operating systems, set up passwords and other operations, often access to the relevant concepts of the BIOS. The BIOS is an abbreviation for "Basicinput output system", where the name is "basic input and output systems". The BIOS is a set of programs in the ROM chip that is cured on the motherboard of the computer, which directly controls the input in computer system and provides the basis for establishing a connection between other software programs and hardware devices. The BIOS is the first program that executes when the computer is power-up, completes the initialization and testing functions of each hardware device of the system, to ensure that the system can work properly. If the hardware is not normal, immediately stop working, and the wrong device feedback to the user.

In the computer motherboard, the ROM that holds the BIOS program and its companion circuitry form the BIOS chip. The BIOS chip is usually a 32-pin, double-inline rectangular or square integrated circuit with a label labeled "BIOS" on the surface.

Depending on the characteristics of the ROM memory, the BIOS chip can be divided into two types of eprom and EEPROM. EPROM, known as erasable programmable read-only memory, has a small transparent window in the center of the chip that can erase the information stored on the chip using ultraviolet light, thus requiring an opaque label to seal the UV window of the EPROM chip that has saved the information. When writing to an EPROM, the information in the EPROM must be purged with the UV eraser, and each information store bit unit in the EPROM becomes a "1" state. While the EEPROM is electrically erasable programmable read-only memory, in general, EEPROM and EPROM are read-only, when the need to write content, as long as the specified pin plus a high voltage can be quickly written or erased. There is also an EEPROM is now common on the motherboard flashrom--flash memory, its read and write faster, more reliable, and can be read and write with a single voltage, programming, portable equipment for online operation provides a great convenience, and therefore widely used in computer motherboards. In general, the BIOS chip used in Intel486 and below 486 grade computer basically uses EPROM chip, and the BIOS chip used in 586 and above grade computer is basically EEPROM.

The main BIOS products used on the microcomputer motherboard are Amibios, Awardbios, Phoenixbios three types. Amibios is the AMI company produced BIOS system software, developed in the 80 's mid-term, the early 286, 386 most of the use of Amibios, it on a variety of software and hardware adaptability, to ensure the stability of the system performance. Awardbios is a BIOS product developed by Awardsoftware and is most widely used in desktop motherboards. Phoenixbios is a Phoenix product that outperforms Awardbios and Amibios in terms of performance and stability, and is used in server systems, branded machines and laptops. At present, Phoenix Company has merged with award company, its product Phoenix-awardbios applies to all kinds of microcomputer motherboard system.

Second, the composition of the BIOS

The BIOS program that is cured in ROM consists of the following sections.

1. BIOS Interrupt Service Program

Interrupts are an event that alters the sequence of instructions performed by the processor, which corresponds to an electrical signal generated by an external hardware circuit in the CPU chip. In the process of executing the program, the computer stops running the current program when there is an interruption, and turns to the processing of these interrupt events, and then returns to the interruption of the current program. The events resulting from interrupts are called interrupt sources, including external device requests, device failures, real-time clock requests, data channel interrupts, software interrupts, and so on. The processing of interrupts by the CPU is accomplished by executing an interrupt service program, which is written beforehand by the system developer for some kind of interrupt event, stored in an address space in memory, and the entry address of each interrupt service program is saved in the interrupt vector table. The interrupt source notifies the CPU when an interrupt request is made to the CPU that an interrupt class model N (n is defined as an integer between 0-255 in the x86 system), and each n is an integer number corresponding to an interrupt service program. Based on the interrupt type number, the CPU finds the interrupt vector table, locates the entry address of the corresponding interrupt service program, and then calls the Interrupt service program. The BIOS contains many interrupt service programs (or interrupt service routines), such as display Services (INT10H), Direct Disk Service (INT13h), keyboard services (int16h), etc., which can provide a programmable interface between the microcomputer software and hardware. For software functions and hardware equipment to achieve convergence. DOS, Windows and other operating systems on floppy disks, hard drives, optical drives and keyboards, monitors and other peripheral equipment management is based on the system BIOS. Programmers can also call the BIOS Interrupt service program directly.

2. BIOS System Setup program

The configuration parameters of each part of the microcomputer are placed in a read-write Cmosram Chip (CMOS), which holds the configuration information of the system CPU, the soft/hard drive, the monitor, the keyboard and other components. After the microcomputer shuts down the power supply, the system supplies the CMOS with a backup battery to keep the information. If the configuration information of the microcomputer components in CMOS is incorrect, the system performance can be reduced and the components can not be identified, and a series of hardware and software faults can be caused. A program installed in the BIOS chip, called a System Setup program, is used to set various parameters in the CMOS. The various brands and models of micro-computer to enter the CMOS settings interface used by the keys have different provisions. You can enter the CMOS system configuration program to set the relevant parameters by pressing the specified key after booting. The System Configuration program provides a good interface for users to use. The process of setting up CMOS parameters is also customarily referred to as "BIOS setup". The BIOS setup is usually required to add new parts or to install or upgrade the operating system.

It is important to note the differences between the CMOS settings and the BIOS setup concepts. CMOS is a microcomputer host board a special RAM chip, is the system parameter storage place, and the BIOS is a set of programs, stored on the motherboard EPROM or EEPROM chip, the BIOS contains the system Setup program is the means to complete the parameter setup. Therefore, it should be accurate to say that the CMOS parameters are set by the system Setup program in the BIOS.

3. Post power-on self-test program

After the microcomputer is plugged in, the system has a process for inspecting the internal devices, which is done by a program that is commonly referred to as POST (PowerOn Self Test, power-on-check). The complete post self-test process includes CPU, 640K basic memory, 1M of extended memory, ROM, motherboard, CMOS memory, serial port, the interface, display card, hard disk and keyboard testing. If a problem is found in the self-test, the system will give a message or whistle warning.

4. BIOS System Boot Bootstrap program

The role of the BIOS system boot Bootloader is to search for a valid boot drive, such as the hard drive and CDROM, network server, and so on in the boot sequence of the system CMOS setup after the post self-test is completed, read the operating system boot program, and then give the system control to the boot program. The operating system starts by stepping through the loading and initialization of the operating system kernel from the boot loader, completing the system startup.

III. Basic BIOS functions

According to the various programs included in the BIOS, the basic functions of BIOS are summarized as follows.

1. Self-Test and initialization

The BIOS program is responsible for booting the system before the microcomputer is plugged in to the operating system to start working. The first is through the post self-test system of the various parts of the inspection and testing, once in the self-test to find the problem, the system will give a message or whistle warning. Secondly, the BIOS can provide initialization services for microcomputer system, including creating interrupt vectors, setting registers, setting parameters for some external devices and so on, only when the hardware parameters are set up with the actual microcomputer hardware, the system can work normally. Finally, the BIOS is also responsible for booting the operating system. The BIOS first reads the boot record from the start sector of the hard disk, if it is not found, it will show no boot device on the display, if it is found the bootloader will transfer control of the microcomputer system to the bootloader, start by executing the bootloader, and gradually load the operating system into memory and execute the operating system program.

2. Provider service Processing

The BIOS is a "bridge" between the software and hardware of the microcomputer system, which can provide microcomputer input processing services for various operating system software and applications, such as reading and writing the disk, reading the keyboard, outputting the file to the printer, etc. In order to complete these operations, the CPU performs the command and data exchange between the input directly and the computer by executing the BIOS program, issuing commands to the input via a specific port, transmitting data to these external devices or receiving data from these devices. This enables operating system or application-to-input hardware operations.

3. Provides hardware interrupt handling

Because the BIOS contains a variety of interrupt service programs, when the system needs to operate on different hardware, the BIOS can call the interrupt service program to realize the control and use of microcomputer hardware equipment.

2, 32 part of the function is independent, but in use is closely related. These two parts are software and hardware services, usually work together to ensure the normal operation of the microcomputer system.

Four, the general process of microcomputer startup

Microcomputer equipment from the power supply to enter the operating system interface, in this short period of time, is the BIOS system control and work with the computer hardware, the following simple analysis of the general process of microcomputer startup.

1. When the power switch is pressed, the power supply starts to power the motherboard and other equipment, when the voltage is not stable, and when the motherboard is not considered to be the voltage of the CPU recorded in the CMOS voltage required, the CPU will be issued a reset signal (reset signal), When the voltage reaches the desired stable value, the reset signal is revoked, the CPU immediately reads a jump instruction from the BIOS section of the basic memory, jumps to the boot code of the BIOS, and starts to execute the BIOS program of the boot system.

2. The BIOS boot program performs a power-on self-test post. This process is very fast, its main task is to detect the key equipment, such as power, CPU chip, BIOS chip, basic memory and other circuits exist, the power supply is good. If there is a problem with the self-test, the system speaker beeps (depending on the length and number of times the alarm is heard).

3. If the self-test passes, the system BIOS looks for the video card bios, and when it is found, it invokes the initialization code of the video card BIOS, and the display begins to display, and the BIOS displays information about the video card on the screen.

4. After the video card detection is successful, other devices will be tested, the system BIOS re-execute the code after testing, and display the splash screen, the relevant information is displayed on the screen, then the memory test, and finally a brief system BIOS setup prompt information, At this point, press Enter the BIOS program to set the CMOS parameter Interface button, the system BIOS can be required to set the system will be restarted after completion.

5. The BIOS then detects the system's standard hardware (such as hard drives, optical drives, serial and parallel interfaces, etc.), detects Plug and Play devices after detection is complete, and, if any, allocates resources such as interrupts, DMA channels, and I/O ports for the device, so that all the devices have been detected. Older computers perform a clear screen operation and display a system configuration table, and the BIOS updates the extended system Configuration Data ESCD (Extendedsystem configuration DATA,ESCD) If there is a hardware change compared to the last boot. It is the data that the system BIOS uses to Exchange hardware configuration information with the operating system, and this data is stored in the CMOS. The new machine is no longer showing the content.

6. When all of the above steps are completed successfully, the BIOS will perform the last task: Follow the user-specified device sequence, and then look for the startup program from the device to complete the system boot. For example: We set the boot sequence is to start from the CD-ROM drive, and then boot from the hard disk, the BIOS will go to the CD-ROM drive to find the boot program, if there is no CD-ROM drive, the system then boot from the hard drive If the purpose of the boot is to load the operating system, then the microcomputer will execute the startup program, then load the operating system, complete the operating system initialization, and give control of the system to the operating system.

Basic input/output system BIOS

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.