]> git.proxmox.com Git - mirror_edk2.git/blobdiff - UefiCpuPkg/CpuMpPei/CpuMpPei.c
UefiCpuPkg/CpuMpPei: Add CodeSegment and DataSegment fields
[mirror_edk2.git] / UefiCpuPkg / CpuMpPei / CpuMpPei.c
index 4ed1da98787858e8008df9614e45900333c5ff2c..9b602a190631935050fad188895e31b254aa1a34 100644 (file)
@@ -302,7 +302,7 @@ ApCFunction (
       // 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
@@ -455,6 +455,8 @@ WakeUpAP (
   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
@@ -624,7 +626,7 @@ CountProcessorNumber (
   //\r
   // Load Microcode on BSP\r
   //\r
-  MicrocodeDetect ();\r
+  MicrocodeDetect (PeiCpuMpData);\r
   //\r
   // Store BSP's MTRR setting\r
   //\r