// Sync BSP's Mtrr table to all wakeup APs and load microcode on APs.\r
//\r
MtrrSetAllMtrrs (&PeiCpuMpData->MtrrTable);\r
- MicrocodeDetect ();\r
+ MicrocodeDetect (PeiCpuMpData);\r
PeiCpuMpData->CpuData[ProcessorNumber].State = CpuStateIdle;\r
} else {\r
//\r
ExchangeInfo->PmodeOffset = PeiCpuMpData->AddressMap.PModeEntryOffset;\r
ExchangeInfo->LmodeOffset = PeiCpuMpData->AddressMap.LModeEntryOffset;\r
ExchangeInfo->Cr3 = AsmReadCr3 ();\r
+ ExchangeInfo->CodeSegment = AsmReadCs ();\r
+ ExchangeInfo->DataSegment = AsmReadDs ();\r
ExchangeInfo->CFunction = (UINTN) ApCFunction;\r
ExchangeInfo->NumApsExecuting = 0;\r
ExchangeInfo->PeiCpuMpData = PeiCpuMpData;\r
//\r
// Load Microcode on BSP\r
//\r
- MicrocodeDetect ();\r
+ MicrocodeDetect (PeiCpuMpData);\r
//\r
// Store BSP's MTRR setting\r
//\r