]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Add new API in UefiRuntimeLib to convert function pointer.
authorqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 6 Nov 2008 13:55:41 +0000 (13:55 +0000)
committerqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 6 Nov 2008 13:55:41 +0000 (13:55 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6415 6f19259b-4bc3-4df7-8a09-765794883524

MdePkg/Include/Library/UefiRuntimeLib.h

index af3aaf40ce0896239488e8511ee665217cb49a6e..4ecccb4d078cafc0fb0daa0083e69649fefbafc4 100644 (file)
@@ -229,7 +229,7 @@ EfiResetSystem (
   );\r
 \r
 /**\r
-  Determines the new virtual address that is to be used on subsequent memory accesses.\r
+  This service converts a function pointer from physical to virtual addressing. \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
@@ -237,7 +237,7 @@ EfiResetSystem (
                              applied.\r
 \r
   @retval  EFI_SUCCESS  Success to execute the function.\r
-  @retval  !EFI_SUCCESS Failed to e3xecute the function.\r
+  @retval  !EFI_SUCCESS Failed to execute the function.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -247,6 +247,35 @@ EfiConvertPointer (
   IN OUT VOID               **Address\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
 /**\r
   Change the runtime addressing mode of EFI firmware from physical to virtual.\r