31-05-2012, 02:40 PM
ROM Shadowing
As described in the section on UMA ROM and RAM, in most PCs, there is a full 384 KB area of RAM in the UMA. When any addresses in the UMA region are used by ROMs, the RAM underlying them is hidden. However, that doesn't mean that it has to be wasted.
One problem with ROMs such as those used for the system BIOS and video BIOS, is that it is relatively slow. The access time of ROMs is usually between 120 and 200 ns, compared to system RAM which is typically 50 to 70 ns. Also, system RAM is accessed 32 bits at a time, while ROMs are usually 16 bits wide. The result of this is that accesses to the BIOS code are very slow relative to accesses to code in the system memory.
I'm sure you can see where this is heading. Since there is RAM hiding underneath the ROMs anyway, most systems have the ability to "mirror" the ROM code into this RAM to improve performance. This is called ROM Shadowing, and is controlled using a set of BIOS parameters. There is normally a separate parameter to control the shadowing of the system BIOS, the video BIOS and adapter ROM areas.
When shadowing of a region of memory is enabled, at boot time the BIOS copies the contents of the ROM into the underlying RAM, write-protects the RAM and then disables the ROM. To the system the shadow RAM appears as if it is ROM, and it is also write-protected the way ROM is. This write-protection is important to remember, because if you enable shadowing of memory addresses that are being used for RAM, the device using it will cease to function when the RAM can no longer be written to (it is locked out by the shadowing). Some network cards for example use parts of the memory region they occupy for both ROM and RAM functions. Enabling shadowing there will cause the card to hang up due to the write-protection. Similarly, you should never turn on shadowing of the regions of memory being used for an EMS frame buffer or for UMBs.
In normal circumstances, the system BIOS and video BIOS are the only areas shadowed. This can in theory cause problems with some operating systems, though I have never personally encountered this. I have also heard rumors of video cards that don't function correctly when video BIOS shadowing is off, but I haven't encountered that myself either.
ROM shadowing is where the contents of the ROM (Read Only Memory, or Firmware) for a device is copied into the computer RAM (Random Access Memory)and is accessed from there.
As RAM access is faster than ROM access, some speed advantage may be gained, at the expense of memory being used.
What is Shadowing?
A technique used to increase a computer's speed by using high-speed RAM memory in place of slower ROM memory (RAM is about three times as fast as ROM). On PCs, for example, all code to control hardware devices, such as keyboards, is normally executed in a special ROM chip called the BIOS ROM. However, this chip is slower than the general-purpose RAM that comprises main memory. Many PC manufacturers, therefore, configure their PCs to copy the BIOS code into RAM when the computer boots. The RAM used to hold the BIOS code is called shadow RAM.
What is ROM?
ROM is a class of storage media used in computers and other electronic devices. Data stored in ROM cannot be modified, or can be modified only slowly or with difficulty, so it is mainly used to distribute firmware (software that is very closely tied to specific hardware, and unlikely to need frequent updates).
In its strictest sense, ROM refers only to mask ROM (the oldest type of solid state ROM), which is fabricated with the desired data permanently stored in it, and thus can never be modified. However, more modern types such as EPROM and flash EEPROM can be erased and re-programmed multiple times; they are still described as "read-only memory,,. because the reprogramming process is generally infrequent, comparatively slow, and often does not permit random access writes to individual memory locations.