BIOS System Boot Operations



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:

1.   The internal power supply turns on and initializes. The 
power supply takes some time until it can generate reliable power 
for the rest of the computer, and having it turn on prematurely 
could potentially lead to damage. Therefore, the chipset will 
generate a reset signal to the processor (the same as if you held 
the reset button down for a while on your case) until it receives 
the Power Good signal from the power supply.

2.   When the reset button is released, the processor will be 
ready to start executing. When the processor first starts up, it 
is suffering from amnesia; there is nothing at all in the memory 
to execute. Of course processor makers know this will happen, so 
they pre-program the processor to always look at the same place 
in the system BIOS ROM for the start of the BIOS boot program. 
This is normally location FFFF0h, right at the end of the system 
memory. They put it there so that the size of the ROM can be 
changed without creating compatibility problems. Since there are 
only 16 bytes left from there to the end of conventional memory, 
this location just contains a "jump" instruction telling the 
processor where to go to find the real BIOS startup program.

3.   The BIOS performs the power-on self test (POST). If there 
are any fatal errors, the boot process stops. POST beep codes can 
be found in this area of the Troubleshooting Expert .

4.   The BIOS looks for the video card. In particular, it looks 
for the video card's built in BIOS program and runs it. This BIOS 
is normally found at location C000h in memory. The system BIOS 
executes the video card BIOS, which initializes the video card. 
Most modern cards will display information on the screen about 
the video card. (This is why on a modern PC you usually see 
something on the screen about the video card before you see the 
messages from the system BIOS itself).

5.   The BIOS then looks for other devices' ROMs to see if any of 
them have BIOSes. Normally, the IDE/ATA hard disk BIOS will be 
found at C8000h and executed. If any other device BIOSes are 
found, they are executed as well. 
6.   The BIOS displays its startup screen.

7.   The BIOS does more tests on the system, including the 
memory count-up test which you see on the screen. The BIOS will 
generally display a text error message on the screen if it 
encounters an error at this point; these error messages and 
their explanations can be found in this part of the 
Troubleshooting Expert .

8.   The BIOS performs a "system inventory" of sorts, doing more 
tests to determine what sort of hardware is in the system. 
Modern BIOSes have many automatic settings and will determine 
memory timing (for example) based on what kind of memory it 
finds. Many BIOSes can also dynamically set hard drive 
parameters and access modes, and will determine these at roughly 
this time. Some will display a message on the screen for each 
drive they detect and configure this way. The BIOS will also 
now search for and label logical devices (COM and LPT ports) .

9.   If the BIOS supports the Plug and Play standard, it will 
detect and configure Plug and Play devices at this time and 
display a message on the screen for each one it finds. See here 
for more details on how PnP detects devices and 
assigns resources .

10. The BIOS will display a summary screen about your system's 
configuration. Checking this page of data can be helpful in 
diagnosing setup problems, although it can be hard to see because 
sometimes it flashes on the screen very quickly before scrolling 
off the top.

11. The BIOS begins the search for a drive to boot from. Most 
modern BIOSes contain a setting that controls if the system 
should first try to boot from the floppy disk (A:) or first try 
the hard disk (C:). Some BIOSes will even let you boot from 
your CD-ROM drive or other devices, depending on the boot 
sequence BIOS setting .

12. Having identified its target boot drive, the BIOS looks for 
boot information to start the operating system boot process. If 
it is searching a hard disk, it looks for a master boot record 
at cylinder 0, head 0, sector 1 (the first sector on the disk); 
if it is searching a floppy disk, it looks at the same address 
on the floppy disk for a volume boot sector.

13. If it finds what it is looking for, the BIOS starts the 
process of booting the operating system, using the information 
in the boot sector. At this point, the code in the boot sector 
takes over from the BIOS. The DOS boot process is described in 
detail here . If the first device that the system tries (floppy, 
hard disk, etc.) is not found, the BIOS will then try the next 
device in the boot sequence, and continue until it finds a 
bootable device.

14. If no boot device at all can be found, the system will 
normally display an error message and then freeze up the 
system. What the error message is depends entirely on the BIOS, 
and can be anything from the rather clear "No boot device 
available" to the very cryptic "NO ROM BASIC - SYSTEM HALTED". 
This will also happen if you have a bootable hard disk partition 
but forget to set it active .

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 Self-Test, 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: 

The BIOS Manufacturer and Version Number.
The BIOS Date: The date of the BIOS can be important in helping 
you determine its capabilities, since the "magic dates" of some 
features are fairly well known. 

Setup Program Key: The key or keys to press to enter the BIOS 
setup program. (This is usually {Del}, sometimes {F2}, 
and sometimes another key combination.

System Logo: The logo of the BIOS company, or in some cases the 
PC maker or motherboard manufacturer. 

The "Energy Star" Logo: This distinctive logo is displayed if 
the BIOS supports the Energy Star standard, which almost all 
newer ones do.

The BIOS Serial Number: This is normally located at the bottom 
of the screen. Since BIOSes are highly customized to the 
particular motherboard, this serial number can be used in many 
cases to determine the specific motherboard and BIOS version you 
are using. Check out Wim Bervoets' BIOS for a huge list of 
these numbers. 


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:

Processor (CPU) Type: This is usually the general family of 
processor, like "Pentium" or "Pentium Pro" etc. Newer BIOSes will 
recognize the Intel-compatibles directly; older ones may display 
"Pentium" when the chip really isn't one. You may see this 
displayed as "Pentium-S" on a system with Award BIOS; this just 
means that the processor incorporates SMM, enhanced power 
management features that were introduced in the 486SL and 
incorporated into almost all current processor.

Coprocessor: This used to be used to indicate if the machine had 
a separate coprocessor or floating point unit (FPU) in it. Modern 
processors have this built-in so this will almost always say 
"Installed" or "Integrated".

Clock Speed: The speed of the processor in MHz. Some BIOSes put 
the speed of the processor together with the processor type 
display (the first line).

Floppy Drive A: The size and capacity of the first detected 
 floppy disk, A:

Floppy Drive B: The size and capacity of the second detected 
 floppy disk, B:

IDE/ATA Drives: Most BIOSes will show an entry for each of the 
four devices on an IDE system: the primary slave and master, 
and the secondary slave and master. Older machines only support 
two IDE drives and will often just call these "Drive C" and 
"Drive D", which is misleading (since each drive can actually 
contain more than one drive letter). For each drive installed in 
the system, the screen will show its size and what sort of modes 
it is using for access (PIO modes, whether or not it is using 
LBA, etc.). Some BIOSes will also display the drive's 
manufacturer. Most modern BIOSes will also detect and show IDE 
(ATAPI) CD-ROMs.

Base Memory Size: This will (almost?) always be 640K. This is 
also called conventional memory .

Extended Memory Size: How much extended memory your system has. 
If you add this to the base memory you will usually find that 
128K, 256K or 384K of memory is "missing" from the number that 
it should be (see the "powers of 2" table for usual byte totals 
for 16MB, 32MB etc.) The BIOS usually will not report the upper 
memory area that is reserved for the BIOS ROM and other 
hardware adapters.

Cache Size: The amount of cache memory in the system.

Memory Type and Configuration: Most newer systems will display 
how many banks of memory have been found, and what memory 
technology is in use; for example, you may see "EDO DRAM at 
Bank 1" or "FP: 0" (FPM DRAM) or something similar.

Display Type: This will normally say "VGA/EGA". It doesn't 
really tell you anything at all about the video adapter since 
this describes generically every video adapter produced for the 
last ten or so years (why do they even bother?)

Serial Port(s): The I/O port addresses of your serial or COM 
ports . Normally there are two, with addresses 3F8h and 2F8h, 
but there can be three or four as well.

Parallel Port(s): The I/O port addresses of your parallel or LPT 
ports . Normally there is one, with the address 378h, but you 
may see 278h or 3BCh here.

Plug and Play Devices: Some BIOSes will report the descriptions 
of any Plug and Play expansion cards they identify during 
the boot process.
