]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleService.c
Correct minor comments in meta data file.
[mirror_edk2.git] / MdeModulePkg / Universal / CapsuleRuntimeDxe / CapsuleService.c
index 2d5411a607c07a1799e37f09c4407a5d31d42142..f0e82ae602872a5b43d43795621e4ae64448fa68 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
-  Capsule Runtime Drivers produces two UEFI capsule runtime services.\r
+  Capsule Runtime Driver produces two UEFI capsule runtime services.\r
   (UpdateCapsule, QueryCapsuleCapabilities)\r
-  It installs the Capsule Architectural Protocol (EDKII definition) to signify \r
+  It installs the Capsule Architectural Protocol defined in PI1.0a to signify \r
   the capsule runtime services are ready.\r
 \r
 Copyright (c) 2006 - 2008, Intel Corporation. <BR>\r
@@ -235,15 +235,23 @@ QueryCapsuleCapabilities (
     if (!FeaturePcdGet(PcdSupportUpdateCapsuleReset)) {\r
       return EFI_UNSUPPORTED;\r
     }\r
-    *ResetType = EfiResetWarm;\r
-    *MaxiumCapsuleSize = FixedPcdGet32(PcdMaxSizePopulateCapsule);\r
+    *ResetType = EfiResetWarm;   \r
   } else {\r
     //\r
     // For non-reset capsule image.\r
     //\r
     *ResetType = EfiResetCold;\r
+  }\r
+  \r
+  //\r
+  // The support max capsule image size\r
+  //\r
+  if ((CapsuleHeader->Flags & CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE) != 0) {\r
+    *MaxiumCapsuleSize = FixedPcdGet32(PcdMaxSizePopulateCapsule);\r
+  } else {\r
     *MaxiumCapsuleSize = FixedPcdGet32(PcdMaxSizeNonPopulateCapsule);\r
   }\r
+\r
   return EFI_SUCCESS;\r
 }\r
 \r