Reviewed-by: Jordan Justen <[email protected]>

On 2014-11-16 18:51:17, Chen Fan wrote:
> 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 <[email protected]>
> ---
>  EmulatorPkg/CpuRuntimeDxe/MpService.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/EmulatorPkg/CpuRuntimeDxe/MpService.c 
> b/EmulatorPkg/CpuRuntimeDxe/MpService.c
> index f395e7c..8814a49 100644
> --- a/EmulatorPkg/CpuRuntimeDxe/MpService.c
> +++ b/EmulatorPkg/CpuRuntimeDxe/MpService.c
> @@ -691,6 +691,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
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to