Setvirtualaddressmap() – Intel Extensible Firmware Interface User Manual
Page 209
Services
— Runtime Services
Version 1.10
12/01/02
6-17
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 the
function description.
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 system’s memory map. I.e., the component
which called
.
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. All of the virtual address fields in the
VirtualMap
must be aligned
on 4 KB boundaries.
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.