]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Library/UefiRuntimeLib/RuntimeService.c
Add IA32, x64 & EBC version of EfiConvertFunctionPointer()
[mirror_edk2.git] / MdePkg / Library / UefiRuntimeLib / RuntimeService.c
index b4479d0bdbf48de2f93a703bd0e393b375e90690..f4076513f494fd44ab6377780c1ce05af997e36d 100644 (file)
@@ -260,6 +260,40 @@ EfiConvertPointer (
 }\r
 \r
 \r
+/**\r
+  Determines the new virtual address that is to be used on subsequent memory accesses.\r
+\r
+  For IA32, X64, and EBC, this service is a wrapper for the UEFI Runtime Service\r
+  ConvertPointer().  See the UEFI Specification for details. \r
+  For IPF, this function interprets Address as a pointer to an EFI_PLABEL structure\r
+  and both the EntryPoint and GP fields of an EFI_PLABEL are converted from physical\r
+  to virtiual addressing.  Since IPF allows the GP to point to an address outside\r
+  a PE/COFF image, the physical to virtual offset for the EntryPoint field is used\r
+  to adjust the GP field.  The UEFI Runtime Service ConvertPointer() is used to convert\r
+  EntryPoint and the status code for this conversion is always returned.   If the convertion\r
+  of EntryPoint fails, then neither EntryPoint nor GP are modified.  See the UEFI\r
+  Specification for details on the UEFI Runtime Service ConvertPointer().\r
+\r
+  @param  DebugDisposition   Supplies type information for the pointer being converted.\r
+  @param  Address            The pointer to a pointer that is to be fixed to be the\r
+                             value needed for the new virtual address mapping being\r
+                             applied.\r
+\r
+  @retval  EFI_SUCCESS  Success to execute the function.\r
+  @retval  !EFI_SUCCESS Failed to execute the function.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+EfiConvertFunctionPointer (\r
+  IN UINTN                DebugDisposition,\r
+  IN OUT VOID             **Address\r
+  )\r
+{\r
+  return EfiConvertPointer (DebugDisposition, Address);\r
+}\r
+\r
+\r
 /**\r
   Conver the standard Lib double linked list to a virtual mapping.\r
 \r