This section takes a look at the various functions that the BIOS performs, and discusses some of its characteristics. In addition to what is discussed in the sections below, the BIOS's other main responsibilities include booting the system, and providing the BIOS setup program that allows you to change BIOS parameters.
The BIOS Program
In order for any computer to function, it must have software to run on it. All that a processor--or any hardware for that matter--knows how to do is to follow instructions. The software is that collection of instructions, as described in this part of the Introduction. All regular programs that you run on your PC are stored permanently on your hard disk, and are loaded into your system memory (RAM) when you need to use them. From the memory, the processor can access the instructions coded into the program and run them, which lets you do your work.
When you first turn on your PC, the processor is "raring to go", but it needs some instructions to execute. However, since you just turned on the machine, your system memory is empty; there are no programs to run. To make sure that the BIOS program is always available to the processor, even when it is first turned on, it is "hard-wired" into a read-only-memory (ROM) chip that is placed on your motherboard.
A uniform standard was created between the makers of processors and the makers of BIOS programs, so that the processor would always look in the same place in memory to find the start of the BIOS program. The processor gets its first instructions from this location, and the BIOS program begins executing. The BIOS program then begins the system boot sequence which calls other programs, gets your operating system loaded, and your PC up and running.
The BIOS program is always located in a special reserved memory area, the upper 64K of the first megabyte of system memory (addresses F000h to FFFFh). Some BIOSes use more than this 64K area.
Other PC BIOSes
Although most people don't realize it, there are in fact several different BIOSes in your PC. When people say "the BIOS" they are of course referring to the main system BIOS. However there are also BIOSes to control peripherals that you put into your machine. Your video card has its own BIOS (in most cases) that contains hardware-driving instructions for displaying video information. Hard disks and other peripherals can contain their own BIOS instructions as well. Many SCSI host adapters for example have their own BIOS.
The BIOS and the Software Layer Model
As mentioned in many other places, one of the key factors in the success of the PC platform is the combination of a huge choice of hardware and software options, and at the same time compatibility between many different types of hardware and software. Backwards compatibility is particularly key; nobody wants to have to throw out their old software when hardware changes, and companies that have tried to ignore this have often suffered the consequences (e.g., the MCA bus).
Have you ever marveled at how most of the applications that ran on your AT-class machine in 1985 will still run on your Pentium today? This, despite radically different processors, system buses, memory, in fact, all the hardware is different, and the operating system is as well. I personally have many applications that I run still today that are 12 years old or more. How is this possible?
The key to this universality is the use of multiple software layers. Let's consider the use of a program like Microsoft Word 6.0, running on Windows 3.x. In a simplified view, when you run this application, you are actually employing four main software layers: Word 6.0 is the application; it runs on Windows; Windows runs on top of DOS and DOS runs on top of the system BIOS. The BIOS interfaces with the hardware. This table shows the various layers, from lowest to highest. The operating system and application can (and often are) composed themselves of multiple layers:
Layer # | Layer |
0 | Hardware |
1 | System BIOS |
2 | Operating System |
3 | Application |
Each of these layers contributes to compatibility in an essential way: it talks to the level below it using a standard interface. In order for Word 6.0 to work in Windows, it must follow certain rules set forth by the designers of Windows. Windows must follow rules set forth by the creators of DOS. And DOS must use a standardized way of talking to the system BIOS.
Each layer provides an abstraction model to the software that runs on it, by providing to the layer above it a set of services and functions that the layer above it can use. Word 6.0 doesn't worry about the hardware or DOS much at all; it simply calls Windows functions and lets Windows worry about DOS. Windows talks to DOS using DOS functions, etc. (This is somewhat simplified because in some cases the layers aren't this cleanly separated).
By using these standards, it makes it possible to mix and match various layers, as long as the programmers follow the rules. If you want to update your DOS version, Windows will still work as long as the new DOS version provides the same standard interface that the old one did; it can provide new functions, but not take away any of the old ones. Similarly, Word 6.0 will work on Windows 95 because Windows 95 provides the same facilities to Word that Windows 3.x did. This is how compatibility is maintained across changes to operating systems.
What does all this have to do with the BIOS? The BIOS is actually the pillar that supports all of this, because it provides the standard interface that DOS uses (or whatever the operating system is). The system hardware itself is the "mess at the bottom of the pile" that we are trying to have to avoid dealing with. In some ways, the most amazing part of all of this is that DOS itself will run on so many different machines. The BIOS is what makes this possible. Instead of DOS having to talk directly to the hardware, of which there are many, many possibilities. It talks to the BIOS, which is what is customized to the hardware. The BIOS hides the hardware from the operating system so it doesn't have to worry about it, by providing standardized services to the operating system.
As alluded to above, programs do not always have to follow this model exactly. It is possible for a DOS program to bypass DOS and the BIOS functions, and interface directly with the hardware. This is done normally for performance reasons; games do it most often. The problem is that this breaks the compatibility model; now the software does have to figure out what hardware it is using, and this makes these types of programs much less portable and compatible than ones that "play by the rules".
BIOS Services and Software Interrupts
The BIOS provides various software routines (subprograms) that can be called by higher-level software such as DOS, Windows, or their applications, to perform different tasks. Virtually every task that involves accessing the system hardware has traditionally been controlled using one or more of the BIOS programs (although many newer operating systems now bypass the BIOS for improved performance). This includes actions like reading and writing from the hard disk, processing information received from devices, etc.
BIOS services are accessed using software interrupts, which are similar to the hardware interrupts except that they are generated inside the processor by programs instead of being generated outside the processor by hardware devices. One thing that this use of interrupts does is to allow access to the BIOS without knowing where in memory each routine is located.
Normally, to call a software routine you need to know its address. With interrupts, a table called an interrupt vector table is used that bypasses this problem. When the system is started up, the BIOS puts addresses into this table that represent where its routines are located for each interrupt it responds to. Then, when DOS or an application wants to use a BIOS routine, it generates a software interrupt. The system processes the interrupt, looks up the value in the table, and jumps to the BIOS routine automatically. DOS itself and application programs can also use this interrupt vector table.
BIOS Feature "Magic Dates"
There are several important BIOS features or capabilities that have been introduced over the last few years. The only reliable way to ensure that your BIOS supports these is to check your BIOS or motherboard manual, or contact the manufacturer or dealer. However, there are some rules of thumb relating the BIOS date that you can use to give you an idea of whether or not a given machine is likely to support a given feature.
Here are the most common BIOS features and the approximate date that they were introduced. Obviously these are just rules of thumb; don't take all of this as definitive. It is fairly safe to say that if the BIOS date is more than a year earlier than a magic date, the feature almost certainly is not supported, and if it is more than a year after the date, it almost certainly is supported:
One of the most important functions that the BIOS plays is to boot up the system. When the PC is first turned on, its main system memory is empty, and it needs to find instructions immediately to tell it what to run to start up the PC. These it finds within the BIOS program, because the BIOS is in read-only permanent memory and so is always available for use, even when the rest of system memory is empty.
This section takes a look at what is involved in booting the PC, including a discussion of the steps in the system boot process, and a look at the power-on self-test (POST) that is conducted whenever the system starts up.
System Boot Sequence
The system BIOS is what starts the computer running when you turn it on. The following are the steps that a typical boot sequence involves. Of course this will vary by the manufacturer of your hardware, BIOS, etc., and especially by what peripherals you have in the PC. Here is what generally happens when you turn on your system power:
This process is called a "cold boot" (since the machine was off, or cold, when it started). A "warm boot" is the same thing except it occurs when the machine is rebooted using {Ctrl}+{Alt}+{Delete} or similar. In this case the POST is skipped and the boot process continues roughly at step 8 above.
BIOS Power-On Self Test (POST)
The first thing that the BIOS does when it boots the PC is to perform what is called the Power-On Seest, or POST for short. The POST is a built-in diagnostic program that checks your hardware to ensure that everything is present and functioning properly, before the BIOS begins the actual boot. It later continues with additional tests (such as the memory test that you see printed on the screen) as the boot process is proceeding.
The POST runs very quickly, and you will normally not even noticed that it is happening--unless it finds a problem (amazing how many things are like that, isn't it?) You may have encountered a PC that, when turned on, made beeping sounds and then stopped without booting up. That is the POST telling you something is wrong with the machine. The speaker is used because this test happens so early on, that the video isn't even activated yet! These beep patterns can be used to diagnose many hardware problems with your PC. The exact patterns depend on the maker of the BIOS; the most common are Award and AMI BIOSes. This part of the Troubleshooting Expert will help you figure out what the POST beep codes mean and what to do about them, if you are having this problem.
Note: Some POST errors are considered "fatal" while others are not. A
fatal error means that it will halt the boot process immediately (an example would be if
no system memory at all is found). In fact, most POST boot errors are fatal, since the
POST is testing vital system components.
Many people don't realize that the POST also uses extended troubleshooting codes that you can use to get much more detail on what problem a troublesome PC is having. You can purchase a special debugging card that goes into an ISA slot and accepts the debugging codes that the BIOS sends to a special I/O address, usually 80h. The card displays these codes and this lets you see where the POST stops, if it finds a problem. These cards are obviously only for the serious PC repairperson or someone who does a lot of work on systems.
BIOS Startup Screen
When the system BIOS starts up, you will see its familiar screen display, normally after the video adapter displays its information. These are the contents of a typical BIOS start up screen:
System Configuration Summary
Just before the BIOS begins booting the operating system from disk, it will display an ASCII-graphics box on the screen containing summary information about your system's configuration. What is in this box depends on your BIOS and system, of course, but typically you will find the following:
There are several components and features that are commonly found these days as part of a modern BIOS. This section discusses the various physical components that make up the BIOS feature of a typical machine. It also discusses flashing, or updating, the system BIOS.
The BIOS ROM
The main hardware component of the system BIOS is the system BIOS ROM itself. This is normally located in an electrically-erasable read-only memory (EEPROM) chip, which allows it to be updated through software control. This is commonly called a flash BIOS.
The BIOS ROM is located in a socket on the motherboard and is relatively easy to locate because it is usually labelled with the name of the BIOS manufacturer. Most times this is Award, American Megatrends (AMI) or Phoenix. There is also often a version number on the chip, although the actual BIOS version within the chip may be different from what is labelled, because of the ability to flash the BIOS mentioned above.
Under normal circumstances, the BIOS ROM is permanent and there is normally no reason to need to deal with it in any way. If for some reason the BIOS ROM were to become corrupted due to an aborted flash update, for example, you might find your PC left in a state where it could not be booted. In this situation, you might have to physically replace the BIOS ROM, but this is a very rare happening.
BIOS CMOS Memory
The BIOS settings that you use to control how your PC works must be saved in non-volatile memory so that they are preserved even when the machine is off. This is as opposed to regular system memory, which is cleared each time you turn off the PC. A special type of memory is used to store this information, called CMOS memory, and a very small battery is used to trickle a small charge to it to make sure that the data it holds is always preserved. These memories are very small, typically 64 bytes, and the batteries that they use typically last for years. This non-volatile memory is sometimes called NVRAM.
CMOS stands for "Complementary Metal Oxide Semiconductor". This is one type of technology used to make semiconductors (integrated circuits) such as processors, chipset chips, DRAM, etc. CMOS has the advantage of requiring very little power, compared to some other semiconductor technologies. This is why it was chosen for this use, so that the amount of power required from the battery would be minimal, and the battery would be able to last a long time. This memory came to be called just "CMOS" since in the early days most parts of the computer did not use CMOS. Ironically, with today's processors having to do more and more and needing to do it with lower power consumption, they themselves are typically made entirely with CMOS technology. However, "CMOS" by itself usually still refers to the BIOS settings memory. Old habits die hard in the computer world.
The system uses something called a CMOS checksum as an error-detecting code. Each time you change the BIOS settings, the checksum is generated by adding together all the bytes in the CMOS memory and then storing the lowest byte of the sum. Then, each time the system booted, the system recomputes the checksum and compares it to the stored value. If they are different, then the system knows that the CMOS has been corrupted somehow and will warn you with an error, typically something like "CMOS Checksum Error".
There are many different types of batteries used to power the CMOS; mostly, these have changed over time as technology has evolved. These batteries are discussed here. You will not normally have to deal with the CMOS memory directly; it holds the settings you enter in the BIOS setup program. Over time, it is possible you will have CMOS problems; for example, you may find that the machine may begin to forget its settings when it is booted. These are usually signs of trouble with the motherboard battery.
In addition to the standard CMOS memory used to hold system settings, Plug and Play BIOSes use an additional non-volatile memory to hold extended system configuration data (ESCD). This is used to record the resource configurations of system devices when Plug and Play is used.
BIOS Updates and The Flash BIOS
As you can see by looking at the rest of the information on the BIOS, it is a very important program indeed. Its quality and modernness determine the features and capabilities of your machine to a large degree. The most famous example of this is support for IDE/ATA hard disks over 504 MB; the only change necessary to support these larger drives in most cases is a BIOS capable of doing the geometry translation. There are other examples as well; many motherboard manufacturers are able to expand the capabilities of their boards, or fix problems with them, by making changes to the BIOS and either giving free downloads or selling upgrades, just as software application houses like Microsoft, Lotus, etc. do.
The BIOS program in your PC is programmed into a read-only memory (ROM). ROMs are, of course, not rewriteable the way RAM is; that is why they are called "read-only". This presents a problem when you want to update your BIOS. In "the old days" when you wanted to update your BIOS, the manufacturer sent you a new BIOS chip; you opened the box, pulled out the old chip, and put the new one in. Needless to say, this is a pain. Fortunately, technology came to the rescue through the invention of the flash BIOS. Some machines still require the physical upgrade but by using the flash BIOS, most newer machines can upgrade using special software without having to open the case at all.
Machines with flash BIOS capability use a special type of BIOS ROM called an EEPROM; this stands for "Electrically Erasable Programmable Read-Only Memory". As you can probably tell by the name, this is a ROM that can be erased and re-written using a special program. This procedure is called flashing the BIOS and a BIOS that can do this is called a flash BIOS. The advantages of this capability are obvious; no need to open the case to pull the chip, and much lower cost.
Many motherboards have a special "safety feature" to prevent accidental (or malicious) changes to the flash BIOS--a jumper that must be changed before performing a flash BIOS upgrade. While this is a security feature, it also obviates one of the great advantages of the flash BIOS, namely not having to open the case! Your motherboard manual will tell you whether you have a jumper or not. With the increasing commonality of viruses that can change flash BIOS code, this may soon be a feature on every motherboard.
There is one big disadvantage to using the flash process to upgrade your BIOS. While the BIOS is actually being flashed, it is in a very vulnerable state. If you are really unlucky and something very bad happens in the middle of the upgrade (for example, a power outage), it is possible to end up with a corrupted BIOS chip. You can also end up with a corrupted system if you boot the wrong flash BIOS image into the chip--motherboard manufacturers usually use an unintelligent, universal flash program that will happily program the entirely wrong BIOS image into your system if you tell it to! Fortunately, some manufacturers are now making these programs smarter. For example, Award's flash program checks the name of the image file against the model of motherboard and will complain if there is a mismatch. (Good idea, guys!)
If your system becomes corrupted to the point where it will not boot, you are in a catch-22. Your BIOS is corrupted, so you can't boot the PC, and since you can't boot the PC there's no conventional way to re-flash the BIOS. See this section in the troubleshooter for ideas on recovering from this problem.
Fortunately, BIOS chip corruption is quite rare; the BIOS is a small program and flashing it usually takes only a few seconds. Still, it's not something to try in the middle of a thunderstorm, and I try to use a UPS when doing this type of work, if possible. And be sure you are using the right BIOS image.
The Boot Block
The preceding section discusses updating the program code in the system BIOS by flashing it (replacing it under software control). If the flash procedure is done improperly, the BIOS code can become corrupted, which will cause the system to go into an unbootable state. Many newer systems come with a feature where a 4 KB "boot block" program is included as part of the BIOS. This is a tiny piece of code whose job it is to recover from a situation where the BIOS code is incorrect or corrupted.
If your motherboard supports this feature, when the PC tries to boot and finds the BIOS code corrupted, the boot block will try to recover the BIOS code, usually by reading it from a specially-prepared floppy disk. You may have to change a jumper on the motherboard to enable this capability, and you may need to make use of a "plain vanilla" ISA video card. The boot block will load the BIOS code and then when you next reboot, the regular BIOS code should be in place and the problem resolved.
You will need to follow the special recovery procedure outlined by your motherboard manufacturer if you want to take advantage of this feature.
Plug and Play
The BIOS is one of the four major parts of the system whose cooperation is required in order to implement Plug and Play features on a PC. In short, Plug and Play (also called "PnP" for short, I won't get into its sarcastic nicknames here ) is a system whereby your PC hardware, BIOS and operating system work together to identify and configure resource usage by hardware devices automatically. The intention is to reduce the number of resource conflicts, jumper settings, and manual driver setups required to get the system to work.
The BIOS is a key part of this; in fact it does much of the work of identifying and configuring expansion cards, and passing configuration information on to the operating system.
Despite its many functions and the important role it plays in running your PC, the system BIOS is most "famous" for the BIOS setup program, the little built-in utility that lets you set the many functions that control how your computer works. In fact, some people even call this program "the BIOS" or "the CMOS" which of course is inaccurate ("CMOS" refers to the technology used to create the tiny memory where the BIOS settings are stored).
Setup Program Manual
Your motherboard manual should come with instructions on how to use the setup program; the BIOS program and its settings typically take up the second half of the entire manual. Unfortunately, most of these manuals are pitifully inadequate. They will usually provide a list of each setting with one or two sentences to describe them, and that's about it. Better motherboard companies will do better than this.
Warning: Be sure to check the manual closely and compare it against the settings you
actually see on the screen. If you see mismatches, I would recommend you try to get an
updated manual from the various sources on the Internet. It is, unfortunately, all too
common to find incorrect or outdated BIOS manuals shipped with motherboards. This is
usually worse with cheaper motherboards, but even good ones tend to come with bizarrely
cryptic or inaccurate documentation.
Setup Program Interfaces
There is no standard interface for the BIOS setup program; it varies depending on the manufacturer and even within BIOSes by the same manufacturer. You would think that with only two companies (Award and American Megatrends, better known as AMI) dominating the field that they could coordinate and come up with some sort of a standard, but this has not happened. In fact, just the opposite, since AMI's newer BIOSes are actually Windows-like, complete with cursor and mouse control! Most traditional setup programs are text-based and use menus.
As PCs have grown more complex, they have started to have more and more settings that can be controlled. Generally speaking, this is a good thing, because you have much more control over how your system works than you ever have had before. However, it can also mean some confusion. Early PCs had a very simple setup program, sometimes even just a list of 10 or 12 questions displayed on the screen. Newer ones use sections to organize the various settings. Most PCs of the same general caliber will have similar settings, even though they may be organized differently.
Entering the BIOS Setup Program
The BIOS setup programs can normally be entered only during the boot process, either a cold boot or a warm boot (after hitting {Ctrl-Alt-Del}). Some setup programs will let you go into setup program using a key combination at any time.
At least one thing is finally becoming somewhat standard: the use of the {Del} key to enter the setup program during boot. This is true of AMI and Award BIOSes, and some others as well. Older BIOSes can use any of a myriad of strange key combinations, including {Esc}, {F1}, {F2}, {Ctrl-Esc}, {Alt-Esc}, {Ctrl-Alt-Esc}, {Ctrl-Alt-Enter}, {Ins} or others.
Typical Key Controls
Most setup programs show on the screen itself the keys to use to select and change various options; some instead use a very limited help screen, normally accessed with the F1 key. The following keys are pretty much universal:
The newer AMI BIOSes are graphical; you put a standard serial mouse on the first serial port and a faux Windows screen pops up with the settings in little "program groups". If you don't have a mouse or it isn't working, you can access this program using keys as well. (I tried it with a PS/2-style mouse once and it didn't work, strange that they wouldn't support this... could be that I did something wrong.)
Note: Some BIOSes have the ability to bypass some of the extended settings during
boot, by holding down the {Ins} key during the boot process. This can be useful in the
event that you make such incorrect settings that the BIOS cannot even boot (which can
happen, though it takes talent. ) Check your motherboard manual to see if your machine
can do this.