[edk2-devel] [Patch 1/1] EmulatorPkg/PeiTimerLib: Bug fix in NanoSecondDelay

Ni, Ray ray.ni at intel.com
Thu Feb 9 01:02:28 UTC 2023


Reviewed-by: Ray Ni <ray.ni at intel.com>

> -----Original Message-----
> From: Kinney, Michael D <michael.d.kinney at intel.com>
> Sent: Thursday, February 9, 2023 7:17 AM
> To: devel at edk2.groups.io; Kinney, Michael D <michael.d.kinney at intel.com>;
> Gao, Liming <gaoliming at byosoft.com.cn>
> Cc: Cole, Deric <deric.cole at intel.com>; Andrew Fish <afish at apple.com>; Ni,
> Ray <ray.ni at intel.com>; Kinney, Michael D <michael.d.kinney at intel.com>
> Subject: RE: [edk2-devel] [Patch 1/1] EmulatorPkg/PeiTimerLib: Bug fix in
> NanoSecondDelay
> 
> Hi Liming,
> 
> This is a significant behavior bug in EmulatorPkg PeiTimerLib that was
> discovered during the soft freeze evaluation period.
> 
> I would like to request this patch be included in the edk2-stable202302 release.
> 
> Thanks,
> 
> Mike
> 
> 
> > -----Original Message-----
> > From: devel at edk2.groups.io <devel at edk2.groups.io> On Behalf Of Michael D
> Kinney
> > Sent: Wednesday, February 8, 2023 3:10 PM
> > To: devel at edk2.groups.io
> > Cc: Cole, Deric <deric.cole at intel.com>; Andrew Fish <afish at apple.com>; Ni,
> Ray <ray.ni at intel.com>
> > Subject: [edk2-devel] [Patch 1/1] EmulatorPkg/PeiTimerLib: Bug fix in
> NanoSecondDelay
> >
> > From: Deric Cole <deric.cole at intel.com>
> >
> > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4339
> >
> > Thunk->Sleep is expecting nanoseconds, no need to multiply by 100.
> >
> > Cc: Andrew Fish <afish at apple.com>
> > Cc: Ray Ni <ray.ni at intel.com>
> > Signed-off-by: Deric Cole <deric.cole at intel.com>
> > Reviewed-by: Michael D Kinney <michael.d.kinney at intel.com>
> > ---
> >  EmulatorPkg/Include/Protocol/EmuThunk.h       | 2 +-
> >  EmulatorPkg/Library/PeiTimerLib/PeiTimerLib.c | 4 ++--
> >  2 files changed, 3 insertions(+), 3 deletions(-)
> >
> > diff --git a/EmulatorPkg/Include/Protocol/EmuThunk.h
> b/EmulatorPkg/Include/Protocol/EmuThunk.h
> > index b720023ac9c7..c419d0a67790 100644
> > --- a/EmulatorPkg/Include/Protocol/EmuThunk.h
> > +++ b/EmulatorPkg/Include/Protocol/EmuThunk.h
> > @@ -130,7 +130,7 @@ UINT64
> >  typedef
> >  VOID
> >  (EFIAPI *EMU_SLEEP)(
> > -  IN  UINT64    Milliseconds
> > +  IN  UINT64    Nanoseconds
> >    );
> >
> >  typedef
> > diff --git a/EmulatorPkg/Library/PeiTimerLib/PeiTimerLib.c
> b/EmulatorPkg/Library/PeiTimerLib/PeiTimerLib.c
> > index 8c4f20f42b47..5344719f98d8 100644
> > --- a/EmulatorPkg/Library/PeiTimerLib/PeiTimerLib.c
> > +++ b/EmulatorPkg/Library/PeiTimerLib/PeiTimerLib.c
> > @@ -1,7 +1,7 @@
> >  /** @file
> >    A non-functional instance of the Timer Library.
> >
> > -  Copyright (c) 2007 - 2019, Intel Corporation. All rights reserved.<BR>
> > +  Copyright (c) 2007 - 2023, Intel Corporation. All rights reserved.<BR>
> >    SPDX-License-Identifier: BSD-2-Clause-Patent
> >
> >  **/
> > @@ -65,7 +65,7 @@ NanoSecondDelay (
> >               );
> >    if (!EFI_ERROR (Status)) {
> >      Thunk = (EMU_THUNK_PROTOCOL *)ThunkPpi->Thunk ();
> > -    Thunk->Sleep (NanoSeconds * 100);
> > +    Thunk->Sleep (NanoSeconds);
> >      return NanoSeconds;
> >    }
> >
> > --
> > 2.37.1.windows.1
> >
> >
> >
> > 
> >



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#99829): https://edk2.groups.io/g/devel/message/99829
Mute This Topic: https://groups.io/mt/96842440/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/leave/3943202/1813853/130120423/xyzzy [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-




More information about the edk2-devel-archive mailing list