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
\r
PeiCpuMpData = ExchangeInfo->PeiCpuMpData;\r
if (PeiCpuMpData->InitFlag) {\r
\r
PeiCpuMpData = ExchangeInfo->PeiCpuMpData;\r
if (PeiCpuMpData->InitFlag) {\r
+ ProcessorNumber = NumApsExecuting;\r
//\r
// This is first time AP wakeup, get BIST information from AP stack\r
//\r
//\r
// This is first time AP wakeup, get BIST information from AP stack\r
//\r
- BistData = *(UINTN *) (PeiCpuMpData->Buffer + NumApsExecuting * PeiCpuMpData->CpuApStackSize - sizeof (UINTN));\r
- PeiCpuMpData->CpuData[NumApsExecuting].Health.Uint32 = (UINT32) BistData;\r
- PeiCpuMpData->CpuData[NumApsExecuting].ApicId = GetInitialApicId ();\r
- if (PeiCpuMpData->CpuData[NumApsExecuting].ApicId >= 0xFF) {\r
+ BistData = *(UINTN *) (PeiCpuMpData->Buffer + ProcessorNumber * PeiCpuMpData->CpuApStackSize - sizeof (UINTN));\r
+ PeiCpuMpData->CpuData[ProcessorNumber].Health.Uint32 = (UINT32) BistData;\r
+ PeiCpuMpData->CpuData[ProcessorNumber].ApicId = GetInitialApicId ();\r
+ if (PeiCpuMpData->CpuData[ProcessorNumber].ApicId >= 0xFF) {\r
//\r
// Set x2APIC mode if there are any logical processor reporting\r
// an APIC ID of 255 or greater.\r
//\r
// Set x2APIC mode if there are any logical processor reporting\r
// an APIC ID of 255 or greater.\r
//\r
MtrrSetAllMtrrs (&PeiCpuMpData->MtrrTable);\r
MicrocodeDetect ();\r
//\r
MtrrSetAllMtrrs (&PeiCpuMpData->MtrrTable);\r
MicrocodeDetect ();\r
+ PeiCpuMpData->CpuData[ProcessorNumber].State = CpuStateIdle;\r
} else {\r
//\r
// Execute AP function if AP is not disabled\r
} else {\r
//\r
// Execute AP function if AP is not disabled\r