summaryrefslogtreecommitdiffstats
path: root/FmpDevicePkg/FmpDxe
diff options
context:
space:
mode:
authorStar Zeng <star.zeng@intel.com>2018-08-06 15:44:59 +0800
committerStar Zeng <star.zeng@intel.com>2018-08-08 19:18:03 +0800
commit27e42bf61bb27a61b5b4dd053c6bc219c73c4cc8 (patch)
tree31def6d0937011f91241dd60b4f88192f2c7588c /FmpDevicePkg/FmpDxe
parentcefc8d8821f0a5ec7995901146dd6b055d7b956a (diff)
downloadedk2-27e42bf61bb27a61b5b4dd053c6bc219c73c4cc8.tar.gz
edk2-27e42bf61bb27a61b5b4dd053c6bc219c73c4cc8.tar.bz2
edk2-27e42bf61bb27a61b5b4dd053c6bc219c73c4cc8.zip
FmpDevicePkg FmpDxe: Need repopulate after SetImage is called
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>
Diffstat (limited to 'FmpDevicePkg/FmpDxe')
-rw-r--r--FmpDevicePkg/FmpDxe/FmpDxe.c21
1 files changed, 6 insertions, 15 deletions
diff --git a/FmpDevicePkg/FmpDxe/FmpDxe.c b/FmpDevicePkg/FmpDxe/FmpDxe.c
index eb3a9b0e32..3794ac5008 100644
--- a/FmpDevicePkg/FmpDxe/FmpDxe.c
+++ b/FmpDevicePkg/FmpDxe/FmpDxe.c
@@ -906,9 +906,6 @@ SetTheImage (
UINT32 AllHeaderSize;
UINT32 IncommingFwVersion;
UINT32 LastAttemptStatus;
- EFI_STATUS GetAttributesStatus;
- UINT64 AttributesSupported;
- UINT64 AttributesSetting;
UINT32 Version;
UINT32 LowestSupportedVersion;
@@ -1121,18 +1118,6 @@ SetTheImage (
LastAttemptStatus = LAST_ATTEMPT_STATUS_SUCCESS;
- //
- // Set flag so the descriptor is repopulated
- // This is only applied to devices that do not require reset
- //
- GetAttributesStatus = FmpDeviceGetAttributes (&AttributesSupported, &AttributesSetting);
- if (!EFI_ERROR (GetAttributesStatus)) {
- if (((AttributesSupported & IMAGE_ATTRIBUTE_RESET_REQUIRED) == 0) ||
- ((AttributesSetting & IMAGE_ATTRIBUTE_RESET_REQUIRED) == 0)) {
- mDescriptorPopulated = FALSE;
- }
- }
-
cleanup:
mProgressFunc = NULL;
mProgressSupported = FALSE;
@@ -1145,6 +1130,12 @@ cleanup:
Progress (100);
}
+ //
+ // Need repopulate after SetImage is called to
+ // update LastAttemptVersion and LastAttemptStatus.
+ //
+ mDescriptorPopulated = FALSE;
+
return Status;
}