mirror of https://github.com/acidanthera/audk.git
UefiCpuPkg/CpuMpPei: Skip microcode check/load if it has been loaded
Actually, there is only one microcode region in platform. If microcode has been loaded, its signature will not be zero and should be loaded successfully. We needn't to check microcode region and load microcode again. This update is to skip checking/loading microcode if current microcode signature is not zero. Cc: Michael Kinney <michael.d.kinney@intel.com> Cc: Feng Tian <feng.tian@intel.com> Cc: Giri P Mudusuru <giri.p.mudusuru@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Fan <jeff.fan@intel.com> Reviewed-by: Giri P Mudusuru <giri.p.mudusuru@intel.com>
This commit is contained in:
parent
8aba40b792
commit
46fd118219
|
@ -53,6 +53,7 @@ MicrocodeDetect (
|
||||||
UINTN Index;
|
UINTN Index;
|
||||||
UINT8 PlatformId;
|
UINT8 PlatformId;
|
||||||
UINT32 RegEax;
|
UINT32 RegEax;
|
||||||
|
UINT32 CurrentRevision;
|
||||||
UINT32 LatestRevision;
|
UINT32 LatestRevision;
|
||||||
UINTN TotalSize;
|
UINTN TotalSize;
|
||||||
UINT32 CheckSum32;
|
UINT32 CheckSum32;
|
||||||
|
@ -69,6 +70,14 @@ MicrocodeDetect (
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CurrentRevision = GetCurrentMicrocodeSignature ();
|
||||||
|
if (CurrentRevision != 0) {
|
||||||
|
//
|
||||||
|
// Skip loading microcode if it has been loaded successfully
|
||||||
|
//
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
ExtendedTableLength = 0;
|
ExtendedTableLength = 0;
|
||||||
//
|
//
|
||||||
// Here data of CPUID leafs have not been collected into context buffer, so
|
// Here data of CPUID leafs have not been collected into context buffer, so
|
||||||
|
|
Loading…
Reference in New Issue