]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Core/Dxe/Image/Image.c
[Description]
[mirror_edk2.git] / MdeModulePkg / Core / Dxe / Image / Image.c
index 094d837f3ccb4fa9b8aa02311367052673867577..95528b89961e2808a20f9e1c98bb181fd878c384 100644 (file)
@@ -612,9 +612,9 @@ Arguments:
                         the image to be loaded.\r
   SourceSize          - The size in bytes of SourceBuffer.\r
   DstBuffer           - The buffer to store the image\r
-  NumberOfPages       - If not NULL, a pointer to the image's page number, if this number\r
-                        is not enough, return EFI_BUFFER_TOO_SMALL and this parameter contain\r
-                        the required number.\r
+  NumberOfPages       - If not NULL, it inputs a pointer to the page number of DstBuffer and outputs\r
+                        a pointer to the page number of the image. If this number is not enough, \r
+                        return EFI_BUFFER_TOO_SMALL and this parameter contains the required number.\r
   ImageHandle         - Pointer to the returned image handle that is created when the image\r
                         is successfully loaded.\r
   EntryPoint          - A pointer to the entry point\r
@@ -760,6 +760,10 @@ Returns:
     goto Done;\r
   }\r
 \r
+  if (NumberOfPages != NULL) {\r
+    *NumberOfPages = Image->NumberOfPages;\r
+  }  \r
+\r
   //\r
   // Register the image in the Debug Image Info Table if the attribute is set\r
   //\r