Você está na página 1de 3

Introduction: why to use it:

Every computer has hardware code that is built into ROM. Such code includes the instructions in the BIOS, as well as code for specific hardware adapters, such as video adapters. For example, EGA and VGA adapters usually include ROM that contains code for manipulating the display. ROMs are 8-bit devices, so only one byte is accessed at a time; also, they typically run between 150-400 ns, so using them will be slow relative to 32-bit memory at 60-80 ns, which is also capable of making four accesses at once.

Solution:
To break through this speed barrier, many designers of 80386 computers use shadow memory. They copy the ROM routines into fast RAM and use the page virtual memory mapping abilities of the 80386 and newer microprocessors to switch the RAM into the address range used by the ROM. Execution of BIOS routines can then be speeded up by a factor of four or more-more because greater wait states often are imposed when accessing slower ROM memory. Of course, the shadow memory is volatile and must be loaded with the BIOS routines every time the computer is booted up. The original ROM is then disabled, and the new location will be write-protected. The ROM that is moved must go somewhere. Almost any address space can be assigned to it because once it is relocated; it should not need to be called upon again. For example: In machine X, the BIOS resides in the segment from F000-FFFFh. On boot-up, the BIOS copy itself into a piece of extended memory, and then remap that memory to respond to addresses in the F000-FFFFh range. Therefore, any attempts by the system to call program code in those addresses will be answered by the "shadow" code in RAM, rather than by the original ROM.

The 80386 (and 80286 as well) also have the capability to protect RAM from being overwritten. So, once the shadow RAM is created, that memory is usually protected so that it

behaves like the original ROM. That is, any accidental attempts to overwrite the code in those areas will fail, and the memory will be unchanged

Disadvantages:
1. Shadowing has some detrimental effects on its host PC. Any ROM memory that is shadowed must be duplicated in RAM, and the bytes used for the duplication will be stolen away from the total RAM in the computer. This memory is reallocated for its purpose by the PC's BIOS and is invisible to the rest of the system. Consequently, the total RAM

installed in the PC often exceeds the amount reported by the system's POST (power-on self test).

ROM duplicate:
The memory map for the one megabyte 0000 to FFFFFH is the same for all x86-based PCs. when 286 microprocessors are powered up; the PC is in real mode and fetches the first opcode from physical memory location FFFFF0H. This is because all A20-A23 are high. This leads to physical address of FFFFF0H. After execution of the first op-code all A20-A23 are low. In other words, while the CPU wakes up in real mode at address FFFF0H, the first opcode is fetched from FFFFF0H. This is one reason that there is an exact duplicate of ROM at addresses 0F000-0FFFF and FF0000-FFFFFF. This allows access of BIOS ROM in both real and protective modes, and is shown below:

Conclusion:
The most important effect of shadowing is to accelerate video BIOS routines. However, recently, most advanced applications and operating systems (like Windows and OS/2) avoid the video BIOS and instead write directly to display memory. These operations are not aided by shadowing, so they operate at the same speed whether shadowing is on or off. In other words, if most of the work is in Windows, ROM shadowing doesn't have any effect, so we might as well switch it off. Also Flash ROM is now quicker than DRAM, so if the PC has a Flash BIOS

Shadow RAM is not required.

Você também pode gostar