public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [Patch 1/1] EmulatorPkg/PeiTimerLib: Bug fix in NanoSecondDelay
@ 2023-02-08 23:09 Michael D Kinney
  2023-02-08 23:17 ` [edk2-devel] " Michael D Kinney
  0 siblings, 1 reply; 5+ messages in thread
From: Michael D Kinney @ 2023-02-08 23:09 UTC (permalink / raw)
  To: devel; +Cc: Deric Cole, Andrew Fish, Ray Ni

From: Deric Cole <deric.cole@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@apple.com>
Cc: Ray Ni <ray.ni@intel.com>
Signed-off-by: Deric Cole <deric.cole@intel.com>
Reviewed-by: Michael D Kinney <michael.d.kinney@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


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [edk2-devel] [Patch 1/1] EmulatorPkg/PeiTimerLib: Bug fix in NanoSecondDelay
  2023-02-08 23:09 [Patch 1/1] EmulatorPkg/PeiTimerLib: Bug fix in NanoSecondDelay Michael D Kinney
@ 2023-02-08 23:17 ` Michael D Kinney
  2023-02-09  1:02   ` Ni, Ray
  2023-02-09  1:07   ` 回复: " gaoliming
  0 siblings, 2 replies; 5+ messages in thread
From: Michael D Kinney @ 2023-02-08 23:17 UTC (permalink / raw)
  To: devel@edk2.groups.io, Kinney, Michael D, Gao, Liming
  Cc: Cole, Deric, Andrew Fish, Ni, Ray, Kinney, Michael D

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@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Michael D Kinney
> Sent: Wednesday, February 8, 2023 3:10 PM
> To: devel@edk2.groups.io
> Cc: Cole, Deric <deric.cole@intel.com>; Andrew Fish <afish@apple.com>; Ni, Ray <ray.ni@intel.com>
> Subject: [edk2-devel] [Patch 1/1] EmulatorPkg/PeiTimerLib: Bug fix in NanoSecondDelay
> 
> From: Deric Cole <deric.cole@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@apple.com>
> Cc: Ray Ni <ray.ni@intel.com>
> Signed-off-by: Deric Cole <deric.cole@intel.com>
> Reviewed-by: Michael D Kinney <michael.d.kinney@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
> 
> 
> 
> 
> 


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [edk2-devel] [Patch 1/1] EmulatorPkg/PeiTimerLib: Bug fix in NanoSecondDelay
  2023-02-08 23:17 ` [edk2-devel] " Michael D Kinney
@ 2023-02-09  1:02   ` Ni, Ray
  2023-02-09  1:07   ` 回复: " gaoliming
  1 sibling, 0 replies; 5+ messages in thread
From: Ni, Ray @ 2023-02-09  1:02 UTC (permalink / raw)
  To: Kinney, Michael D, devel@edk2.groups.io, Gao, Liming
  Cc: Cole, Deric, Andrew Fish

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

> -----Original Message-----
> From: Kinney, Michael D <michael.d.kinney@intel.com>
> Sent: Thursday, February 9, 2023 7:17 AM
> To: devel@edk2.groups.io; Kinney, Michael D <michael.d.kinney@intel.com>;
> Gao, Liming <gaoliming@byosoft.com.cn>
> Cc: Cole, Deric <deric.cole@intel.com>; Andrew Fish <afish@apple.com>; Ni,
> Ray <ray.ni@intel.com>; Kinney, Michael D <michael.d.kinney@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@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Michael D
> Kinney
> > Sent: Wednesday, February 8, 2023 3:10 PM
> > To: devel@edk2.groups.io
> > Cc: Cole, Deric <deric.cole@intel.com>; Andrew Fish <afish@apple.com>; Ni,
> Ray <ray.ni@intel.com>
> > Subject: [edk2-devel] [Patch 1/1] EmulatorPkg/PeiTimerLib: Bug fix in
> NanoSecondDelay
> >
> > From: Deric Cole <deric.cole@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@apple.com>
> > Cc: Ray Ni <ray.ni@intel.com>
> > Signed-off-by: Deric Cole <deric.cole@intel.com>
> > Reviewed-by: Michael D Kinney <michael.d.kinney@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
> >
> >
> >
> > 
> >


^ permalink raw reply	[flat|nested] 5+ messages in thread

* 回复: [edk2-devel] [Patch 1/1] EmulatorPkg/PeiTimerLib: Bug fix in NanoSecondDelay
  2023-02-08 23:17 ` [edk2-devel] " Michael D Kinney
  2023-02-09  1:02   ` Ni, Ray
@ 2023-02-09  1:07   ` gaoliming
  2023-02-09  1:20     ` Michael D Kinney
  1 sibling, 1 reply; 5+ messages in thread
From: gaoliming @ 2023-02-09  1:07 UTC (permalink / raw)
  To: 'Kinney, Michael D', devel
  Cc: 'Cole, Deric', 'Andrew Fish', 'Ni, Ray'

Mike:
  This fix is OK to me. I am OK to merge it for this stable tag. 

Thanks
Liming
> -----邮件原件-----
> 发件人: Kinney, Michael D <michael.d.kinney@intel.com>
> 发送时间: 2023年2月9日 7:17
> 收件人: devel@edk2.groups.io; Kinney, Michael D
> <michael.d.kinney@intel.com>; Gao, Liming <gaoliming@byosoft.com.cn>
> 抄送: Cole, Deric <deric.cole@intel.com>; Andrew Fish <afish@apple.com>;
> Ni, Ray <ray.ni@intel.com>; Kinney, Michael D <michael.d.kinney@intel.com>
> 主题: 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@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Michael
> D Kinney
> > Sent: Wednesday, February 8, 2023 3:10 PM
> > To: devel@edk2.groups.io
> > Cc: Cole, Deric <deric.cole@intel.com>; Andrew Fish <afish@apple.com>;
> Ni, Ray <ray.ni@intel.com>
> > Subject: [edk2-devel] [Patch 1/1] EmulatorPkg/PeiTimerLib: Bug fix in
> NanoSecondDelay
> >
> > From: Deric Cole <deric.cole@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@apple.com>
> > Cc: Ray Ni <ray.ni@intel.com>
> > Signed-off-by: Deric Cole <deric.cole@intel.com>
> > Reviewed-by: Michael D Kinney <michael.d.kinney@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
> >
> >
> >
> > 
> >




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [edk2-devel] [Patch 1/1] EmulatorPkg/PeiTimerLib: Bug fix in NanoSecondDelay
  2023-02-09  1:07   ` 回复: " gaoliming
@ 2023-02-09  1:20     ` Michael D Kinney
  0 siblings, 0 replies; 5+ messages in thread
From: Michael D Kinney @ 2023-02-09  1:20 UTC (permalink / raw)
  To: devel@edk2.groups.io, Gao, Liming
  Cc: Cole, Deric, 'Andrew Fish', Ni, Ray, Kinney, Michael D

Thank you Liming.  Ray has completed the review and I have pushed the PR branch
with the Rb.  I will add push label after CI passes.

Mike





> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of gaoliming via groups.io
> Sent: Wednesday, February 8, 2023 5:07 PM
> To: Kinney, Michael D <michael.d.kinney@intel.com>; devel@edk2.groups.io
> Cc: Cole, Deric <deric.cole@intel.com>; 'Andrew Fish' <afish@apple.com>; Ni, Ray <ray.ni@intel.com>
> Subject: 回复: [edk2-devel] [Patch 1/1] EmulatorPkg/PeiTimerLib: Bug fix in NanoSecondDelay
> 
> Mike:
>   This fix is OK to me. I am OK to merge it for this stable tag.
> 
> Thanks
> Liming
> > -----邮件原件-----
> > 发件人: Kinney, Michael D <michael.d.kinney@intel.com>
> > 发送时间: 2023年2月9日 7:17
> > 收件人: devel@edk2.groups.io; Kinney, Michael D
> > <michael.d.kinney@intel.com>; Gao, Liming <gaoliming@byosoft.com.cn>
> > 抄送: Cole, Deric <deric.cole@intel.com>; Andrew Fish <afish@apple.com>;
> > Ni, Ray <ray.ni@intel.com>; Kinney, Michael D <michael.d.kinney@intel.com>
> > 主题: 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@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Michael
> > D Kinney
> > > Sent: Wednesday, February 8, 2023 3:10 PM
> > > To: devel@edk2.groups.io
> > > Cc: Cole, Deric <deric.cole@intel.com>; Andrew Fish <afish@apple.com>;
> > Ni, Ray <ray.ni@intel.com>
> > > Subject: [edk2-devel] [Patch 1/1] EmulatorPkg/PeiTimerLib: Bug fix in
> > NanoSecondDelay
> > >
> > > From: Deric Cole <deric.cole@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@apple.com>
> > > Cc: Ray Ni <ray.ni@intel.com>
> > > Signed-off-by: Deric Cole <deric.cole@intel.com>
> > > Reviewed-by: Michael D Kinney <michael.d.kinney@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
> > >
> > >
> > >
> > >
> > >
> 
> 
> 
> 
> 
> 
> 


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-02-09  1:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-08 23:09 [Patch 1/1] EmulatorPkg/PeiTimerLib: Bug fix in NanoSecondDelay Michael D Kinney
2023-02-08 23:17 ` [edk2-devel] " Michael D Kinney
2023-02-09  1:02   ` Ni, Ray
2023-02-09  1:07   ` 回复: " gaoliming
2023-02-09  1:20     ` Michael D Kinney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox