|
How BIOS And Device
Drivers Work
The ROM BIOS Startup
Program organizes hardware, configuration information, and BIOS
information, as well as stores vital information in the I/O address table
in preparation for the operating system to take over.
The operating system
continues the process of initialization by loading device drivers into
memory. All this takes place before the first application software is
executed. It’s important to separate the BIOS used to initialize the
system from the BIOS stored in memory and referred to in the I/O address
table that is used to manage hardware devices.
One of the most
important procedures in the BIOS Startup Program is POST (power on self
test). During POST, when an expansion card such as the video controller
card (sometimes called the display adapter)
is accessed, the BIOS permanently stored on the card’s ROM chips tells the
computer that BIOS software is present on the card.
POST assigns the BIOS
software addresses in memory. The area of memory most often used for BIOS
programs working under DOS and Windows 9x is upper memory, the range of
memory addresses from 640K to 1024K. Recall that the location of the
program is stored in the I/O address table, which will later be accessed
by an IRQ request.
During the execution of
an application program, a device that needs to interrupt the CPU for
servicing is assigned a number called an IRQ.
The CPU uses this IRQ
to identify which peripheral device needs servicing. This interrupt
request number is associated with an address in the I/O address table that
allows the CPU to locate the System BIOS Program for the peripheral
device. For the keyboard, for example, the process works like this:
You press a key on the
keyboard.
The keyboard controller
sends its assigned IRQ to the CPU, thus saying, “I need attention.”
The CPU sees the IRQ
and turns its attention to servicing it.
The CPU uses the IRQ to
point to a row in the I/O address table assigned to that IRQ.
From the I/O address
table, the CPU locates the memory addresses in which the instructions to
service the keyboard are stored.
The CPU follows the
instructions stored at these upper memory addresses to process the
keystroke.
Sometimes data from the
device is temporarily stored in the I/O address table with the locating
address of the device driver or ROM BIOS needed to service the device. The
same action happens when data is read from a disk. The disk drive sends
the data along with the correct IRQ for the drive to the CPU. The disk
drive instructions used by the CPU are stored in System BIOS. The data is
handed over to the operating system, which can pass it along to an
application.
Video monitors do not
require an IRQ because they only receive data from the CPU and never send
data back to the CPU. (One exception is the touch screen monitor, which
serves as an input as well as an output device.) However, monitors do have
software that must be accessed by the CPU when the CPU wants to use the
monitor. Video cards control monitors; software to control monitors, also
a part of BIOS, is found on the video card together with some video RAM
that holds data being passed to the monitor.
<Previous>
<Home>
<Next>
|