|
|
|
|
Power supply switched on.
|
|
The power supply performs a self-test. When all
voltages and current levels are acceptable, the supply indicates that the
power is stable and sends the Power Good signal to the processor. The
time from switch-on to Power Good is usually between .1 and .5 seconds.
|
|
|
|
|
|
The microprocessor timer chip receives the Power
Good signal.
|
|
With the arrival of the Power Good signal the
timer chip stops sending reset signals to the processor allowing the CPU
to begin operations.
|
|
|
|
|
|
The CPU starts executing the ROM BIOS code.
|
|
The CPU loads the ROM BIOS starting at ROM memory
address FFFF:0000 which is only 16 bytes from the top of ROM memory. As
such it contains only a JMP (jump) instruction that points to the actual
address of the ROM BIOS code.
|
|
|
|
|
|
The ROM BIOS performs a basic test of central
hardware to verify basic functionality.
|
|
Any errors that occur at this point in the boot
process will be reported by means of 'beep-codes' because the video
subsystem has not yet been initialized.
|
|
|
|
|
|
The BIOS searches for adapters that may need to
load their own ROM BIOS routines.
|
|
Video adapters provide the most common source of
adapter ROM BIOS. The start-up BIOS routines scan memory addresses
C000:0000 through C780:0000 to find video ROM. An error loading any
adapter ROM generates an error such as:
XXXX ROM Error
where XXXX represents the segment address of the
failed module.
|
|
|
|
|
|
The ROM BIOS checks to see if this is a
'cold-start' or a 'warm-start'
|
|
To determine whether this is a warm-start or a
cold start the ROM BIOS startup routines check the value of two bytes
located at memory location 0000:0472. Any value other than 1234h
indicates that this is a cold-start.
|
|
|
|
|
|
If this is a cold-start the ROM BIOS executes a
full POST (Power On Self Test). If this is a warm-start the memory test
portion of the POST is switched off.
|
|
The POST can be broken down into three components:
The Video Test initializes the video adapter,
tests the video card and video memory, and displays configuration
information or any errors.
The BIOS Identification displays the BIOS version, manufacturer, and
date.
The Memory Test tests the memory chips and displays a running sum of
installed memory.
|
|
|
|
Errors that occur during the POST can be
classified as either 'fatal' or 'non-fatal'. A non-fatal error will
typically display an error message on screen and allow the system to
continue the boot process. A fatal error, on the other hand, stops the
process of booting the computer and is generally signaled by a series of
beep-codes.
|
|
|
|
|
|
The BIOS locates and reads the configuration
information stored in CMOS.
|
|
CMOS (which stands for Complementary Metal-Oxide
Semiconductor) is a small area of memory (64 bytes) which is maintained
by the current of a small battery attached to the motherboard. Most
importantly for the ROM BIOS startup routines CMOS indicates the order in
which drives should be examined for an operating systems - floppy first,
CD-Rom first, or fixed disk first.
|
|
Operating System
|
|
|
|
If the first bootable disk is a fixed disk the
BIOS examines the very first sector of the disk for a Master Boot Record
(MBR). For a floppy the BIOS looks for a Boot Record in the very first
sector.
|
|
On a fixed disk the Master Boot Record occupies
the very first sector at cylinder 0, head 0, sector 1. It is 512 bytes in
size. If this sector is found it is loaded into memory at address
0000:7C00 and tested for a valid signature. A valid signature would be
the value 55AAh in the last two bytes. Lacking an MBR or a valid
signature the boot process halts with an error message which might read:
NO ROM BASIC - SYSTEM HALTED
A Master Boot Record is made up of two parts - the
partition table which describes the layout of the fixed disk and the
partition loader code which includes instructions for continuing the boot
process.
|
|
|
|
|
MBR
|
With a valid MBR loaded into memory the BIOS
transfers control of the boot process to the partition loader code that
takes up most of the 512 bytes of the MBR.
|
|
The process of installing multiple operating
systems on a single PC usually involves replacing the original partition
loader code with a Boot Loader program that allows the user to
select the specific fixed disk to load in the next step of the process.
|
|
|
|
|
Partition Table
|
The partition loader (or Boot Loader) examines the
partition table for a partition marked as active. The partition loader
then searches the very first sector of that partition for a Boot Record.
|
|
The Boot Record is also 512 bytes and contains a
table that describes the characteristics of the partition (number of
bytes per sectors, number of sectors per cluster, etc.) and also the jump
code that locates the first of the operating system files (IO.SYS in DOS)
|
|
|
|
|
Boot Record
|
The active partition's boot record is checked for
a valid boot signature and if found the boot sector code is executed as a
program.
|
|
The boot sector's loader check the root directory
of the active partition to ensure that the first two files found (DOS 6
or earlier) are IO.SYS and MSDOS.SYS (or their equivalent).
|
|
|
|
|
IO.SYS
|
If found in the first position on the active
partition, IO.SYS is loaded into the highest region of contiguous DOS
memory and the control of the boot process is handed over to it.
|
|
IO.SYS locates MSDOS.SYS (which immediately
follows it on disk in DOS 6 or earlier) and loads it into low memory,
overwriting the ROM BIOS initialization code that had been loaded there
earlier in the boot process.
|
|
|
|
|
MSDOS.SYS
|
After MSDOS.SYS is loaded into memory it
initializes the base device drivers, determines equipment status, resets
the disk system, resets and initializes attached devices, and sets the
system default parameters.
|
|
The full DOS file system is active, and the IO.SYS
initialization code is given back control over the boot process.
|
|
|
|
|
CONFIG.SYS
|
IO.SYS reads CONFIG.SYS (if present).
|
|
If loading CONFIG.SYS, DEVICE statements are
processed first in the order they appear. Then any INSTALL statements are
processed in the order they appear. The SHELL statement is then processed
loading the named program as the Command Line Interpreter for DOS. If no
SHELL statement is present COMMAND.COM is used as the default shell.
|
|
|
|
|
COMMAND.COM
|
COMMAND.COM is loaded into memory. It sits between
the user and DOS as the command line interpreter. If AUTOEXEC.BAT is
present, COMMAND.COM loads it and executes the commands it contains.
|
|
If AUTOEXEC.BAT is not found COMMAND.COM executes
its internal DATE and TIME commands.
|
|
|
|
|
DOS PROMPT
|
If everything goes well COMMAND.COM now displays
the DOS prompt and awaits the users commands.
|
|
Using the prompt command in AUTOEXEC.BAT and the
ANSI.SYS driver loaded by CONFIG.SYS the DOS prompt can be customized in
a number of ways. The standard DOS prompt is is created with the command:
PROMPT $P$G.
With the ANSI.SYS driver loaded the following
command displays a two color DOS prompt:
PROMPT $E[31m$p$g$E[0m$e[32;40m
|
|
0 Comments