BIOS

The acronym BIOS stands for Basic Input/Output System. In an IBM-compatible PC, the BIOS is implemented as read-only firmware that detects the presence (or absence) of critical system components and carries out checks to ensure they are functioning correctly when the computer is first powered on (this process is often referred to as the Power On Self Test or POST). If any problems are found during the POST, either a message is displayed on the screen or a pre-defined pattern of audible beeps is produced, depending on the exact nature of the problem. The BIOS then tells the computer how to locate and execute the boot code that will load and run the main operating system software. The sequence of events that occurs, from the time the computer is first switched on until the moment the operating system has finished loading and is ready to accept user commands, is called the boot sequence. The BIOS is embedded in a special-purpose microchip mounted on the mainboard that is specifically designed to work with the chipset used to implement the mainboard.


An AMI BIOS chip mounted on a mainboard

An AMI BIOS chip mounted on a mainboard


Prior to the advent of the IBM PC in 1981, home computers typically used read-only memory (ROM) to store the system's main operating system as firmware (other forms of non-volatile storage such as disk drives were not yet economically viable for the home computer market). In addition to its 64 kilobytes of RAM, for example, the Commodore 64 provided 20 kilobytes of ROM that held a BASIC interpreter and the core elements of its operating system. The first IBM PCs loaded the operating system software into random access memory from a floppy disk drive each time the system booted. Later versions were equipped with a fixed internal disk drive that was large enough to hold the operating system software, application programs, and user data. Only a stub operating system (BIOS) remained as firmware to allow the system to run the necessary checks on the system hardware and locate and run a small program stored in the boot sector of a floppy disk drive or hard drive (known as a boot-loader) that was responsible for loading the main operating system.

BIOS implements a number of basic commands for carrying out low-level I/O, such as handling keyboard input, outputting text to the screen, and performing disk read or write operations. In the early years of the IBM PC, the operating system employed was either IBM PC-DOS or MS-DOS (essentially, there was little or no difference between them). DOS used the low-level facilities provided by BIOS to control the computer's hardware. More sophisticated operating systems such as Windows 95 and its successors incorporate device driver software that can communicate directly with hardware controllers rather than relying on the services provided by the system BIOS. Once the boot sequence is complete, BIOS cedes control of the hardware to the main operating system.


Read-only memory (ROM)

Read-only memory (ROM) is a type of memory used in computers and other electronic devices that holds data that either cannot be modified, or can only be modified using non-routine procedures. For this reason, software stored in a ROM device is usually referred to as firmware. In older, solid-state types of ROM such as Programmable Read-Only Memory (PROM), data was written permanently to the ROM device during manufacture, and could never be modified. In more modern types of ROM such as Erasable Programmable Read-Only Memory (EPROM) and Electronically Erasable Programmable Read-Only Memory (EEPROM), data can be overwritten multiple times. The process by which this is achieved is typically infrequent and comparatively slow (depending on the particular implementation). Because of the difference in access times for ROM and RAM, the use of shadow BIOS ROM in computers has become commonplace. This involves copying the contents of the BIOS into RAM when the computer is powered up, so that a copy of the instructions stored in the BIOS can be accessed much more quickly from RAM when needed.

The contents of an EPROM device can be erased by exposing them to ultraviolet light (this typically takes about ten minutes). On an EPROM microchip, a quartz "window" allows UV light to enter. New data can be written back to the device through the application of a higher than normal voltage. After data has been written to the chip, a label is used to cover the window to prevent it from being accidentally erased. Repeated exposure to UV light will eventually render the EPROM unusable, but it will typically be good for about 1000 erase-rewrite cycles. The contents of an EEPROM device can be overwritten electronically, although in older types of EEPROM, the process of writing data to memory is far slower than for RAM. Flash memory is a newer form of EEPROM that can be erased and reprogrammed many tens of thousands of times, relatively quickly, and without any detriment to the integrity of the device. This type of EEPROM is now typically used in USB flash drives and digital cameras, as well as for computer BIOS.

BIOS chips are highly specialised, and are manufactured by a relatively small number of companies (notable example include American Megatrends Inc. and Phoenix Technologies) for a number of mainboard vendors. The ability to re-write the contents of the BIOS allows mainboard manufacturers to easily customise a proprietary BIOS chip for a particular chipset, and to offer BIOS upgrades to customers to rectify problems, improve compatibility, or enable the use of new or updated hardware. The utilities used to upgrade the BIOS firmware (referred to as flash utilities) can usually be downloaded from the mainboard vendor's website, although care should be taken to make sure that the software used has the correct version number, as an attempt to upgrade firmware using the wrong software could render the system unusable. Some mainboards have one or more backup facilities (DualBIOS or QuadBIOS) to ensure that the system can recover in the event of an abortive or incorrectly executed upgrade procedure.

During the boot sequence, the user has the opportunity to enter the BIOS setup program and configure a range of system parameters (usually by pressing one of the function keys or the DELETE key when prompted to do so by an on-screen message). The user-configurable parameters are stored in a separate part of the BIOS called the CMOS (which stands for complementary metal-oxide semiconductor), a special form of static RAM that requires very little current, and can be supplied with the power necessary to preserve its contents by a small lithium battery when the computer is powered down. The parameters that can be set by the user usually include the system date and time, various power-saving options, and the list of devices that should be searched by BIOS for boot sector code during the boot sequence (e.g. hard drive, CD-ROM drive, floppy disk drive etc.), and in what order. The BIOS setup program also allows the user to set a BIOS password to prevent unauthorised users from changing the configuration.


A typical BIOS setup menu

A typical BIOS setup menu