Because TimeoutInMicrosecsond is a unsigned value, converting it to signed value will cause the data region changed. so this patch fix that.
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Chen Fan <chen.fan.f...@cn.fujitsu.com> --- EmulatorPkg/CpuRuntimeDxe/MpService.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/EmulatorPkg/CpuRuntimeDxe/MpService.c b/EmulatorPkg/CpuRuntimeDxe/MpService.c index d6dd984..dbeeaf5 100644 --- a/EmulatorPkg/CpuRuntimeDxe/MpService.c +++ b/EmulatorPkg/CpuRuntimeDxe/MpService.c @@ -378,7 +378,7 @@ CpuMpServicesStartupAllAps ( UINTN NextNumber; PROCESSOR_STATE APInitialState; PROCESSOR_STATE ProcessorState; - INTN Timeout; + UINTN Timeout; if (!IsBSP ()) { @@ -540,7 +540,7 @@ CpuMpServicesStartupAllAps ( goto Done; } - if ((TimeoutInMicroseconds != 0) && (Timeout < 0)) { + if ((TimeoutInMicroseconds != 0) && (Timeout < gPollInterval)) { Status = EFI_TIMEOUT; goto Done; } @@ -659,7 +659,7 @@ CpuMpServicesStartupThisAP ( OUT BOOLEAN *Finished OPTIONAL ) { - INTN Timeout; + UINTN Timeout; if (!IsBSP ()) { return EFI_DEVICE_ERROR; @@ -717,7 +717,7 @@ CpuMpServicesStartupThisAP ( gThread->MutexUnlock (gMPSystem.ProcessorData[ProcessorNumber].StateLock); - if ((TimeoutInMicroseconds != 0) && (Timeout < 0)) { + if ((TimeoutInMicroseconds != 0) && (Timeout < gPollInterval)) { return EFI_TIMEOUT; } @@ -1040,7 +1040,7 @@ CpuCheckAllAPsStatus ( } } - if (gMPSystem.TimeoutActive && gMPSystem.Timeout < 0) { + if (gMPSystem.TimeoutActive && gMPSystem.Timeout < gPollInterval) { // // Timeout // -- 1.9.3 ------------------------------------------------------------------------------ _______________________________________________ edk2-devel mailing list edk2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-devel