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> Reviewed-by: Jordan Justen <jordan.l.jus...@intel.com> --- EmulatorPkg/CpuRuntimeDxe/MpService.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/EmulatorPkg/CpuRuntimeDxe/MpService.c b/EmulatorPkg/CpuRuntimeDxe/MpService.c index 372b9a4..dcc79d3 100644 --- a/EmulatorPkg/CpuRuntimeDxe/MpService.c +++ b/EmulatorPkg/CpuRuntimeDxe/MpService.c @@ -693,6 +693,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 ------------------------------------------------------------------------------ Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration & more Get technology previously reserved for billion-dollar corporations, FREE http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk _______________________________________________ edk2-devel mailing list edk2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-devel