if processor number is the one of disabled processor, startupThisAP should return invalid prameter.
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Chen Fan <chen.fan.f...@cn.fujitsu.com> --- EmulatorPkg/CpuRuntimeDxe/MpService.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/EmulatorPkg/CpuRuntimeDxe/MpService.c b/EmulatorPkg/CpuRuntimeDxe/MpService.c index 06c71ec..2ba9655 100644 --- a/EmulatorPkg/CpuRuntimeDxe/MpService.c +++ b/EmulatorPkg/CpuRuntimeDxe/MpService.c @@ -694,6 +694,10 @@ CpuMpServicesStartupThisAP ( return EFI_INVALID_PARAMETER; } + if ((gMPSystem.ProcessorData[ProcessorNumber].Info.StatusFlag & PROCESSOR_ENABLED_BIT) == 0) { + return EFI_INVALID_PARAMETER; + } + gThread->MutexLock(gMPSystem.ProcessorData[ProcessorNumber].StateLock); if (gMPSystem.ProcessorData[ProcessorNumber].State != CPU_STATE_IDLE) { gThread->MutexUnlock(gMPSystem.ProcessorData[ProcessorNumber].StateLock); -- 1.9.3 ------------------------------------------------------------------------------ _______________________________________________ edk2-devel mailing list edk2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-devel