mirror of https://github.com/acidanthera/audk.git
UefiCpuPkg/MpInitLib: Load uCode once for each core.
The SDM requires only one thread per core to load the microcode. This change enables this solution. Cc: Laszlo Ersek <lersek@redhat.com> Cc: Ruiyu Ni <ruiyu.ni@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Eric Dong <eric.dong@intel.com> Acked-by: Laszlo Ersek <lersek@redhat.com> Regression-tested-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
This commit is contained in:
parent
2a08913443
commit
f63a3e2867
|
@ -61,6 +61,7 @@ MicrocodeDetect (
|
|||
VOID *MicrocodeData;
|
||||
MSR_IA32_PLATFORM_ID_REGISTER PlatformIdMsr;
|
||||
UINT32 ProcessorFlags;
|
||||
UINT32 ThreadId;
|
||||
|
||||
if (CpuMpData->MicrocodePatchRegionSize == 0) {
|
||||
//
|
||||
|
@ -77,6 +78,14 @@ MicrocodeDetect (
|
|||
return;
|
||||
}
|
||||
|
||||
GetProcessorLocationByApicId (GetInitialApicId (), NULL, NULL, &ThreadId);
|
||||
if (ThreadId != 0) {
|
||||
//
|
||||
// Skip loading microcode if it is not the first thread in one core.
|
||||
//
|
||||
return;
|
||||
}
|
||||
|
||||
ExtendedTableLength = 0;
|
||||
//
|
||||
// Here data of CPUID leafs have not been collected into context buffer, so
|
||||
|
|
Loading…
Reference in New Issue