Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

From http://en.wikipedia.org/wiki/BIOS:

BIOS software is stored on a non-volatile ROM chip on the motherboard. ... In modern computer systems, the BIOS contents are stored on a flash memory chip so that the contents can be rewritten without removing the chip from the motherboard. This allows BIOS software to be easily upgraded to add new features or fix bugs, but can make the computer vulnerable to BIOS rootkits.

ROM is read only, so why can the BIOS contents be rewritten?

Does the "flash memory chip" mean the same as the "non-volatile ROM", both meaning where BIOS is stored?

share|improve this question
    
CMOS contains system settings[BIOS settings] that can be modified by a user[in the BIOS screen]. So, according to cpsforum.blogspot.co.uk/2012/06/… "[calling that screen you enter] CMOS setup is more appropriate than calling [it] BIOS setup." and bayt.com/en/specialties/q/7459/… "BIOS is modified only via flashing of new version." and "The BIOS is a set of instructions which controls motherboards boot process. " –  barlop Jan 26 at 16:38
3  
Except, nobody sets up CMOS. That is like saying you setup the gas tank in a car when you start your car. –  Andon M. Coleman Jan 26 at 22:03
3  
ROM is read only, so why can the BIOS contents be rewritten? It’s a misnomer caused by convention. –  Synetech Jan 27 at 2:44
1  
Had you read the articles behind the links in Wikipedia which you highlighted in your question, it should have occured to you, that the answer was that flash memory is not an actual ROM. Even though the confusion may be common, in my opinion it is a poor question, because it stems solely from a lack of reading the freely available sources! –  Alexander Kosubek Jan 28 at 8:20
1  
Actually, Andon, the first thing I do in any new computer build is set up my CMOS settings. The car gas tank analogy is completely inappropriate in this context. –  TomXP411 Jan 28 at 21:56

8 Answers 8

In the original IBM PC the BIOS "ROM" was, I believe, some sort of electrically programmable ("write once") ROM (EPROM). I think it was socketed, but there was no real expectation that it would be "upgraded" in the field. Other computers of the era used something similar.

As systems got more complex it became more advantageous to have the BIOS "field upgradeable" (and without the need to open the box and physically swap the part). So systems began having various types of rewriteable BIOS "ROMs". The advantages were three:

  1. The likelihood of a bug became greater as systems got more complex.
  2. It was attractive to have the ability to upgrade, to incorporate new features.
  3. For motherboards that might be used in several different boxes (perhaps even under different brand names), it was attractive to be able to factory-customize the BIOS for the specific use.

Larger boxes, around the same time as the original IBM PC, also began having some sort of read-only "boot" memory instead of the more primitive "bootstrap loader" technology. Some of these were mask-programmed ROM, some EPROM, some even RAM that was read from a diskette via a small "service processor".

share|improve this answer
    
Yes, yll of the chips (except maybe the I/O chips) on PC and XT motherboards were socketed. And it was useful. I had to swap a couple of chips out on XT boards for various reasions. In fact, some of the early PC's did require BIOS updates, and the original PC actually had an entire programming language in ROM. I seem to recall there were some updates needed to the first generation PC's for diskette drives... –  TomXP411 Jan 28 at 22:12
    
@TomXP411 - Yeah, I forgot that the original PC had a BASIC interpreter in ROM. But technically that was in a separate ROM from the BIOS, IIRC. The BASIC had some pretty well documented bugs in the first version, but I don't recall that they shipped an update to fix them -- you just needed to buy a new PC with the updated version. Something like version 1.2. –  Daniel R Hicks Jan 28 at 23:27

Look at that Wikipedia article as it read in January 2005:

Before 1990 or so BIOSs were held on ROM chips that could not be altered. As their complexity and the need for updates grew, BIOS firmware is stored on EEPROM or flash memory devices that can be upgraded by the user. However, an improperly executed or aborted BIOS update can render the computer or device unusable. To avoid BIOS corruption, some new motherboards have a backup BIOS. Also, most BIOSes have a "boot block" which is a portion of the ROM which runs first and is not updateable. This code will verify that the rest of the BIOS is intact (via checksum, hash, etc.) before jumping to it.

Nowadays, of course, we have a Wikipedia article that confuses people by saying that the chip is "non-volatile ROM" in one breath and that it can be written to in the next. The lesson to learn here is that Wikipedia often isn't very well written, and that articles change, not always for the better.

I suggest reading books. Scott Mueller's Upgrading and Repairing PCs, to pick one of several books, has a whole chapter on the BIOS, that discusses all sorts of things from where the BIOS chip is located to the various sorts (listing four: ROM, PROM, EPROM, and EEPROM) of such chips.

Some quotes:

No matter which type of ROM your system uses, the data stored in a ROM chip is [sic] nonvolatile and remains indefinitely unless intentionally erased or overwritten (in those cases where that is possible). — Upgrading and Repairing PCs, p.373

Virtually all PCs built since 1996 include a flash ROM to store the BIOS. A flash ROM is a type of EEPROM chip you can erase and reprogram directly in the system without special equipment. — Upgrading and Repairing PCs, p.387

Books aren't perfect. One can argue details with Mueller's "first blush" definition of flash memory here, for example. But the good ones are generally proofread and have more coherent explanations than much of Wikipedia has, that at least don't contradict themselves from sentence to sentence.

Presuming a modern PC, and not getting bogged down in how PCs used to work two decades ago:

Your machine's firmware is held on a non-volatile memory chip on the motherboard. It actually holds quite a lot. (The Pm49FL004T mentioned in my answer here holds half a MiB, and as mentioned in my answer here some chipsets are capable of supporting 16MiB of firmware.) It's involved in a lot more than just the system bootstrap, even for protected mode operating systems. Its contents are modifiable, but not as easily as the (volatile) contents of the main system RAM. On EFI systems, the chip not only holds the firmware code and (read-only) data but the values of the non-volatile EFI variables.

share|improve this answer

As a supplement to the other answers, I like a more visual approach:

BIOS location

This BIOS chip doesn't seem to be particularly well seated in its socket.

The BIOS, including fancy new EUFI BIOSes, are software stored on a chip on the motherboard. The technical details have already been covered by zelanix and Varaquilex.

The chip is is often, but not always, removable for easier servicing. Some motherboards include more than one BIOS, mostly as a sales gimmick, but in some cases the second BIOS helps recover from certain (usually user-caused) problems:

Dual non-removeable BIOS

share|improve this answer
1  
That's not a sales gimmick at all... do you know how scary a BIOS update can be? you get all kinds of warnings when you do it, and if you manage to botch the process (and sometimes even if you do everything right), you end up with a bricked PC. Oh, and "BIOS updates are not covered under your manufacturer warranty." That's why the back up BIOS was invented. It's not about marketing. it's just that little bit of extra safety. (And yes, I've bricked a computer doing a BIOS update. We had to send the motherboard to the manufacturer to get the BIOS re-flashed.) –  TomXP411 Jan 28 at 22:08
    
You make a good point, though BIOS updates are greatly improved in recent years. No longer is it required to boot to DOS and find a floppy drive. In a recent Asus board, for example, the update can be done within Windows or directly from the UEFI BIOS, which reads the file right off of NTFS. This is for motherboards. Manufacturers like 3Ware (no Avago) still expect you to figure out how to fit a 10MB BIOS on a 1.44MB disk image. They provide no backup BIOS. –  Charles Burns Jan 28 at 22:12
    
@CharlesBurns tw_cli can do 3ware BIOS updates with the machine booted. –  derobert Jan 29 at 18:50
    
@derobert My last BIOS update was an attempt to correct a server that wouldn't boot due to a 3Ware driver update (since 3Ware requires the drivers, software, and firmware match). In that case, the inability to do an update with an unbootable OS made things tricky, and the latest 3Ware CD wouldn't boot (despite the motherboard being on the supported list). But you are totally correct: tw_cli can update the BIOS. I'd forgotten about that. :) –  Charles Burns Jan 29 at 19:00

It may also be worth noting that on most machines before the 80286, data could be read from ROM just as quickly as from RAM, but while RAM bandwidths have improved enormously since the 1980's, commodity-ROM bandwidths have not [fast ROM chips do exist, but increasing the ROM's speed beyond a certain point would increase the price]. Since reading every byte of a BIOS ROM once would only take a fraction of a second, some 80386 machines and most 80486-and-later machines offered an option to copy the BIOS to RAM on start-up. Modern machines take things even further, and actually place the BIOS ROM chips on a bus which is entirely separate from the RAM bus and is much slower. Unlike 80486-era machines which would start out by running from ROM a program which would copy itself to RAM, many newer machines have processors that can't run code from ROM at all. Instead, they have circuitry which on start-up reads certain parts of the ROM into RAM and executes it.

share|improve this answer
    
Right, that would explain how a modern BIOS chip can have only 8 or so wires. Modern Flash memory actually uses a serial interface. –  TomXP411 Jan 28 at 22:11

the BIOS is stored in either on CMOS chip or NVRAM, which are small amounts of non-volatile memory on your motherboard (that is, they hold data indefinitely without needing power).

As for what message you get if everything passes the post, on older machines you'll usually get a single beep from your machine if everything checked out.

On newer machines, you won't get anything: you won't see the post, there won't be any messages, beeps, nothing... sort of a "no news is good news" type of deal. If you still want to see the POST run on a newer machine, the key to hit (at least on the computers I've used) is Tab. Hit that a few times right after you turn on the power to see the POST on the screen. Alternatively, there should be an option to have the POST come up on the screen in your BIOS settings.

share|improve this answer
4  
You are confusing the bios program with it's settings data. The obvious distinction: remove the backup battery and the program still runs, but its settings are reverted to default. While the settings are battery backed, the program is stored in a "read mostly" memory technology which requires active measures to erase. –  Chris Stratton Jan 27 at 19:59

Actually, in last days there is more sofisticated system how to store BIOS. Imagine 2 storage banks similar to your flash drive, just smaller. One of them is accessed read only and second is available to be written (to flash new version of the BIOS). Reason for 2 parts is a backup, when writing of new BIOS is not successful. If Flashing of new BIOS succeed this 2 parts will switch and device could be rebooted under new BIOS.

BEWARE: not all kind of devices has this system. Sometimes is a simple small flash memory which is simply overwritten. Usually, you are prompted to backup the electricity and not to interrupt the upgrade process.

In old times of motherboards there was EPROM memory, which could be rewritten after memory was erased by strong light, or later a PROM memory, which could be written just once. Both could be done only by special programming device, so BIOS chip should be removed from the device to be written.

share|improve this answer

To add to Varaquilex's answer, the BIOS software is stored in an Electrically Erasable and Programmable ROM (EEPROM) which enables firmware updates to be performed electronically. Very old BIOS chips were actually UV-EPROM chips which required erasing with UV light exposure before they could be reprogrammed.


Edit: As has been pointed out in the comments, even earlier than that single use Programmable ROM (PROM) chips were sometimes used which could not be reprogrammed at all once configured and required complete replacement to upgrade (although this was rarely required).

share|improve this answer
11  
+1 for historical (UV-EPROM) mentions. –  Varaquilex Jan 26 at 16:24
2  
Even earlier, And some were non-erasable ROMs/PROMs, which would have to be replaced with new ROMs if you wanted to install a new BIOS. Of course at that time the BIOS was doing less, and changed quite rarely. –  keshlam Jan 26 at 20:20
3  
@AndonM.Coleman In lower volumes, using EPROMs, or (even earlier) the fuse-type PROMs, may in fact have been cheaper than having a mask ROM cut. For instance, if memory serves, basically all of the early-80s arcade machines had their software on PROMs or EPROMs, even though it would never be changed, because it was cheaper at the intended production volume. –  Zack Jan 27 at 0:02
1  
UV-EPROMs (EEPROMs) were never intended for consumer reprogramming AFAIK. When a device goes back to the factory for repair or whatever, it's handy to be able to upgrade the firmware by swapping out or reprogramming the EEPROM. –  rossnz Jan 27 at 0:03
1  
@AndonM.Coleman - Masked ROMs have a substantial one-time setup charge. UV-EPROMs, while more expensive on a per-unit basis, are often cheaper for short-run (< 10K) production. –  Eric Brown Jan 27 at 18:43

ROM is read only, so why is the BIOS contents can be rewritten?

BIOS program itself is stored in an EEPROM (which can be [E]lectrically [E]rasable and [P]rogrammable) or a flash-memory. So the read-only here is about the chip being non-volatile. The contents of the memory stays when the power is cut off, unlike volatile RAM. The ROM being EEP helps the BIOS can be re-written or updated. Back then for such operations, you had to remove the BIOS chip from the board, put a new one (if its not PROM or EPROM), or if its EPROM you have to get it to the manufacturer and let them re-program the chip and re-attach it to the board. After the current advances, thanks to EEPROMs, you do not have to remove chip to do such operations, you just make the computer do the job electrically.


Does the "flash memory chip" mean the same as the "non-volatile ROM", both meaning where BIOS is stored?

from Wikipedia:

Flash memory is an electronic non-volatile computer storage medium that can be electrically erased and reprogrammed.

Flash memory was developed from EEPROM (electrically erasable programmable read-only memory). There are two main types of flash memory, which are named after the NAND and NOR logic gates. The internal characteristics of the individual flash memory cells exhibit characteristics similar to those of the corresponding gates. Whereas EPROMs had to be completely erased before being rewritten, NAND type flash memory may be written and read in blocks (or pages) which are generally much smaller than the entire device. NOR type flash allows a single machine word (byte) to be written—to an erased location—or read independently.

EEPROM and flash memory do not refer to same thing: they are two similar memory types as one is developed from the other and contain different type/configuration of MOS transistors. However, they are the memory where BIOS program resides.


To address another misconception I want to mention this CMOS-BIOS relationship:

The BIOS settings are stored in the CMOS chip (which is kept on power via the battery on the motherboard). That is why the BIOS is reset when you remove the battery and re-attach it. The same program runs but the settings are defaulted. See this answer for a detailed view of memories used during the booting process.

Edit

To extend the CMOS-BIOS topic, thanks to @Andon M. Coleman, I want to add his comment to the answer:

It is worth mentioning that the BIOS settings do not have to be stored in volatile CMOS memory. There are plenty of embedded systems that store their settings in NVRAM. The only reason PCs have gotten away with using volatile CMOS over all these years is that they already had a battery to keep the internal real-time clock ticking while the power is off (recall that when you pressed the power switch on a PC-AT, it literally cut all power off to the motherboard). This meant that cheaper volatile memory could be used to store system settings. So it is mostly for historical purposes.

share|improve this answer
3  
It is worth mentioning that the BIOS settings do not have to be stored in volatile CMOS memory. There are plenty of embedded systems that store their settings in NVRAM. The only reason PCs have gotten away with using volatile CMOS over all these years is that they already had a battery to keep the internal real-time clock ticking while the power is off (recall that when you pressed the power switch on a PC-AT, it literally cut all power off to the motherboard). This meant that cheaper volatile memory could be used to store system settings. So it is mostly for historical purposes. –  Andon M. Coleman Jan 26 at 22:22
    
@AndonM.Coleman This is valuable. I'll add this to my answer. Thanks for the insight, I learnt something new :) +1 –  Varaquilex Jan 26 at 23:15
1  
Back in the day, 80286 boards used to memory map the CMOS. I found out the hard way by not qualifying a loop properly and wiping my hard drive settings... often. –  pestilence669 Jan 28 at 5:17

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.