]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Currently, CapsulePei assumes ScatterGatherList are all related. But, UEFI spec has...
authorlzeng14 <lzeng14@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 11 May 2012 01:41:28 +0000 (01:41 +0000)
committerlzeng14 <lzeng14@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 11 May 2012 01:41:28 +0000 (01:41 +0000)
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13305 6f19259b-4bc3-4df7-8a09-765794883524

MdeModulePkg/Universal/CapsulePei/Common/CapsuleCoalesce.c

index ec6b86f09f0c939e820d0bff3093738b1fd79bf8..bc8de49ddeeefe95b3f3bc82d08255773675be23 100644 (file)
@@ -720,32 +720,26 @@ BuildCapsuleDescriptors (
   Index             = 0;\r
 \r
   while (BlockListBuffer[Index] != 0) {\r
-    if (Index == 0) {\r
-      //\r
-      // For the first Capsule Image, test integrity of descriptors.\r
-      //\r
-      LastBlock = ValidateCapsuleIntegrity ((EFI_CAPSULE_BLOCK_DESCRIPTOR *)(UINTN)BlockListBuffer[Index]);\r
+    //\r
+    // Test integrity of descriptors.\r
+    //\r
+    TempBlock = ValidateCapsuleIntegrity ((EFI_CAPSULE_BLOCK_DESCRIPTOR *)(UINTN)BlockListBuffer[Index]);\r
+    if (TempBlock != NULL) {\r
       if (LastBlock == NULL) {\r
-        return EFI_NOT_FOUND;\r
-      }\r
-      //\r
-      // Return the base of the block descriptors\r
-      //\r
-      HeadBlock = (EFI_CAPSULE_BLOCK_DESCRIPTOR *)(UINTN)BlockListBuffer[Index];\r
-    } else {        \r
-      //\r
-      // Test integrity of descriptors.\r
-      //\r
-      TempBlock = ValidateCapsuleIntegrity ((EFI_CAPSULE_BLOCK_DESCRIPTOR *)(UINTN)BlockListBuffer[Index]);\r
-      if (TempBlock == NULL) {\r
-        return EFI_NOT_FOUND;\r
+        LastBlock = TempBlock;\r
+\r
+        //\r
+        // Return the base of the block descriptors\r
+        //\r
+        HeadBlock = (EFI_CAPSULE_BLOCK_DESCRIPTOR *)(UINTN)BlockListBuffer[Index];\r
+      } else {\r
+        //\r
+        // Combine the different BlockList into single BlockList.\r
+        //\r
+        LastBlock->Union.DataBlock = (EFI_PHYSICAL_ADDRESS)(UINTN)BlockListBuffer[Index];\r
+        LastBlock->Length          = 0;\r
+        LastBlock                  = TempBlock;\r
       }\r
-      //\r
-      // Combine the different BlockList into single BlockList.\r
-      //\r
-      LastBlock->Union.DataBlock = (EFI_PHYSICAL_ADDRESS)(UINTN)BlockListBuffer[Index];\r
-      LastBlock->Length          = 0;\r
-      LastBlock                  = TempBlock;\r
     }\r
     Index ++;\r
   }\r