On 01/22/21 23:40, Tom Lendacky wrote:
Can SetVirtualAddressMap() be called more than once?
According to the UEFI spec: no, it can't.
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.
[...]
The SetVirtualAddressMap() and ConvertPointer() services are only
callable in physical mode, so they do not need to be converted from
physical pointers to virtual pointers.
[...]
A virtual address map may only be applied one time. Once the runtime
system is in virtual mode, calls to this function return
EFI_UNSUPPORTED.
(I seem to detect a bit of contradiction between quotes #1+#2 and #3 --
the first two quotes seem to explain that a second call is expected to
be impossible, whereas the third quote explains how a second or later
call should behave. But, anyway, the intent is clear.)