|[ Team LiB ]|
Although mostly invisible and oft forgotten, your computer's BIOS is nevertheless one of its most important and enabling parts. The BIOS is, in fact, the one essential constituent that distinguishes one computer from another, even when they both share the same microprocessor, motherboard, and support hardware.
Strictly speaking, however, the BIOS isn't hardware at all, even though it is an essential part of your computer's hardware. The BIOS is special program code—in a word, software—that's permanently (or nearly so) encapsulated in ROM chips or, as is most often the case with newer computers, Flash memory. Because of the two-sided aspects of the BIOS, existing in the netherworld between hardware and software, it and other pieces of program code encapsulated in ROM or Flash memory are often termed firmware.
The importance of the BIOS arises from its function. The BIOS tests your computer every time you turn it on. It may even allocate your system's resources for you automatically, making all the adjustments necessary to accommodate new hardware. The BIOS also determines the compatibility of your computer with both hardware and software and can even determine how flexible your computer is in setup and use.
Firmware can do more. If some enterprising computer-maker wanted to, it could put the entire operating system and application software into firmware. Some portable computers actually came close—early Hewlett-Packard Omnibook sub-notebook computers packed Windows and part of Microsoft Office into their ROMs. Of course, these machines are not very useful any more. The Windows inside is version 3.0, which points out the disadvantage of putting too much into firmware—updates are cumbersome and the code-storage requirements of today's software would fill more chips than you could comfortably carry. The storage available in a computer's ROM gives engineers kilobytes to work with, not the gigabytes today's systems demand for storage of their software.
Today, firmware plays only a subsidiary role in most computers. All modern operating systems enhance the basic BIOS firmware with additional instructions loaded from disk like ordinary software—typically such enhancements totally replace the BIOS firmware. This new code supplied by the operating system performs some of the same functions as the traditional BIOS firmware, linking your computer's hardware to the software programs that you run. But every computer still requires at least a vestigial piece of BIOS firmware, if just to enable enough of your system to run so that it can load the operating system. Although the BIOS plays a less active role in every operation of your computer, it is essential to getting your computer going, and it remains an essential part of every new computer and future machines still waiting on the engineer's drawing board.
The BIOS code of most computers has a number of separate and distinct functions. The BIOS of a typical computer has routines that test the computer, blocks of data that give the machine its personality, special program routines that allow software to take control of the computer's hardware so that it can more smoothly mesh with the electronics of the system, and even a complete system (in some computers) for determining which expansion boards and peripherals you have installed and ensuring that they do not conflict in their requests for input/output ports and memory assignments. Although all these functions get stored in the same memory chips, the program code of each function is essentially independent of the rest. Each function is a separate module, and the name BIOS refers to the entire group of modules.
This list of functions is not an exhaustive list of what a BIOS could do. It represents only what the makers of current computers use the BIOS for. In fact, there's little limit on what BIOS code can do. Apple has long (since 1984) put most of the graphics of its Macintosh systems in its BIOS, and IBM for years encapsulated a small programming language in the BIOSs of its first computers.
The classic definition of the computer BIOS is the firmware that gives the computer its personality. This definition refers only to one functional module of the computer—the one that's invariably replaced by operating system code. The nebulous term personality described how the computer performed its basic functions, those necessary to make it a real computer. Although this definition included a number of different factors, including how quickly and smoothly various operations were completed, the term personality mostly distinguished computers from Apple Macintoshes.
Most of the personality of the computer has moved from its BIOS to the operating system, loaded entirely from disk storage into RAM. The BIOS now plays a subsidiary role. Chiefly it is in charge of getting your computer going and running things until your hard disk can disgorge the hundreds of megabytes of operating system code and software can take over control of your computer.
In most computers, the first thing the BIOS tells the microprocessor to do is to run through all the known components of the system—the microprocessor, memory, keyboard, and so on—and to test to determine whether they are operating properly. After the system is sure of its own integrity, it checks to see whether you have installed any expansion boards that hold additional BIOS code. If you have, the microprocessor checks the code and carries out any instructions it finds. A modern computer may even check to see whether any new expansion boards are plugged in without being set up properly. The BIOS code might then configure the expansion board so that it functions properly in your computer.
When the microprocessor runs out of add-in peripherals, it begins the actual bootup process, which engineers call the Initial Program Load (IPL). The BIOS code tells the microprocessor to jump to a section of code that tells the chip how to read the first sector of your floppy or hard disk. Program code then takes over from the BIOS and tells the microprocessor how to load the operating system from the disk to start the computer running.
Exactly what the BIOS does after the operating system loads depends on the operating system. The first computer operating system, DOS, worked in conjunction with the BIOS. DOS relied on the BIOS firmware, which includes several sets of routines that programs can call to carry out everyday functions, such as typing characters on the screen or to a printer, reading keystrokes, and timing events. Because of this basic library, programmers writing for DOS could create their grand designs without worrying about the tiny details.
With Windows, however, the BIOS gets pushed out of the way. After the BIOS has assured the operating integrity of your system, Windows takes over. First, the operating system starts loading its own boot code. Then, it installs drivers that take over the various interface functions of the BIOS, one by one.
The operating system replaces the BIOS interface routines for several reasons. Because software drivers load into RAM, they are not limited in the amount of space available for their code. Software drivers also extend the capabilities, whereas the BIOS limits them. Using only the BIOS, your computer cannot do anything that the BIOS does not know about. It enables you to use the wide variety of peripherals you're apt to connect to your computer. Moreover, because the BIOS is designed to run at bootup when your computer is in real mode, it uses only real-mode code, with all the limitations that implies (in particular, a total address space of 1MB). Software drivers can (and nowadays invariably do) run in protected mode. Not only can they access more memory, but protected mode drivers can be written in 32-bit code that executes faster on modern microprocessors.
|[ Team LiB ]|