mirror of https://github.com/acidanthera/audk.git
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 b6f67b4d58
to get more detail information.
Cc: Ray Ni <ray.ni@intel.com>
Cc: Rangasai V Chaganty <rangasai.v.chaganty@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Chen A Chen <chen.a.chen@intel.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
This commit is contained in:
parent
8391ffdc15
commit
5170327b71
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue