CHAPTER 6

BIOS

In this chapter, you will learn how to

•   Explain the function of BIOS

•   Distinguish among various CMOS setup utility options

•   Describe option ROM and device drivers

•   Troubleshoot the power-on self test (POST)

•   Maintain BIOS and CMOS properly

In Chapter 4, “Microprocessors,” you saw how the address bus and external data bus connect RAM to the CPU via the memory controller chip (MCC) to run programs and transfer data. Assuming you apply power in the right places, you don’t need anything else to make a simple computer. The only problem with such a simple computer is that it would bore you to death—there’s no way to do anything with it! A PC needs devices such as keyboards and mice to provide input, and output devices such as monitors and sound cards to communicate the current state of the running programs to you. A computer also needs permanent storage devices, such as hard drives, USB drives, and optical drives, to store programs and data when you turn off the computer.

This chapter discusses in detail the core programming and supporting hardware that enables the many different internal and external devices in a computer to function together. We’ll start with a couple of sections on why and how it all works, and then we’ll look at hardware and self-testing circuits. The chapter finishes with the finer points of maintaining this essential programming and hardware.

901

We Need to Talk

Simply placing a number of components into a computer is useless if the CPU can’t communicate with them. Getting the CPU to communicate with a device starts with some kind of interconnection—a communication bus that enables the CPU to send commands to and from devices. To make this connection, let’s promote the MCC, giving it extra firepower to act as not only the interconnection between the CPU and RAM but also the interconnection between the CPU and the other devices on the PC. The MCC isn’t just the memory controller anymore, so let’s call it the Northbridge because it acts as the primary bridge between the CPU and the rest of the computer (see Figure 6-1).

Images

Figure 6-1 Meet the Northbridge

Your PC uses so many devices, the PC industry decided to delegate some of the interconnectivity work to a second chip called the Southbridge. The Northbridge deals with high-speed interfaces such as the connection to your video card and RAM. The South-bridge works mainly with lower-speed devices such as the USB controller and hard drive controllers. Chip makers design matched sets of particular models of Northbridge and Southbridge to work together. You don’t buy a Northbridge from one company and a Southbridge from another—they’re sold as a set. We call this set of Northbridge and Southbridge the chipset.

Images

EXAM TIP Modern processors include the functions of the Northbridge directly on the CPU. The Southbridge is called the Input/Output Controller Hub (ICH) in Intel systems and the Fusion Controller Hub (FCH) in AMD systems. Current systems move the Southbridge feature to the Platform Controller Hub (PCH), connected directly to the CPU.

To help you understand their function, however, I’ll still refer to the Northbridge and Southbridge as distinct elements. Also, the 901 exam refers to them as distinct chips.

The chipset extends the data bus to every device on the PC. The CPU uses the data bus to move data to and from all of the devices of the PC. Data constantly flows on the external data bus among the CPU, chipset, RAM, and other devices on the PC (see Figure 6-2).

Images

Figure 6-2 The chipset extending the data bus

The first use for the address bus, as you know, is for the CPU to tell the chipset to send or store data in memory and to tell the chipset which section of memory to access or use. Just as with the external data bus, the chipset extends the address bus to all of the devices (see Figure 6-3). That way, the CPU can use the address bus to send commands to devices, just as it sends commands to the chipset.

Images

Figure 6-3 Every device in your computer connects to the address bus.

It’s not too hard to swallow the concept that the CPU uses the address bus to talk to the devices, but how does it know what to say to them? How does it know all of the patterns of ones and zeros to place on the address bus to tell the hard drive it needs to send a file? Let’s look at the interaction between the keyboard and CPU for insight into this process.

Talking to the Keyboard

The keyboard provides a great example of how the buses and support programming help the CPU get the job done. In early computers, the keyboard connected to the external data bus via a special chip known as the keyboard controller. Don’t bother looking for this chip on your motherboard—the Southbridge now handles keyboard controller functions. The way the keyboard controller—or technically, the keyboard controller circuitry—works with the CPU, however, has changed only a small amount in the past 25+ years, making it a perfect tool to illustrate how the CPU talks to a device.

Images

NOTE Techs commonly talk about various functions of the chipset as if those functions were still handled by discrete chips. So you’ll hear about memory controllers, keyboard controllers, mouse controllers, USB controllers, and so on, even though they’re all just circuits on the CPU, Northbridge, or Southbridge.

The keyboard controller was one of the last single-function chips to be absorbed into the chipset. For many years—in fact, well into the Pentium III/early Athlon era—most motherboards had separate keyboard controller chips. Figure 6-4 shows a typical keyboard controller from those days. Electronically, it looked like Figure 6-5.

Images

Figure 6-4 A keyboard chip on a Pentium motherboard

Images

Figure 6-5 Electronic view of the keyboard controller

Images

NOTE Even though the model numbers changed over the years, you’ll still hear techs refer to the keyboard controller as the 8042, after the original keyboard controller chip.

Every time you press a key on your keyboard, a scanning chip in the keyboard notices which key you pressed. Then the scanner sends a coded pattern of ones and zeros—called the scan code—to the keyboard controller. Every key on your keyboard has a unique scan code. The keyboard controller stores the scan code in its own register. Does it surprise you that the lowly keyboard controller has a register similar to a CPU? Lots of chips have registers—not just CPUs (see Figure 6-6).

Images

Figure 6-6 Scan code stored in keyboard controller’s register

How does the CPU get the scan code out of the keyboard controller (see Figure 6-7)? While we’re at it, how does the CPU tell the keyboard to change the typematic buffer rate (when you hold down a key and the letter repeats) or to turn the number lock LED on and off, to mention just a few other jobs the keyboard needs to do for the system? The point is that the keyboard controller must be able to respond to multiple commands, not just one.

Images

Figure 6-7 The CPU ponders the age-old dilemma of how to get the 8042 to cough up its data.

The keyboard controller accepts commands exactly as you saw the CPU accept commands in Chapter 4. Remember when you added 2 to 3 with the 8088? You had to use specific commands from the 8088’s codebook to tell the CPU to do the addition and then place the answer on the external data bus. The keyboard controller has its own codebook—much simpler than any CPU’s codebook, but conceptually the same. If the CPU wants to know what key was last pressed on the keyboard, the CPU needs to know the command (or series of commands) that orders the keyboard controller to put the scan code of the letter on the external data bus so the CPU can read it.

BIOS

The CPU doesn’t magically or otherwise automatically know how to talk with any device; it needs some sort of support programming loaded into memory that teaches it about a particular device. This programming is called basic input/output services (BIOS). The programs dedicated to enabling the CPU to communicate with devices are called services (or device drivers, as you’ll see later in the chapter). This goes well beyond the keyboard, by the way. In fact, every device on the computer needs BIOS! But let’s continue with the keyboard for now.

Bringing BIOS to the PC

A talented programmer could write BIOS for a keyboard if the programmer knew the keyboard’s codebook; keyboards are pretty simple devices. This begs the question: Where would this support programming be stored? Programming could be incorporated into the operating system. Storing programming to talk to the hardware of your PC in the operating system is great—all operating systems have built-in code that knows how to talk to your keyboard, your mouse, and just about every piece of hardware you may put into your PC.

That’s fine once the operating system’s up and running, but what about a brand new stack of parts you’re about to assemble into a new PC? When a new system is being built, it has no operating system. The CPU must have access to BIOS for the most important hardware on your PC: not only the keyboard, but also the monitor, mass storage drives, optical drives, USB ports, and RAM. This code can’t be stored on a hard drive or optical disc—these important devices need to be ready at any time the CPU calls them, even before installing a mass storage device or an operating system.

The perfect place to store the support programming is on the motherboard. That settles one issue, but another looms: What storage medium should the motherboard use? DRAM won’t work, because all of the data would be erased every time you turned off the computer. You need some type of permanent program storage device that does not depend on other peripherals to work. And you need that storage device to sit on the motherboard.

ROM

Motherboards store the keyboard controller support programming, among other programs, on a special type of device called a read-only memory (ROM) chip. A ROM chip stores programs, called services, exactly like RAM—that is, like an 8-bit-wide spreadsheet. But ROM differs from RAM in two important ways. First, ROM chips are nonvolatile, meaning that the information stored on ROM isn’t erased when the computer is turned off. Second, traditional ROM chips are read-only, meaning that once you store a program on one, you can’t change it.

Modern motherboards use a type of ROM called flash ROM that differs from traditional ROM in that you can update and change the contents through a very specific process called “flashing the ROM,” covered later in this chapter. Figure 6-8 shows a typical flash ROM chip on a motherboard. When the CPU wants to talk to the keyboard controller, it goes to the flash ROM chip to access the proper programming.

Images

Figure 6-8 Typical flash ROM

Every motherboard has a flash ROM chip, called the system ROM chip because it contains code that enables your CPU to talk to the basic hardware of your PC (see Figure 6-9). As alluded to earlier, the system ROM holds BIOS for more than just the keyboard controller. It also stores programs for communicating with hard drives, optical drives, display devices, USB ports, and other basic devices on your motherboard.

Images

Figure 6-9 Function of the flash ROM chip

To talk to all of that hardware requires hundreds of little services (2 to 30 lines of code each). These hundreds of little programs stored on the system ROM chip on the motherboard are called, collectively, the system BIOS (see Figure 6-10). Techs call programs stored on ROM chips of any sort firmware.

Images

Figure 6-10 CPU running BIOS service

Images

EXAM TIP Programs stored on ROM chips—flash or any other kind of ROM chip—are known collectively as firmware, as opposed to programs stored on dynamic media, which are collectively called software.

System BIOS Support

Every system BIOS has two types of hardware to support. First, the system BIOS supports all of the hardware that never changes, such as the keyboard. (You can change your keyboard, but you can’t change the keyboard controller built into the Southbridge.) Another example of hardware that never changes is the PC speaker (the tiny one that beeps at you, not the ones that play music). The system ROM chip stores the BIOS for these and other devices that never change.

Second, the system BIOS supports all of the hardware that might change from time to time. This includes RAM (you can add RAM) and hard drives (you can replace your hard disk drive [HDD] with a larger drive or a solid-state drive [SSD], or add additional drives of either type). The system ROM chip stores the BIOS for these devices, but the system needs another place to store information about the specific details of a piece of hardware. This enables the system to differentiate between a Western Digital Green 2-TB HDD and a Samsung 850 EVO 500-GB SSD, and yet still support both drives right out of the box.

UEFI

For many years, PCs used 16-bit BIOS that required x86-compliant hardware. That was fine until really large hard drives (3+ terabytes) came on the market. At that point, Intel released the BIOS used in modern systems, called the Unified Extensible Firmware Interface (UEFI). Here are a few advantages of UEFI over the 16-bit BIOS:

•   UEFI supports file systems that enable booting to drives larger than 2.2 TB.

•   UEFI supports 32-bit or 64-bit booting.

•   UEFI handles all boot-loading duties.

•   UEFI is not dependent on x86 firmware.

Current systems—Windows, Mac OS X, and Linux—use UEFI and also provide legacy support for BIOS services. But a zillion older systems use the older BIOS. Most techs continue to call the support software BIOS, even though technically the terms differ. There’s no standardization on how to pronounce UEFI, by the way. Microsoft initializes it: “U-E-F-I.” Others say “you-fee” or “you-fie.” For a job interview, stick with initializing it. You can’t go wrong that way.

CMOS

A separate memory chip, called the complementary metal-oxide semiconductor (CMOS) chip, stores the information that describes specific device parameters. CMOS does not store programs; it only stores data that is read by BIOS to complete the programs needed to talk to changeable hardware. CMOS also acts as a clock to keep the current date and time.

Years ago, CMOS was a separate chip on the motherboard, as shown in Figure 6-11. Today, CMOS is almost always built into the Southbridge.

Images

Figure 6-11 Old-style CMOS

Most CMOS chips store around 64 KB of data, but the PC usually needs only a very small amount—about 128 bytes—to store all of the necessary information on the changeable hardware. Don’t let the tiny size fool you. The information stored in CMOS is absolutely necessary for the PC to function!

If the data stored on CMOS about a particular piece of hardware (or about its fancier features) is different from the specs of the actual hardware, the computer cannot access that piece of hardware (or use its fancier features). It is crucial that this information be correct. If you change any of the previously mentioned hardware, you must update CMOS to reflect those changes. You need to know, therefore, how to change the data on CMOS.

Images

EXAM TIP All the details of BIOS and CMOS that you’re going to spend many hours memorizing for the 901 exam only apply to PCs and Linux machines. Apple computers have BIOS and CMOS, but Apple designs their systems from the ground up as unified systems. Apple has done all the work for you and you simply use the Mac OS X machine. (Some older Mac Pro systems enable you to add drives; with newer systems, you’d use external drives.)

Modify CMOS: The Setup Program

Every PC ships with a program built into the system ROM called the CMOS setup program or the system setup utility that enables you to access and modify CMOS data. When you boot a computer, the first thing you likely see is the BIOS information. It might look like the example shown in Figure 6-12 or perhaps like the example shown in Figure 6-13.

Images

Figure 6-12 AMIBIOS information

Images

Figure 6-13 Award/Phoenix BIOS information

Images

NOTE The terms CMOS setup program, CMOS, and system setup utility are functionally interchangeable today. You’ll even hear the program referred to as the BIOS setup utility, UEFI/BIOS setup, or UEFI firmware settings. Most techs just call it the CMOS.

Who or what is AMIBIOS, and who or what is Phoenix Technologies? These are brand names of BIOS companies. They write BIOS programs and sell them to computer manufacturers. In today’s world, motherboard makers rarely write their own BIOS. Instead, they buy their BIOS from specialized third-party BIOS makers such as Award Software and Phoenix Technologies. Although several companies write BIOS, two big companies control 99 percent of the BIOS business: American Megatrends (AMI) and Phoenix Technologies. Phoenix bought Award Software and still sells the Award brand name as a separate product line. These three are the most common brand names in the field.

Accessing CMOS Through Windows

Traditionally, you access a system’s CMOS setup program at boot. In a functioning UEFI-based system running Windows 8 or 8.1, however, you can access setup from the Settings charm on the Charms bar. Here’s the process in case CompTIA grills you on it for the 901 exam.

Drag your cursor to the top- or bottom-right corner of the screen to activate the Charms bar. Select Settings to open the Settings charm (see Figure 6-14). Click the option to Change PC settings.

Images

Figure 6-14 Settings charm options

In the PC settings app (see Figure 6-15), click the Update and recovery link (lower left) to get to the Update and recovery screen (which initially shows the Windows Update option selected). Select the Recovery link (see Figure 6-16) to see the desired options on the right (see Figure 6-17).

Images

Figure 6-15 PC settings app

Images

Figure 6-16 Update and recovery screen

Images

Figure 6-17 Recovery options on the Update and recovery screen

Under Advanced startup, click the Restart now button to get to the Choose an option screen, shown in Figure 6-18. Click Troubleshoot to get to the Troubleshoot screen for more options (see Figure 6-19).

Images

Figure 6-18 Choose an option screen

Images

Figure 6-19 Troubleshoot options

Careful here. Windows 8.1 has three options on the Troubleshoot screen, as you can see in Figure 6-19. The first two, Refresh your PC and Reset your PC, enable you to do some serious damage to a working computer. Refresh will save your “files,” but remove all desktop applications. Reset does a full wipe and reinstallation of Windows. Say goodbye to any data that is not backed up!

We’re just trying to get to the system setup utility now, so click the third option, Advanced options. This takes you to the Advanced options screen (see Figure 6-20). From here, click the UEFI Firmware Settings option. The system will reboot and go into the system setup utility.

Images

Figure 6-20 UEFI Firmware Settings option on the Advanced options screen

As you might imagine, it’s a lot faster to reboot and access the CMOS setup manually. The Windows 8/8.1 process via the Charms bar is tedious at best.

Accessing CMOS at Boot

So, the real question is how to access the CMOS setup at boot for your particular PC. AMI, Award, and Phoenix use different keys to access the CMOS setup program. Usually, BIOS manufacturers tell you how to access the CMOS setup right on the screen as your computer boots. For example, at the bottom of the screen in Figure 6-12 shown earlier, you can see the option to “Press DEL to run Setup.” Keep in mind that this is only one possible example.

Motherboard manufacturers can change the key combinations for entering CMOS setup. You can even set up the computer so the message does not show—a smart idea if you need to keep nosy people out of your CMOS setup! If you don’t see an “enter setup” message, wait until the RAM count starts and then try one of the following keys or key combinations: DELETE, ESC, F1, F2, CTRL-ALT-ESC, CTRL-ALT-INS, CTRL-ALT-ENTER, or CTRL-S. It may take a few tries, but you will eventually find the right key or key combination. If not, check the motherboard book or the manufacturer’s Web site for the information.

Try This!

Accessing CMOS Setup

The key or key combination required to access CMOS setup varies, depending on your particular BIOS. When you find yourself in a setup or troubleshooting scenario that requires access to the system setup utility, it’s important to know how to access it! Plus, you’ll need to know how to find the BIOS information once you’re in, so Try This!

1. Turn the monitor on and boot your system. Watch the information that scrolls by on the screen as your computer boots. Most BIOS makers include a line indicating what key(s) to press to access the CMOS setup program. Make a note of this useful information! You can also check your motherboard book to determine the process for accessing the CMOS setup program.

2. Reboot the system, and this time watch for information on the BIOS manufacturer. If you don’t see it, and if it’s okay to do so, open the system case and check the name printed on the system ROM chip. Make a note of this useful information.

3. Reboot one more time, and this time use the key or key combination you found to run the CMOS setup program. Locate and make a note of the manufacturer, date, and version number of your PC’s current BIOS.

4. If you can, make a note of the exact model information for your system and visit the Web site of the company that manufactured your PC. Search their support files for the specs on your specific system and see if you can locate your BIOS information. Now take the detailed BIOS information and search the BIOS manufacturer’s Web site for the same information.

Typical CMOS Setup Programs

Every BIOS maker’s CMOS setup program looks a little different, but don’t let that confuse you. They all contain basically the same settings; you just have to be comfortable poking around. To avoid doing something foolish, do not save anything unless you are sure you have it set correctly.

Several years ago, BIOS manufacturers in the consumer space migrated to graphical CMOS setup utilities that enable you to use a mouse. You’ll still find plenty of examples in the field of the classic text-only CMOS setup utilities. You need to know both, so this section will show you both styles. We’ll run through a graphical version first, then skim through an older text-only version.

Images

EXAM TIP UEFI does not specify a graphical or text-based system setup utility. The two are unrelated. I have many older motherboards with graphical system setup utilities that are 16-bit BIOS. The laptop I’m writing this chapter on has a text-based setup utility and UEFI.

Do not be surprised on the 901 exam, however, if it implies UEFI as graphical and the legacy BIOS as text mode. That’s a common interpretation among some techs.

Graphical UEFI AMD-based Setup Utility

Figure 6-21 shows a typical, simple graphical setup screen. You can’t do much here except view information about installed components, select one of three preset System Performance optimization options, and change the boot priority.

Images

Figure 6-21 ASUS EFI BIOS Utility setup screen in EZ Mode

Click the option to go into Advanced Mode and you’ll get a much more versatile utility (see Figure 6-22). The Main tab offers some BIOS component information, such as surface details on amount of RAM and speed of CPU, plus a couple of options to modify the language and date and time. (Some utilities will show information about installed hard drives and optical drives; this UEFI BIOS presents that information elsewhere.)

Images

Figure 6-22 Main tab

The Main tab also enables you to configure modest BIOS security by setting an administrator or user password. (The default for the pictured UEFI BIOS is Access Level: Administrator. Click the Security option to change access information. UEFI setup screens differ somewhat, but you’ll find similar options in all of them.)

An administrator password locks or unlocks access to the system setup utility. A user password locks or unlocks the computer booting to an operating system.

Things get far more interesting in the other tabs. Selecting the Ai Tweaker tab, for example, enables you to delve into the Dark Arts of overclocking both the CPU and RAM (see Figure 6-23). You can change the clock multiplier, clock speeds, voltages, and more here. This is a great place to go to fry a new CPU!

Images

Figure 6-23 Ai Tweaker tab

The Advanced tab (see Figure 6-24) gives BIOS component information about CPUs, hard drives and optical drives, and all the built-in components, such as USB ports. In this tab, as you drill down to each subcategory, you can configure drive settings, enable and disable devices, and more.

Images

Figure 6-24 Advanced tab

The Monitor tab (see Figure 6-25) shows monitoring information for CPU and motherboard temperatures, fan speeds, and voltages. You can modify the behavior of the chassis fans here too. All of this monitoring information is considered some of the builtin diagnostics for both the motherboard and the full system.

Images

Figure 6-25 Monitor tab

The Boot tab (see Figure 6-26) enables you to adjust boot settings. You can select devices to boot by priority, setting the boot sequence used by the motherboard. (See “The Boot Process” later in this chapter for more information.) You can determine how the system will react/inform if booting fails, and more.

Images

Figure 6-26 Boot tab

The Tool tab (see Figure 6-27) has a couple of very important features. The Flash 2 Utility enables you to update the motherboard firmware. See the “Flashing the ROM” section later in this chapter for more details.

Images

Figure 6-27 Tool tab

The Tool tab also shows very detailed RAM information. That’s the SPD option (for serial presence detect) you should recognize from Chapter 5, “RAM.”

Text-Based UEFI Intel-Based Setup Utility

In this second walkthrough, we’ll switch to a more recent UEFI motherboard, this time on an Intel-based portable computer. As we go through the screens, pay attention to the options listed on each. I’ll call out features that the graphical AMD-based BIOS didn’t have.

The Information tab (see Figure 6-28) offers straightforward information about the CPU and RAM amount, and cryptic information about the hard drive. Other tabs do more.

Images

Figure 6-28 Information tab

The Configuration tab (see Figure 6-29) shows a number of built-in devices that you configure or enable/disable here. Because this is a portable, it has an option to turn on/off wireless networking capabilities.

Images

Figure 6-29 Configuration tab

There are two interesting options here that are covered in detail in other chapters but warrant a brief discussion now. The Intel Virtual Technology option enables or disables virtualization support for virtual machines.

A virtual machine is a powerful type of program that enables you to run a second (or third or fourth), software-based machine inside your physical PC. It re-creates the motherboard, hard drives, RAM, network adapters, and more, and is just as powerful as a real PC. To run these virtual machines, however, you’ll need a very powerful PC—you are trying to run multiple PCs at the same time, after all.

To support this, CPU manufacturers have added hardware-assisted virtualization. Intel calls their version Intel Virtualization Technology (Intel VT, for short), and AMD calls theirs AMD Virtualization (AMD-V) technology. This technology helps the virtual machines use your hardware more efficiently and is controlled by the BIOS. This feature is disabled by default in BIOS, so if your virtual machine requires hardware-assisted virtualization, you’ll need to enable it here.

Images

NOTEChapter 18, “Virtualization,” covers virtual machines in gory detail. Stay tuned!

This particular laptop has built-in graphics courtesy of the Intel Core i7 processor, plus it has dedicated add-on video for gaming. The Graphic Device option, set here to Discrete, means to use the dedicated video card when possible. This uses more electricity than the graphics card built into the CPU, but it makes for way better gaming!

Images

NOTEChapter 19, “Display Technologies,” goes into video options (and gaming) in modern systems.

The Security tab (see Figure 6-30) offers a lot more options for configuring BIOS security than found on the Main tab of the AMD-based system. You see the Administrator Password and User Password options, but there’s also an option to set a couple of different hard drive passwords.

Images

Figure 6-30 Security tab

The Secure Boot feature you can see on the Security tab is a UEFI protocol that secures the boot process by requiring properly signed software. This includes boot software and software that supports specific, essential components. (See “Device Drivers” a little later in this chapter.) Secure Boot requires an Intel CPU, a UEFI BIOS, and an operating system designed for it, such as Windows 8/8.1/10.

Images

NOTE Secure Boot is an example of a tool that uses drive encryption. Various types of encryption—essentially scrambling the information to make it inaccessible to bad guys—secure all sorts of processes and data in modern computing. We’ll hit the subject in several places later in the book. Chapter 10, “Implementing Hard Drives,” discusses drive encryption specifically in more detail.

The Boot tab (see Figure 6-31) enables you to set boot options. Here is where you provide support for booting to a USB device as well. It looks a little different from the graphical example used earlier. See “The Boot Process” later in this chapter for more explanation.

Images

Figure 6-31 Boot tab

Other BIOS Security Options

Motherboard manufacturers, BIOS writers, and programmers have implemented all kinds of security features over the years. This section mentions a couple you might run into on various motherboards (or on a certain exam in your near future).

Chassis Intrusion Detection/Notification Many motherboards support the chassis intrusion detection/notification feature provided by the computer case, or chassis. Compatible cases contain a switch that trips when someone opens the case. With motherboard support and a proper connection between the motherboard and the case, the CMOS logs whether the case has been opened and, if it has, posts a notification to the screen on the subsequent boot. How cool is that?

DriveLock On some motherboards, the CMOS setup program enables you to control the ATA Security Mode Feature Set, also commonly referred to as drive lock or DriveLock. ATA Security Mode is the first line of defense for protecting hard disks from unwanted access when a system is lost or stolen.

LoJack Some PC manufacturers also include LoJack security features in their BIOS—this way, if your PC is stolen, you can track its location, install a key logger, or even remotely shut down your computer.

Trusted Platform Module The Trusted Platform Module (TPM) acts as a secure cryptoprocessor, which is to say that it is a hardware platform for the acceleration of cryptographic functions and the secure storage of associated information. The specification for the TPM is published by the Trusted Computing Group, an organization whose corporate members include Intel, Microsoft, AMD, IBM, Lenovo, Dell, Hewlett-Packard, and many others.

The TPM can be a small circuit board plugged into the motherboard, or it can be built directly into the chipset. The CMOS setup program usually contains settings that can turn the TPM on or off and enable or disable it.

TPMs can be used in a wide array of cryptographic operations, but one of the most common uses of TPMs is hard disk encryption. For example, the BitLocker Drive Encryption feature of Microsoft Windows can be accelerated by a TPM, which is more secure because the encryption key is stored in the tamper-resistant TPM hardware rather than on an external flash drive. Other possible uses of TPMs include digital rights management (DRM), network access control, application execution control, and password protection.

Images

EXAM TIP BIOS security–related options can include TPM, LoJack, passwords, Secure Boot, intrusion detection/notification, and drive encryption.

Exiting and Saving Settings

Of course, all system setup utilities provide some method to Save and Exit or to Exit Discarding Saving (see Figure 6-32). Use these as needed for your situation. Exit Discarding Saving is particularly nice for those folks who want to poke around the CMOS setup utility but don’t want to mess anything up. Use it!

Images

Figure 6-32 Exit options

The CMOS setup utility would meet all of the needs of a modern system for BIOS if manufacturers would just stop creating new devices. That’s not going to happen, of course, so let’s turn now to devices that need to have BIOS loaded from elsewhere.

Option ROM and Device Drivers

Every piece of hardware in your computer needs some kind of programming that tells the CPU how to talk to that device. When IBM invented the PC more than 30 years ago, they couldn’t possibly have included all of the necessary BIOS routines for every conceivable piece of hardware on the system ROM chip. How could they? Most of the devices in use today didn’t exist on the first PCs. When programmers wrote the first BIOS, for example, network cards, mice, and sound cards did not exist. Early PC designers at IBM understood that they could not anticipate every new type of hardware, so they gave us a few ways to add programming other than on the BIOS. I call this BYOB—Bring Your Own BIOS. You can BYOB in two ways: option ROM and device drivers. Let’s look at both.

Option ROM

The first way to BYOB is to put the BIOS on the hardware device itself. Look at the card displayed in Figure 6-33. This is a serial ATA RAID hard drive controller—basically just a card that lets you add more hard drives to a PC. The chip in the center with the wires coming out the sides is a flash ROM that stores BIOS for the card. The system BIOS does not have a clue about how to talk to this card, but that’s okay, because this card brings its own BIOS on what’s called an option ROM chip.

Images

Figure 6-33 Option ROM

Most BIOS that come on option ROMs tell you that they exist by displaying information when you boot the system. Figure 6-34 shows a typical example of an option ROM advertising itself.

Images

Figure 6-34 Option ROM at boot

In the early days of the PC, you could find all sorts of devices with BIOS on option ROMs. Today, option ROMs have mostly been replaced by more flexible software methods (more on device driver software in the next section), with one major exception: video cards. Every video card made today contains its own BIOS. Option ROMs work well but are hard to upgrade. For this reason, most hardware relies on software for BYOB.

Device Drivers

A device driver is a file stored on the PC’s hard drive that contains all of the commands necessary to talk to whatever device it was written to support. All operating systems employ a method of loading these device drivers into RAM every time the system boots. They know which device drivers to install by reading a file (or files) that lists which device drivers the system needs to load at boot time. All operating systems are designed to look at this list early on in the boot process and copy the listed files into RAM, thereby giving the CPU the capability to communicate with the hardware supported by the device driver.

Device drivers come with the device when you buy it. When you buy a sound card, for example, it comes with a disc that holds all of the necessary device drivers (and usually a bunch of extra goodies). The generic name for this type of CD-ROM is installation disc. In many cases, Windows will automatically detect and install the driver for you. If this does not work, Windows will prompt you for the installation disc (see Figure 6-35).

Images

Figure 6-35 Windows XP asking for the installation disc

Images

NOTE As you might notice, that is a Windows XP screenshot. Windows driver support has come a long way, and this dialog box, though not completely gone, is far rarer today than a decade ago.

You might want to add or remove device drivers manually at times. Windows uses a special database called the Registry that stores everything you want to know about your system, including the device drivers. You shouldn’t access the Registry directly to access these drivers, but instead use the venerable Device Manager utility (mentioned in Chapter 3, “The Visible Computer”).

BIOS, BIOS, Everywhere!

As you should now understand, every piece of hardware on a system must have an accompanying program that provides the CPU with the code necessary to communicate with that particular device. This code may reside on the system ROM on the motherboard, on ROM on a card, or in a device driver file on the hard drive loaded into RAM at boot. BIOS is everywhere on your system, and you need to deal with it occasionally.

Power-On Self Test (POST)

BIOS isn’t the only program on your system ROM. When the computer is turned on or reset, it initiates a special program, also stored on the system ROM chip, called the power-on self test (POST). The POST program checks out the system every time the computer boots. To perform this check, the POST sends out a command that says to all of the devices, “Check yourselves out!” All of the standard devices in the computer then run their own built-in diagnostic—the POST doesn’t specify what they must check. The quality of the diagnostic is up to the people who made that particular device.

Let’s consider the POST for a moment. Suppose some device—let’s say it’s the keyboard controller chip—runs its diagnostic and determines that it is not working properly. What can the POST do about it? Only one thing really: tell the human in front of the PC! So how does the computer tell the human? PCs convey POST information to you in two ways: beep codes and text messages.

Before and During the Video Test: The Beep Codes

The computer tests the most basic parts of the computer first, up to and including the video card. In early PCs, you’d hear a series of beeps—called beep codes or POST beep codes—if anything went wrong. By using beep codes before and during the video test, the computer could communicate with you. (If a POST error occurs before the video is available, obviously the error must manifest itself as beeps, because nothing can display on the screen.) The meaning of the beep code you’d hear varied among different BIOS manufacturers. You could find the beep codes for a specific motherboard in its motherboard manual.

Most modern PCs have only two beep codes: one for bad or missing video (one long beep followed by two or three short beeps), and one for bad or missing RAM (a single beep that repeats indefinitely).

Images

CAUTION You’ll find lots of online documentation about beep codes, but it’s usually badly outdated.

You’ll hear three other beep sequences on most PCs (although they’re not officially beep codes). At the end of a successful POST, the PC produces one or two short beeps, simply to inform you that all is well. Most systems make a rather strange noise when the RAM is missing or very seriously damaged. Unlike traditional beep codes, this code repeats until you shut off the system. Finally, your speaker might make beeps for reasons that aren’t POST or boot related. One of the more common is a series of short beeps after the system’s been running for a while. That’s a CPU alarm telling you the CPU is approaching its high heat limit.

Text Errors

After the video has tested okay, any POST errors display on the screen as text errors. If you get a text error, the problem is usually, but not always, self-explanatory (see Figure 6-36). Text errors are far more useful than beep codes, because you can simply read the screen to determine the bad device.

Images

Figure 6-36 POST text error messages

POST Cards

Beep codes, numeric codes, and text error codes, although helpful, can sometimes be misleading. Worse than that, an inoperative device can sometimes disrupt the POST, forcing the machine into an endless loop. This causes the PC to act dead—no beeps and nothing on the screen. In this case, you need a device, called a POST card, to monitor the POST and identify which piece of hardware is causing the trouble.

POST cards are simple cards that snap into expansion slots on your system. A small, two-character light-emitting diode (LED) readout on the card indicates which device the POST is currently testing (see Figure 6-37).

Images

Figure 6-37 POST card in action

POST cards used to be essential tools for techs, but today I use them only when I have a “dead” PC to determine at which level it’s dead. If the POST card shows no reading, I know the problem is before the POST and must be related to the power, the CPU, the RAM, or the motherboard. If the board posts, then I know to look at more issues, such as the drives and so on.

The Boot Process

All PCs need a process to begin their operations. Once you feed power to the PC, the tight interrelation of hardware, firmware, and software enables the PC to start itself, to “pull itself up by the bootstraps” or boot itself.

When you first power on the PC, the power supply circuitry tests for proper voltage and then sends a signal down a special wire called the power good wire to awaken the CPU. The moment the power good wire wakes it up, every CPU immediately sends a built-in memory address via its address bus. This special address is the same on every CPU, from the oldest 8086 to the most recent microprocessor. This address is the first line of the POST program on the system ROM! That’s how the system starts the POST. After the POST has finished, there must be a way for the computer to find the programs on the hard drive to start the operating system. What happens next differs between the old BIOS way and the UEFI way.

In the older BIOS environment, the POST passes control to the last BIOS function: the bootstrap loader. The bootstrap loader is little more than a few dozen lines of BIOS code tacked to the end of the POST program. Its job is to find the operating system. The bootstrap loader reads CMOS information to tell it where to look first for an operating system. Your PC’s CMOS setup utility has an option that you configure to tell the bootstrap loader which devices to check for an operating system and in which order—that’s the boot sequence. (See Figure 6-38).

Images

Figure 6-38 CMOS boot sequence

Almost all storage devices—hard disk drives, solid-state drives, CDs, DVDs, and USB thumb drives—can be configured to boot an operating system by setting aside a specific location called the boot sector. If the device is bootable, its boot sector contains special programming designed to tell the system where to locate the operating system. Any device with a functional operating system is called a bootable disk or a system disk. If the bootstrap loader locates a good boot sector, it passes control to the operating system and removes itself from memory. If it doesn’t, it goes to the next device in the boot sequence you set in the CMOS setup utility. The boot sequence is an important tool for techs because you can set it to load in special bootable devices so you can run utilities to maintain PCs without using the primary operating system.

In UEFI systems, the POST hands control of the boot process to the boot manager, which checks the boot configuration, and then loads the operating system boot loader directly (see Figure 6-39). There’s no need for scanning for a boot sector or any of that. UEFI firmware stores the boot manager and boot configuration.

Images

Figure 6-39 UEFI Boot Mode with Boot Manager options displayed

Images

NOTE If you put an old-style BIOS bootable disk in a UEFI system, the system will most likely drop into BIOS compatibility mode and boot just like the old days. See Chapter 10 for more on drive structures.

Some BIOS include a feature that enables a PC to use a preboot execution environment (PXE). A PXE enables you to boot a PC without any local storage by retrieving an OS from a server over a network. You’ll see more on PXE when we talk about installing Windows in Chapter 12, “Building a PC.”

Care and Feeding of BIOS and CMOS

BIOS and CMOS are areas in your PC that you don’t go to very often. BIOS itself is invisible. The only real clue you have that it even exists is the POST. The CMOS setup utility, on the other hand, is very visible if you start it. Most CMOS setup utilities today work acceptably well without ever being touched. You’re an aspiring tech, however, and all self-respecting techs start up the CMOS setup utility and make changes. That’s when most CMOS setup utility problems take place.

If you mess with the CMOS setup utility, remember to make only as many changes at one time as you can remember. Document the original settings and the changes on a piece of paper or take a photo so you can put things back if necessary. Don’t make changes unless you know what they mean! It’s easy to screw up a computer fairly seriously by playing with CMOS settings you don’t understand.

Default/Optimized Settings

Every CMOS setup utility has a couple of reset options, commonly called Load Default Settings and OS Optimized Defaults (see Figure 6-40). These options keep you from having to memorize all of those weird settings you’ll never touch. Default or Fail-Safe sets everything to very simple settings—you might occasionally use this setting when very low-level problems such as freeze-ups occur and you’ve checked more obvious areas first. Optimized sets the CMOS to the best possible speed/stability for the system. You would use this option after you’ve tampered with the CMOS too much and need to put it back like it was!

Images

Figure 6-40 Options for resetting CMOS

Clearing CMOS

You read about the process for clearing CMOS settings back in Chapter 4, but the process is worth repeating here. When you mess up a setting (by overclocking too much or disabling something that should have remained enabled—or vice versa) that renders the computer dead, you can reset the CMOS back to factory defaults and start over.

Almost every motherboard has a dedicated set of wires called CMOS clear or something similar (see Figure 6-41).

Images

Figure 6-41 CMOS clear wires

Turn off and unplug the computer, then open the case to access the motherboard. Find the CMOS clear wires. Move the shunt (the little plastic and metal jumper thing) from wires 1 and 2 to wires 2 and 3 (see Figure 6-42). Wait for 10 seconds and then move the shunt back to the default position. Plug in and boot the system.

Images

Figure 6-42 Changing shunt location to clear CMOS settings

Images

NOTE Manufacturers of enthusiast boards designed for easy overclocking experimentation know you’re going to screw up during the overclocking process. You’ll find a dedicated clear CMOS button hardwired to the motherboard. Now that’s service!

If that doesn’t work or if you get one of the truly odd motherboards without CMOS clear jumpers, power down the system and unplug. Pry out the little coin battery (see below) and wait for several seconds. Reinstall and reboot.

Losing CMOS Settings

Your CMOS needs a continuous trickle charge to retain its data. Motherboards use some type of battery, usually a coin battery like those in wrist watches, to give the CMOS the charge it needs when the computer is turned off (see Figure 6-43). This battery also keeps track of the date and time when the PC is turned off.

Images

Figure 6-43 A CMOS battery

If the battery runs out of charge, you lose all of your CMOS information. If some mishap suddenly erases the information on the CMOS chip, the computer might not boot or you’ll get nasty-looking errors at boot. Any PC made after 2002 will boot to factory defaults if the CMOS clears, so the chances of not booting are slim—but you’ll still get errors at boot. Here are a few examples of errors that point to lost CMOS information:

•   CMOS configuration mismatch

•   CMOS date/time not set

•   BIOS time and settings reset

•   No boot device available

•   CMOS battery state low

Here are some of the more common reasons for losing CMOS data:

•   Pulling and inserting cards

•   Touching the motherboard

•   Dropping something on the motherboard

•   Dirt on the motherboard

•   Faulty power supplies

•   Electrical surges

If you encounter any of these errors, or if the clock in Windows resets itself to January 1st every time you reboot the system, the battery on the motherboard is losing its charge and needs to be replaced. To replace the battery, use a screwdriver to pry the battery’s catch gently back. The battery should pop up for easy removal. Before you install the new battery, double-check that it has the same voltage and amperage as the old battery. To retain your CMOS settings while replacing the battery, simply leave your PC plugged into an AC outlet. The 5-volt soft power on all modern motherboards provides enough electricity to keep the CMOS charged and the data secure. Of course, I know you’re going to be extremely careful about ESD while prying up the battery from a live system!

Flashing the ROM

Flash ROM chips can be reprogrammed to update their contents. With flash ROM, when you need to update your system BIOS to add support for a new technology, you can simply run a small command-line program, combined with an update file, and voilà, you have a new, updated BIOS! This is called a firmware upgrade. Different BIOS makers use slightly different processes for flashing the BIOS, but, in general, you insert a removable disk of some sort (usually a USB thumb drive) containing an updated BIOS file and use the updating utility in CMOS setup.

Some motherboard makers provide Windows-based flash ROM update utilities that check the Internet for updates and download them for you to install (see Figure 6-44). Most of these utilities also enable you to back up your current BIOS so you can return to it if the updated version causes trouble. Without a good backup, you could end up throwing away your motherboard if a flash BIOS update goes wrong, so you should always make one.

Images

Figure 6-44 ROM-updating program for an ASUS motherboard

Finally, don’t update your BIOS unless you have some compelling reason to do so. As the old saying goes, “If it ain’t broke, don’t fix it!”

Images

EXAM TIP While techs usually talk about “flashing the BIOS,” the CompTIA A+ exams refer to this process also as “firmware upgrades” or “driver/firmware updates.”

Chapter Review

Questions

1. What does BIOS provide for the computer? (Choose the best answer.)

A.  BIOS provides the physical interface for various devices such as USB and FireWire ports.

B.  BIOS provides the programming that enables the CPU to communicate with other hardware.

C.  BIOS provides memory space for applications to load into from the hard drive.

D.  BIOS provides memory space for applications to load into from the main system RAM.

2. What is the correct boot sequence for an older BIOS-based PC?

A.  CPU, POST, power good, boot loader, operating system

B.  POST, power good, CPU, boot loader, operating system

C.  Power good, boot loader, CPU, POST, operating system

D.  Power good, CPU, POST, boot loader, operating system

3. Jill decided to add a second hard drive to her computer. She thinks she has it physically installed correctly, but it doesn’t show up in Windows. Which of the following options will most likely lead Jill where she needs to go to resolve the issue?

A.  Reboot the computer and press the F key on the keyboard twice. This signals that the computer has two hard disk drives.

B.  Reboot the computer and watch for instructions to enter the CMOS setup utility (for example, a message may say to press the DELETE key). Do what it says to go into CMOS setup.

C.  In Windows, press the DELETE key twice to enter the CMOS setup utility.

D.  In Windows, go to Start | Run and type hard drive. Click OK to open the Hard Drive Setup Wizard.

4. Henry bought a new card for capturing television on his computer. When he finished going through the packaging, though, he found no driver disc, only an application disc for setting up the TV capture software. After installing the card and software, it all works flawlessly. What’s the most likely explanation?

A.  The device doesn’t need BIOS, so there’s no need for a driver disc.

B.  The device has an option ROM that loads BIOS, so there’s no need for a driver disc.

C.  Windows supports TV capture cards out of the box, so there’s no need for a driver disc.

D.  The manufacturer made a mistake and didn’t include everything needed to set up the device.

5. Which of the following most accurately describes the relationship between BIOS and hardware?

A.  All hardware needs BIOS.

B.  All hardware that attaches to the motherboard via ribbon cables needs BIOS.

C.  All hardware built into the motherboard needs BIOS.

D.  Some hardware devices need BIOS.

6. After a sudden power outage, Samson’s PC rebooted, but nothing appeared on the screen. The PC just beeps at him, over and over and over. What’s most likely the problem?

A.  The power outage toasted his RAM.

B.  The power outage toasted his video card.

C.  The power outage toasted his hard drive.

D.  The power outage toasted his CPU.

7. Davos finds that a disgruntled former employee decided to sabotage her computer when she left by putting a password in CMOS that stops the computer from booting. What can Davos do to solve this problem?

A.  Davos should boot the computer while holding the left SHIFT key. This will clear the CMOS information.

B.  Davos should try various combinations of the former employee’s name. The vast majority of people use their name or initials for CMOS passwords.

C.  Davos should find the CMOS clear jumper on the motherboard. Then he can boot the computer with a shunt on the jumper to clear the CMOS information.

D.  Davos should find a replacement motherboard. Unless he knows the CMOS password, there’s nothing he can do.

8. Richard over in the sales department went wild in CMOS and made a bunch of changes that he thought would optimize his PC. Now most of his PC doesn’t work. The computer powers up, but he can only get to CMOS, not into Windows. Which of the following tech call answers would most likely get him up and running again?

A.  Reboot the computer about three times. That’ll clear the CMOS and get you up and running.

B.  Open up the computer and find the CMOS clear jumper. Remove a shunt from somewhere on the motherboard and put it on the CMOS clear jumper. Reboot and then put the shunt back where you got it. Reboot, and you should be up and running in no time.

C.  Boot into the CMOS setup program and then find the option to load a plug-and-play operating system. Make sure it’s set to On. Save and exit CMOS; boot normally into Windows. You should be up and running in no time.

D.  Boot into the CMOS setup program and then find the option to load OS Optimized Defaults. Save and exit CMOS; boot normally into Windows. You should be up and running in no time.

9. Jill boots an older Pentium system that has been the cause of several user complaints at the office. The system powers up and starts to run through POST, but then stops. The screen displays a “CMOS configuration mismatch” error. Of the following list, what is the most likely cause of this error?

A.  Dying CMOS battery

B.  Bad CPU

C.  Bad RAM

D.  Corrupt system BIOS

10. Where does Windows store device drivers?

A.  Computer

B.  Hardware

C.  Registry

D.  Drivers and Settings

Answers

1. B. BIOS provides the programming that enables the CPU to communicate with other hardware.

2. D. Here’s the correct boot sequence for a BIOS-based PC: power good, CPU, POST, boot loader, operating system.

3. B. Jill should reboot the computer and watch for instructions to enter the CMOS setup utility (for example, a message may say to press the DELETE key). She should do what it says to go into CMOS setup.

4. B. Most likely the device has an option ROM, because it works.

5. A. All hardware needs BIOS!

6. A. The long repeating beep and a dead PC most likely indicate a problem with RAM.

7. C. Davos should find the CMOS clear jumper on the motherboard and then boot the computer with a shunt on the jumper to clear the CMOS information.

8. D. Please don’t hand Richard a screwdriver! Having him load Optimized Default settings will most likely do the trick.

9. A. The CMOS battery is likely dying.

10. C. Windows stores device drivers in the Registry.