From: "Michael D Kinney" <michael.d.kinney@intel.com>
To: "Jin, Eric" <eric.jin@intel.com>,
"devel@edk2.groups.io" <devel@edk2.groups.io>,
"Kinney, Michael D" <michael.d.kinney@intel.com>
Subject: Re: [Staging/Bug_1525_FmpDevicePkg_MultipleControllers][PATCH] MdeModulePkg/EsrtFmpDxe: Correct the LastAttemptVersion algorithm in ESRT entry
Date: Tue, 16 Apr 2019 16:11:07 +0000 [thread overview]
Message-ID: <E92EE9817A31E24EB0585FDF735412F5B9C9693F@ORSMSX113.amr.corp.intel.com> (raw)
In-Reply-To: <20190416030158.27096-1-eric.jin@intel.com>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
> -----Original Message-----
> From: Jin, Eric
> Sent: Monday, April 15, 2019 8:02 PM
> To: devel@edk2.groups.io
> Cc: Kinney, Michael D <michael.d.kinney@intel.com>
> Subject:
> [Staging/Bug_1525_FmpDevicePkg_MultipleControllers][PAT
> CH] MdeModulePkg/EsrtFmpDxe: Correct the
> LastAttemptVersion algorithm in ESRT entry
>
> Fix the 1nd issue mentioned in
> https://bugzilla.tianocore.org/show_bug.cgi?id=1525
>
> Update the ESRT entry with the last attempt status and
> last attempt
> version from the first FMP instance whose last attempt
> status is not
> SUCCESS. If all FMP instances are SUCCESS, then set
> last attempt version
> to the smallest value from all FMP instances
>
> CC: Michael D Kinney <michael.d.kinney@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Eric Jin <eric.jin@intel.com>
> ---
> MdeModulePkg/Universal/EsrtFmpDxe/EsrtFmp.c | 14
> ++++++++------
> 1 file changed, 8 insertions(+), 6 deletions(-)
>
> diff --git
> a/MdeModulePkg/Universal/EsrtFmpDxe/EsrtFmp.c
> b/MdeModulePkg/Universal/EsrtFmpDxe/EsrtFmp.c
> index bd92d1da40..848bd44e9d 100644
> --- a/MdeModulePkg/Universal/EsrtFmpDxe/EsrtFmp.c
> +++ b/MdeModulePkg/Universal/EsrtFmpDxe/EsrtFmp.c
> @@ -196,20 +196,22 @@ CreateEsrtEntry (
> // VERSION 3 supports last attempt values
> //
> if (FmpVersion >= 3) {
> - Entry->LastAttemptVersion =
> - MIN (
> - FmpImageInfoBuf->LastAttemptVersion,
> - Entry->LastAttemptVersion
> - );
> //
> // Update the ESRT entry with the last attempt
> status and last attempt
> // version from the first FMP instance whose
> last attempt status is not
> - // SUCCESS.
> + // SUCCESS. If all FMP instances are SUCCESS,
> then set version to the
> + // smallest value from all FMP instances.
> //
> if (Entry->LastAttemptStatus ==
> LAST_ATTEMPT_STATUS_SUCCESS) {
> if (FmpImageInfoBuf->LastAttemptStatus !=
> LAST_ATTEMPT_STATUS_SUCCESS) {
> Entry->LastAttemptStatus =
> FmpImageInfoBuf->LastAttemptStatus;
> Entry->LastAttemptVersion =
> FmpImageInfoBuf->LastAttemptVersion;
> + } else {
> + Entry->LastAttemptVersion =
> + MIN (
> + FmpImageInfoBuf->LastAttemptVersion,
> + Entry->LastAttemptVersion
> + );
> }
> }
> }
> --
> 2.20.1.windows.1
prev parent reply other threads:[~2019-04-16 16:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-16 3:01 [Staging/Bug_1525_FmpDevicePkg_MultipleControllers][PATCH] MdeModulePkg/EsrtFmpDxe: Correct the LastAttemptVersion algorithm in ESRT entry Eric Jin
2019-04-16 16:11 ` Michael D Kinney [this message]
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=E92EE9817A31E24EB0585FDF735412F5B9C9693F@ORSMSX113.amr.corp.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