A method and system for virtualizing images. Multiple images are shadowed
(i.e., copied) into portions of the physical address space of system
memory. A mapping mechanism is effected to map all of the images into a
common virtual address space, wherein images in the virtual address space
are overlapped, thus enabling the images to be logically stored in a
portion of virtual memory having a size less than the aggregated size of
the images. In some embodiments, the images comprise option ROM images,
which are shadowed into system memory during the pre-boot of a computer
system. Due to legacy requirements, the option ROM images must be
logically located in a limited portion of virtual memory (i.e., the
common virtual address space). The embodiments enable a large number of
option ROM images to be shadowed at the same time. In one embodiment,
system hardware is programmed by firmware to effect a dynamic mapping
between virtual pages at which an image is logically located to physical
pages where the image is physically located.