]> git.proxmox.com Git - mirror_edk2.git/commitdiff
FmpDevicePkg FmpDxe: Need repopulate after SetImage is called
authorStar Zeng <star.zeng@intel.com>
Mon, 6 Aug 2018 07:44:59 +0000 (15:44 +0800)
committerStar Zeng <star.zeng@intel.com>
Wed, 8 Aug 2018 11:18:03 +0000 (19:18 +0800)
No need repopulate if SetImage is not called.
But need repopulate after SetImage is called to update
LastAttemptVersion and LastAttemptStatus

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
FmpDevicePkg/FmpDxe/FmpDxe.c

index eb3a9b0e32c293993c6984ac85a3aede57177344..3794ac5008f95ecc51cb881540e745e62fa3782e 100644 (file)
@@ -906,9 +906,6 @@ SetTheImage (
   UINT32      AllHeaderSize;\r
   UINT32      IncommingFwVersion;\r
   UINT32      LastAttemptStatus;\r
   UINT32      AllHeaderSize;\r
   UINT32      IncommingFwVersion;\r
   UINT32      LastAttemptStatus;\r
-  EFI_STATUS  GetAttributesStatus;\r
-  UINT64      AttributesSupported;\r
-  UINT64      AttributesSetting;\r
   UINT32      Version;\r
   UINT32      LowestSupportedVersion;\r
 \r
   UINT32      Version;\r
   UINT32      LowestSupportedVersion;\r
 \r
@@ -1121,18 +1118,6 @@ SetTheImage (
 \r
   LastAttemptStatus = LAST_ATTEMPT_STATUS_SUCCESS;\r
 \r
 \r
   LastAttemptStatus = LAST_ATTEMPT_STATUS_SUCCESS;\r
 \r
-  //\r
-  // Set flag so the descriptor is repopulated\r
-  // This is only applied to devices that do not require reset\r
-  //\r
-  GetAttributesStatus = FmpDeviceGetAttributes (&AttributesSupported, &AttributesSetting);\r
-  if (!EFI_ERROR (GetAttributesStatus)) {\r
-    if (((AttributesSupported & IMAGE_ATTRIBUTE_RESET_REQUIRED) == 0) ||\r
-        ((AttributesSetting & IMAGE_ATTRIBUTE_RESET_REQUIRED) == 0)) {\r
-      mDescriptorPopulated = FALSE;\r
-    }\r
-  }\r
-\r
 cleanup:\r
   mProgressFunc = NULL;\r
   mProgressSupported = FALSE;\r
 cleanup:\r
   mProgressFunc = NULL;\r
   mProgressSupported = FALSE;\r
@@ -1145,6 +1130,12 @@ cleanup:
     Progress (100);\r
   }\r
 \r
     Progress (100);\r
   }\r
 \r
+  //\r
+  // Need repopulate after SetImage is called to\r
+  // update LastAttemptVersion and LastAttemptStatus.\r
+  //\r
+  mDescriptorPopulated = FALSE;\r
+\r
   return Status;\r
 }\r
 \r
   return Status;\r
 }\r
 \r