]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EmulatorPkg/CpuRuntimeDxe/MpService.c
EmulatorPkg/MpService: add enabled processor check for startupThisAP
[mirror_edk2.git] / EmulatorPkg / CpuRuntimeDxe / MpService.c
index f941519c29c61f99616488a7bed5e2eba78bf68f..36fa68f3e83bac65dedde4028bb4fd967f3296c7 100644 (file)
@@ -713,6 +713,10 @@ CpuMpServicesStartupThisAP (
     return EFI_INVALID_PARAMETER;\r
   }\r
 \r
+  if ((gMPSystem.ProcessorData[ProcessorNumber].Info.StatusFlag & PROCESSOR_ENABLED_BIT) == 0) {\r
+    return EFI_INVALID_PARAMETER;\r
+  }\r
+\r
   gThread->MutexLock(gMPSystem.ProcessorData[ProcessorNumber].StateLock);\r
   if (gMPSystem.ProcessorData[ProcessorNumber].State != CPU_STATE_IDLE) {\r
     gThread->MutexUnlock(gMPSystem.ProcessorData[ProcessorNumber].StateLock);\r