Extensible Firmware Interface Specification
92 12/12/00 Version 1.02
3.7.1 SetVirtualAddressMap()
Summary
Changes the runtime addressing mode of EFI firmware from physical to virtual.
Prototype
EFI_STATUS
SetVirtualAddressMap (
IN UINTN MemoryMapSize,
IN UINTN DescriptorSize,
IN UINT32 DescriptorVersion,
IN EFI_MEMORY_DESCRIPTOR *VirtualMap
);
Parameters
MemoryMapSize The size in bytes of VirtualMap.
DescriptorSize The size in bytes of an entry in the VirtualMap.
DescriptorVersion The version of the structure entries in VirtualMap.
VirtualMap An array of memory descriptors which contain new virtual
address mapping information for all runtime ranges. Type
EFI_MEMORY_DESCRIPTOR is defined in Section 3.2.3.
Description
The SetVirtualAddressMap() function is used by the OS loader. The function can only be
called at runtime, and is called by the owner of the systems memory map. I.e., the component
which called ExitBootServices().
This call changes the addresses of the runtime components of the EFI firmware to the new virtual
addresses supplied in the VirtualMap. The supplied VirtualMap must provide a new virtual
address for every entry in the memory map at ExitBootServices() that is marked as being
needed for runtime usage.
The call to SetVirtualAddressMap() must be done with the physical mappings. On
successful return from this function, the system must then make any future calls with the newly
assigned virtual mappings. All address space mappings must be done in accordance to the
cacheability flags as specified in the original address map.
When this function is called, all events that were registered to be signaled on an address map
change are notified. Each component that is notified must update any internal pointers for their
new addresses. This can be done with the ConvertPointer() function. Once all events have
been notified, the EFI firmware re-applies image fixup information to virtually relocate all
runtime images to their new addresses.