From: Star Zeng <star.zeng@intel.com>
To: edk2-devel@lists.01.org
Cc: Star Zeng <star.zeng@intel.com>,
Michael D Kinney <michael.d.kinney@intel.com>
Subject: [PATCH 1/2] FmpDevicePkg FmpDxe: Need repopulate after SetImage is called
Date: Mon, 6 Aug 2018 18:28:59 +0800 [thread overview]
Message-ID: <1533551340-66548-2-git-send-email-star.zeng@intel.com> (raw)
In-Reply-To: <1533551340-66548-1-git-send-email-star.zeng@intel.com>
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>
---
FmpDevicePkg/FmpDxe/FmpDxe.c | 21 ++++++---------------
1 file changed, 6 insertions(+), 15 deletions(-)
diff --git a/FmpDevicePkg/FmpDxe/FmpDxe.c b/FmpDevicePkg/FmpDxe/FmpDxe.c
index eb3a9b0e32c2..3794ac5008f9 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;
}
--
2.7.0.windows.1
next prev parent reply other threads:[~2018-08-06 10:29 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-06 10:28 [PATCH 0/2] Fix ESRT out of date Star Zeng
2018-08-06 10:28 ` Star Zeng [this message]
2018-08-06 10:29 ` [PATCH 2/2] MdeModulePkg ErstFmpDxe: Create ESRT in ReadyToBoot event Star Zeng
2018-08-08 1:01 ` [PATCH 0/2] Fix ESRT out of date Kinney, Michael D
2018-08-08 1:05 ` Zeng, Star
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1533551340-66548-2-git-send-email-star.zeng@intel.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox