From: "Ni, Ray" <ray.ni@intel.com>
To: "Chen, Chen A" <chen.a.chen@intel.com>,
"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Subject: Re: [PATCH] IntelSiliconPkg/MicrocodeUpdate: Fix incorrect checksum issue
Date: Fri, 22 Feb 2019 09:47:10 +0000 [thread overview]
Message-ID: <734D49CCEBEEF84792F5B80ED585239D5C02CB3A@SHSMSX104.ccr.corp.intel.com> (raw)
In-Reply-To: <20190222004835.13780-1-chen.a.chen@intel.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
> -----Original Message-----
> From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Chen
> A Chen
> Sent: Friday, February 22, 2019 8:49 AM
> To: edk2-devel@lists.01.org
> Subject: [edk2] [PATCH] IntelSiliconPkg/MicrocodeUpdate: Fix incorrect
> checksum issue
>
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1020
>
> The same issue has fixed in UefiCpuPkg/Microcode.c file.
> Please reference b6f67b4d58b81f12f63f5f8c94cf8af3600297ab
> to get more detail information.
>
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Chen A Chen <chen.a.chen@intel.com>
> Cc: Ray Ni <ray.ni@intel.com>
> Cc: Rangasai V Chaganty <rangasai.v.chaganty@intel.com>
> ---
> .../Feature/Capsule/MicrocodeUpdateDxe/MicrocodeUpdate.c | 10
> +++++++++-
> 1 file changed, 9 insertions(+), 1 deletion(-)
>
> diff --git
> a/IntelSiliconPkg/Feature/Capsule/MicrocodeUpdateDxe/MicrocodeUpdate.c
> b/IntelSiliconPkg/Feature/Capsule/MicrocodeUpdateDxe/MicrocodeUpdate.c
> index 9b5757da71..e45c7a8def 100644
> ---
> a/IntelSiliconPkg/Feature/Capsule/MicrocodeUpdateDxe/MicrocodeUpdate.c
> +++
> b/IntelSiliconPkg/Feature/Capsule/MicrocodeUpdateDxe/MicrocodeUpdate.c
> @@ -390,6 +390,7 @@ VerifyMicrocode (
> UINTN DataSize;
> UINT32 CurrentRevision;
> PROCESSOR_INFO *ProcessorInfo;
> + UINT32 InCompleteCheckSum32;
> UINT32 CheckSum32;
> UINTN ExtendedTableLength;
> UINT32 ExtendedTableCount;
> @@ -488,6 +489,10 @@ VerifyMicrocode (
> }
> return EFI_VOLUME_CORRUPTED;
> }
> + InCompleteCheckSum32 = CheckSum32;
> + InCompleteCheckSum32 -= MicrocodeEntryPoint->ProcessorSignature.Uint32;
> + InCompleteCheckSum32 -= MicrocodeEntryPoint->ProcessorFlags;
> + InCompleteCheckSum32 -= MicrocodeEntryPoint->Checksum;
>
> //
> // Check ProcessorSignature/ProcessorFlags
> @@ -522,7 +527,10 @@ VerifyMicrocode (
> } else {
> ExtendedTable = (CPU_MICROCODE_EXTENDED_TABLE
> *)(ExtendedTableHeader + 1);
> for (Index = 0; Index < ExtendedTableCount; Index++) {
> - CheckSum32 = CalculateSum32((UINT32 *)ExtendedTable,
> sizeof(CPU_MICROCODE_EXTENDED_TABLE));
> + CheckSum32 = InCompleteCheckSum32;
> + CheckSum32 += ExtendedTable->ProcessorSignature.Uint32;
> + CheckSum32 += ExtendedTable->ProcessorFlag;
> + CheckSum32 += ExtendedTable->Checksum;
> if (CheckSum32 != 0) {
> DEBUG((DEBUG_ERROR, "VerifyMicrocode - The checksum for
> ExtendedTable entry with index 0x%x is incorrect\n", Index));
> } else {
> --
> 2.16.2.windows.1
>
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
prev parent reply other threads:[~2019-02-22 9:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-22 0:48 [PATCH] IntelSiliconPkg/MicrocodeUpdate: Fix incorrect checksum issue Chen A Chen
2019-02-22 9:47 ` Ni, Ray [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=734D49CCEBEEF84792F5B80ED585239D5C02CB3A@SHSMSX104.ccr.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