mirror of https://github.com/acidanthera/audk.git
IntelSiliconPkg/MicrocodeUpdateDxe: Refine debug messages
Refine the debug messages during the verification of microcode to make them more clear. Cc: Jiewen Yao <jiewen.yao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
This commit is contained in:
parent
693877f8e5
commit
2ad34f65af
IntelSiliconPkg/Feature/Capsule/MicrocodeUpdateDxe
|
@ -445,7 +445,7 @@ VerifyMicrocode (
|
|||
return EFI_VOLUME_CORRUPTED;
|
||||
}
|
||||
if (TotalSize != ImageSize) {
|
||||
DEBUG((DEBUG_ERROR, "VerifyMicrocode - fail on TotalSize\n"));
|
||||
DEBUG((DEBUG_ERROR, "VerifyMicrocode - TotalSize not equal to ImageSize\n"));
|
||||
*LastAttemptStatus = LAST_ATTEMPT_STATUS_ERROR_INVALID_FORMAT;
|
||||
if (AbortReason != NULL) {
|
||||
*AbortReason = AllocateCopyPool(sizeof(L"InvalidTotalSize"), L"InvalidTotalSize");
|
||||
|
@ -507,16 +507,25 @@ VerifyMicrocode (
|
|||
//
|
||||
if ((ExtendedTableLength > sizeof(CPU_MICROCODE_EXTENDED_TABLE_HEADER)) && ((ExtendedTableLength & 0x3) == 0)) {
|
||||
CheckSum32 = CalculateSum32((UINT32 *)ExtendedTableHeader, ExtendedTableLength);
|
||||
if (CheckSum32 == 0) {
|
||||
if (CheckSum32 != 0) {
|
||||
//
|
||||
// Checksum incorrect
|
||||
//
|
||||
DEBUG((DEBUG_ERROR, "VerifyMicrocode - The checksum for extended table is incorrect\n"));
|
||||
} else {
|
||||
//
|
||||
// Checksum correct
|
||||
//
|
||||
ExtendedTableCount = ExtendedTableHeader->ExtendedSignatureCount;
|
||||
if (ExtendedTableCount <= (ExtendedTableLength - sizeof(CPU_MICROCODE_EXTENDED_TABLE_HEADER)) / sizeof(CPU_MICROCODE_EXTENDED_TABLE)) {
|
||||
if (ExtendedTableCount > (ExtendedTableLength - sizeof(CPU_MICROCODE_EXTENDED_TABLE_HEADER)) / sizeof(CPU_MICROCODE_EXTENDED_TABLE)) {
|
||||
DEBUG((DEBUG_ERROR, "VerifyMicrocode - ExtendedTableCount too big\n"));
|
||||
} else {
|
||||
ExtendedTable = (CPU_MICROCODE_EXTENDED_TABLE *)(ExtendedTableHeader + 1);
|
||||
for (Index = 0; Index < ExtendedTableCount; Index++) {
|
||||
CheckSum32 = CalculateSum32((UINT32 *)ExtendedTable, sizeof(CPU_MICROCODE_EXTENDED_TABLE));
|
||||
if (CheckSum32 == 0) {
|
||||
if (CheckSum32 != 0) {
|
||||
DEBUG((DEBUG_ERROR, "VerifyMicrocode - The checksum for ExtendedTable entry with index 0x%x is incorrect\n", Index));
|
||||
} else {
|
||||
//
|
||||
// Verify Header
|
||||
//
|
||||
|
@ -537,7 +546,7 @@ VerifyMicrocode (
|
|||
}
|
||||
if (!CorrectMicrocode) {
|
||||
if (TryLoad) {
|
||||
DEBUG((DEBUG_ERROR, "VerifyMicrocode - fail on CurrentProcessorSignature/ProcessorFlags\n"));
|
||||
DEBUG((DEBUG_ERROR, "VerifyMicrocode - fail on Current ProcessorSignature/ProcessorFlags\n"));
|
||||
}
|
||||
*LastAttemptStatus = LAST_ATTEMPT_STATUS_ERROR_INCORRECT_VERSION;
|
||||
if (AbortReason != NULL) {
|
||||
|
|
Loading…
Reference in New Issue