summaryrefslogtreecommitdiffstats
path: root/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseLib/Ia32/ReadTsc.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseLib/Ia32/ReadTsc.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseLib/Ia32/ReadTsc.c b/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseLib/Ia32/ReadTsc.c
new file mode 100644
index 00000000..ae8649fe
--- /dev/null
+++ b/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseLib/Ia32/ReadTsc.c
@@ -0,0 +1,31 @@
+/** @file
+ AsmReadTsc function
+
+ Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
+ SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+
+
+
+/**
+ Reads the current value of Time Stamp Counter (TSC).
+
+ Reads and returns the current value of TSC. This function is only available
+ on IA-32 and x64.
+
+ @return The current value of TSC
+
+**/
+UINT64
+EFIAPI
+AsmReadTsc (
+ VOID
+ )
+{
+ _asm {
+ rdtsc
+ }
+}
+