On Fri, 2014-11-14 at 10:46 -0800, Jordan Justen wrote:
> On 2014-11-03 00:17:17, Chen Fan wrote:
> > 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 <[email protected]>
> > ---
> > 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)) {
>
> How about checking Timeout == 0, and using
> Timeout -= MIN (Timeout, gPollInterval)
>
> Otherwise, the timeout might not be as long as requested, right?
You are right. for 2/3, I agree your point. and I sent a V3 patches just
now for them.
Thanks,
Chen
>
> -Jordan
>
> > 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
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/edk2-devel
------------------------------------------------------------------------------
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