mirror of https://github.com/acidanthera/audk.git
UefiCpuPkg/CpuMpPei: Set AP state to CpuStateIdle after initialization
Cc: Feng Tian <feng.tian@intel.com> Cc: Michael Kinney <michael.d.kinney@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Fan <jeff.fan@intel.com> Reviewed-by: Feng Tian <feng.tian@Intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19087 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
ef1fdb8098
commit
10c6c206da
|
@ -228,13 +228,14 @@ ApCFunction (
|
||||||
|
|
||||||
PeiCpuMpData = ExchangeInfo->PeiCpuMpData;
|
PeiCpuMpData = ExchangeInfo->PeiCpuMpData;
|
||||||
if (PeiCpuMpData->InitFlag) {
|
if (PeiCpuMpData->InitFlag) {
|
||||||
|
ProcessorNumber = NumApsExecuting;
|
||||||
//
|
//
|
||||||
// This is first time AP wakeup, get BIST information from AP stack
|
// This is first time AP wakeup, get BIST information from AP stack
|
||||||
//
|
//
|
||||||
BistData = *(UINTN *) (PeiCpuMpData->Buffer + NumApsExecuting * PeiCpuMpData->CpuApStackSize - sizeof (UINTN));
|
BistData = *(UINTN *) (PeiCpuMpData->Buffer + ProcessorNumber * PeiCpuMpData->CpuApStackSize - sizeof (UINTN));
|
||||||
PeiCpuMpData->CpuData[NumApsExecuting].Health.Uint32 = (UINT32) BistData;
|
PeiCpuMpData->CpuData[ProcessorNumber].Health.Uint32 = (UINT32) BistData;
|
||||||
PeiCpuMpData->CpuData[NumApsExecuting].ApicId = GetInitialApicId ();
|
PeiCpuMpData->CpuData[ProcessorNumber].ApicId = GetInitialApicId ();
|
||||||
if (PeiCpuMpData->CpuData[NumApsExecuting].ApicId >= 0xFF) {
|
if (PeiCpuMpData->CpuData[ProcessorNumber].ApicId >= 0xFF) {
|
||||||
//
|
//
|
||||||
// Set x2APIC mode if there are any logical processor reporting
|
// Set x2APIC mode if there are any logical processor reporting
|
||||||
// an APIC ID of 255 or greater.
|
// an APIC ID of 255 or greater.
|
||||||
|
@ -248,6 +249,7 @@ ApCFunction (
|
||||||
//
|
//
|
||||||
MtrrSetAllMtrrs (&PeiCpuMpData->MtrrTable);
|
MtrrSetAllMtrrs (&PeiCpuMpData->MtrrTable);
|
||||||
MicrocodeDetect ();
|
MicrocodeDetect ();
|
||||||
|
PeiCpuMpData->CpuData[ProcessorNumber].State = CpuStateIdle;
|
||||||
} else {
|
} else {
|
||||||
//
|
//
|
||||||
// Execute AP function if AP is not disabled
|
// Execute AP function if AP is not disabled
|
||||||
|
|
Loading…
Reference in New Issue