summaryrefslogtreecommitdiffstats
path: root/EmulatorPkg
diff options
context:
space:
mode:
authorDeric Cole <deric.cole@intel.com>2023-02-08 08:41:03 -0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2023-02-09 02:04:37 +0000
commitf6ce1a5cd8932844ec24701d158254ccf75b6159 (patch)
tree3cd1767baa68e7c538b0bc1f56dae6f5e985b613 /EmulatorPkg
parentb59e6fdae2545b45c36c8c5373f4b858fb83c8cd (diff)
downloadedk2-f6ce1a5cd8932844ec24701d158254ccf75b6159.tar.gz
edk2-f6ce1a5cd8932844ec24701d158254ccf75b6159.tar.bz2
edk2-f6ce1a5cd8932844ec24701d158254ccf75b6159.zip
EmulatorPkg/PeiTimerLib: Bug fix in NanoSecondDelay
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> Reviewed-by: Ray Ni <ray.ni@intel.com>
Diffstat (limited to 'EmulatorPkg')
-rw-r--r--EmulatorPkg/Include/Protocol/EmuThunk.h2
-rw-r--r--EmulatorPkg/Library/PeiTimerLib/PeiTimerLib.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/EmulatorPkg/Include/Protocol/EmuThunk.h b/EmulatorPkg/Include/Protocol/EmuThunk.h
index b720023ac9..c419d0a677 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 8c4f20f42b..5344719f98 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;
}