Device Driver Basics

Device Driver Basics

by: Stephen Bucaro

Most people understand that the กhardwareก part of their computer is the real physical parts, like the keyboard, mouse, modem, hard drive and so on. They understand that the กsoftwareก is computer bits stored on the hard drive, CDROM, or other storage media. But most people are a little hazy about exactly what a กdriverก is.

In this article, Iกm going to reveal in plain English what a driver is, why we need drivers, and exactly where the drivers are hiding. To give you a basic understanding, Iกm going to go back, way back, to the early days of computers.

The Early Days

The year is 1981 and the world is in the midst of a severe resession. IBMกs main frame business has slowed and the company is losing money. Up until now they had been laughing at the array of microcomputers on the market: Atari, Commodore, sinclair. Toys really, mostly used to play computer games.

The problem was, these ‘toysก were selling like hot cakes. IBM had to get into that market and get into it fast. They didn’t have time to design and build a computer complete enough to compete in the market, so they built an กopen systemก. They used commonly available electronic components and they published every design detail (including the code), and they even provided plug in slots so that others could build components for their computer.

And people did provide components for the IBM PC. They provided video cards, memory expansion cards, inputoutput port cards, game port cards, hard disk interface cards, and much more. How were all these various devices able to interface with the PCกs operating system? Thatกs where a กdriverก comes in.

A hardware device is constructed with various electronic components using various control signals, but the software interface to the operating system is standardized. A deviceกs interface to the operating system must follow the interface specification. A driver is a piece of software that translates the hardwareกs control signals to signals that the operating system expects, and translates signals from the operating system to the hardwareกs control signals.

When the computer is started up, it would look in the กsystemก directory for files with the extension ก.drvก and load them into memory. Specific files like autoexec.bat, config.sys, and win.ini were used to inform the operating system about drivers. Hardware would be configured through these files, or through jumpers located on the device itself.

The driver specification evolved along with the PC. Today when a PC starts, it executes the program ntdetect.com which queries the hardware components and builds the registery key HKEY_LOCAL_MACHINE\HARDWARE\SYSTEM\CurrentControlSet. This key exists only in memory and is created each time the computer boots. If all the drivers are loaded successfully, a copy of the key is saved as ControlSet00X.

Under the registery key CurrentControlSet, the subkey กEnumก contains a subkey for each harware device on the computer. Each device key contains fields for Hardware ID, Driver ID, Device Parameters, and other configuration data. The 32bit drivers are files with the extension ก.sysก and can be found in the folder C:/winnt/system32.

Driver Signing

Microsoft has been the brunt of much criticism because of the poor reliability of the Windows Operating System. I feel that much of this criticism is justified. On the other hand, as I described in part 1 of this article, the PC was designed by IBM as an กopenก system. Anyone can sell a hardware device (or software) for the PC. Should Microsoft be held responsible for the quality from a thirdparty?

As I described in Part 1 of this article, the operating system doesn’t interface directly to a hardware device. There is a piece of software called a กdriverก that translates the hardwareกs control signals to signals that the operating system expects, and translates signals from operating system to the hardwareกs control signals. Obviously, the hardware manufacturer provides the driver.

Because the driver works between the operating system and the hardware, a bug in the driver can cause a serious problem. Many of the problems with Windows have come from bugs in thirdparty drivers that Microsoft had nothing to do with. For this reason, Microsoft created a Hardware Quality Lab to test drivers. A hardware manufacturer can submit their driver for testing, and if it is passes rigorous compatibility testing, it receives Microsoftกs digital signature.

You may have received a message during the installation of a hardware device warning that the driver was not signed. Why would a hardware manufacturer fail to have their driver certified by Microsoft? The computer hardware market is very competitive and the manufacturer might want to bring a new product to market before thorough testing can be completed. Or maybe they don’t want to or can’t afford to pay Microsoft for certification. The question is, should you click on the กContinueก button to install the unsigned driver?

In my experience, I have never been able to trace a problem to an unsigned driver. If itกs your home computer and you performed a backup recently, go ahead and install the unsigned driver. If itกs a computer on a corporate network, you may want to backout of the installation and see if you can locate a signed driver first. Many times a manufacturer will release a product with an unsigned driver, then later provide a signed driver as a free download from their website.

If you decide to go ahead and install an unsigned driver, you can always update the driver later. If your computer works with the unsigned driver, I would not update the driver. When it comes to updating drivers (or the computers BIOS) I go by the old saying, กif it ain’t broke don’t fix itก.

To update a driver, select Start | Settings | Control Panel and doubleclick on the กSystem Propertiesก Utility. In the กSystem Propertiesก Utility, select the กHardwareก tab and click on the กDevice Managerก button. In the กDevice Managerก window, rightclick on the device in the list and select กPropertiesก in the popup menu. In the กPropertiesก dialog box, select the driver tab and click on the กUpdate Driver…ก button.

In the กPropertiesก dialog box driver tab, you may have noticed the กRoll Back Driverก button. If your computer has problems with the new drive, you can click on the กRoll Back Driverก button to roll back to the previous the driver. Driver roll back saves only one previous driver, so if you update a driver, then update it again, the original driver is gone. If the computer has problems with the new driver, always roll back to the original driver before trying a different one. That way youกll always have the original driver to roll back to.

Copyright(C) Bucaro TecHelp.

Permission is granted for the below article to forward, reprint, distribute, use for ezine, newsletter, website, offer as free bonus or part of a product for sale as long as no changes are made and the byline, copyright, and the resource box below is included.

About The Author

Stephen Bucaro

To learn how to maintain your computer and use it more effectively to design a Web site and make money on the Web visit bucarotechelp.com To subscribe to Bucaro TecHelp Newsletter visit http://bucarotechelp.com/search/000800.asp

This article was posted on September 22, 2004

by Stephen Bucaro