CMOS

What is BIOS?

The BIOS program runs as soon as the PC is switched on.  It initialises and checks the PC's hardware (especially on-board chips on the motherboard) and boots the main operating system from disk.

BIOS ROM

What is CMOS?

In order for the BIOS to control PC hardware it needs information about settings for attached devices, e.g. which hard disk to boot from, whether on-board sound is enabled, or whether to reserve specific IRQs for particular devices.

These settings are stored in non-volatile BIOS memory.  This memory chip was traditionally battery powered (to keep it from forgetting settings when the main power is switched off) and thus used CMOS (Complimentary Metal Oxide Semiconductor) static RAM circuit designs, known for their low power requirements and ability to run on a range of voltages.

The name "CMOS memory" stuck and we still refer to the settings as "the CMOS" even though all ICs in a modern PC are made using CMOS technology.

Where is CMOS?

CMOS memory is not the only PC device to require battery power: the real-time clock (RTC) also needs continuous power to keep track of the date and time when the PC is switched off.

Therefore many RTC clock chips also contain a small amount of memory allowing them to be used for both purposes.

Batteries

RTC / CMOS batteries come in a variety of shapes and sizes.  The most common type is the lithium CR2032 cell.  These are widely available and easily replaced.  In some machines, however, these cells come in a package that is directly soldered into the PCB.

CMOS battery CMOS battery

Other CMOS batteries include the barrel design (shown), also soldered into the board, and plug-in packs.  They supply 3V and are typically rated to last 5 to 10 years.  The batteries recharge while the PC is powered, taking typically several hours to fully charge from flat.

CMOS Settings

Gaining access to the BIOS Setup / CMOS Settings program is not as easy as it appears.  Many BIOS writers require you to press a particular key within the first few seconds after power-on:

Del Most common: American Megatrends (AMI); Award
F2 Second most common: Advanced Logic (ALR)
Ctrl+Alt+S
Ctrl+Alt+Esc
Ctrl+Alt+Ins
Some Award / Phoenix
F1 Some IBM & Hewlett Packard
Esc Toshiba
F10 Compaq

Some very old equipment (e.g. IBM PS/2) needed a special setup program from disk.

The increasing use of custom boot displays may require you to press Tab or Esc before pressing the appropriate setup key.

Main settings

The main settings typically allow you to alter system date and time and disk drives.

CMOS Setup

There is usually a 'default' option that restores all CMOS settings back to their factory state.

Hard drives

The BIOS needs to know the hard drive size and drive settings (including number of sectors, cylinders and heads) to be able to boot correctly.  This information is usually auto-detected; the setup screen will display the drive name and capacity.  On older systems this auto-detection may need to be manually triggered.

IDE hard drives have the ability to lie about the number of sectors, cylinders and heads.  This started when the number of cylinders and sectors grew too big for normal BIOS parameters.  LBA (logical block addressing) and CHS / Large mode are two common translation methods.

Boot sequence

Usually you can specify a specific order but some BIOSes restrict you to only a few options.

The BIOS also offers boot-block virus protection, stopping any program from attempting to write to a disk's MBR.  This is usually left disabled because it interferes with installing operating systems and bootloaders such as BootMagic.

Advanced settings

Peripherals

Security

You can specify two levels of BIOS password: a user password that is required at power-on, and a supervisor password that is required to access CMOS settings.

Clearing a BIOS password can usually be achieved by shorting the "clear CMOS" jumpers on the motherboard.  However, this is not always practical or possible.  Technicians often have special boot floppies (or bootable CDs) containing a CMOS clearing utility such as KillCMOS.  Removing the battery for a period may clear older CMOS memories but modern motherboards use EEPROM or Flash ROM instead.

Some manufacturers use a backdoor password that will always gain access.  To find these, search on the World Wide Web for "BIOS backdoor passwords".

In extreme cases you may need to identify the RTC / CMOS chip and locate the manufacturer's data sheet.  This will tell you how to clear the settings by connecting a specific pin to 0V.  In high-security systems the chip may need to be physically replaced to clear the password.

Power management & hardware monitor

As part of the Advanced Power Management (APM) power management settings, the BIOS setup also allows you to specify which devices are allowed to "wake up" an ATX / WTX system.

The hardware monitor shows system voltages, temperatures and fan speeds.  These are particularly useful when troubleshooting.