]> git.proxmox.com Git - mirror_edk2.git/blame - EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Include/Library/EdkIIGlueTimerLib.h
Update the copyright notice format
[mirror_edk2.git] / EdkCompatibilityPkg / Foundation / Library / EdkIIGlueLib / Include / Library / EdkIIGlueTimerLib.h
CommitLineData
3eb9473e 1/*++\r
2\r
2c7e5c2f
HT
3Copyright (c) 2004 - 2006, Intel Corporation. All rights reserved.<BR>\r
4This program and the accompanying materials \r
3eb9473e 5are licensed and made available under the terms and conditions of the BSD License \r
6which accompanies this distribution. The full text of the license may be found at \r
7http://opensource.org/licenses/bsd-license.php \r
8 \r
9THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
10WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
11\r
12\r
13Module Name:\r
14\r
15 EdkIIGlueTimerLib.h\r
16 \r
17Abstract: \r
18\r
19 Public header file for Timer Lib\r
20\r
21--*/\r
22\r
23#ifndef __EDKII_GLUE_TIMER_LIB_H__\r
24#define __EDKII_GLUE_TIMER_LIB_H__\r
25\r
26/**\r
27 Stalls the CPU for at least the given number of microseconds.\r
28\r
29 Stalls the CPU for the number of microseconds specified by MicroSeconds.\r
30\r
31 @param MicroSeconds The minimum number of microseconds to delay.\r
32\r
33 @return MicroSeconds\r
34\r
35**/\r
36UINTN\r
37EFIAPI\r
38MicroSecondDelay (\r
39 IN UINTN MicroSeconds\r
40 );\r
41\r
42/**\r
43 Stalls the CPU for at least the given number of nanoseconds.\r
44\r
45 Stalls the CPU for the number of nanoseconds specified by NanoSeconds.\r
46\r
47 @param NanoSeconds The minimum number of nanoseconds to delay.\r
48\r
49 @return NanoSeconds\r
50\r
51**/\r
52UINTN\r
53EFIAPI\r
54NanoSecondDelay (\r
55 IN UINTN NanoSeconds\r
56 );\r
57\r
58/**\r
59 Retrieves the current value of a 64-bit free running performance counter.\r
60\r
61 Retrieves the current value of a 64-bit free running performance counter. The\r
62 counter can either count up by 1 or count down by 1. If the physical\r
63 performance counter counts by a larger increment, then the counter values\r
64 must be translated. The properties of the counter can be retrieved from\r
65 GetPerformanceCounterProperties().\r
66\r
67 @return The current value of the free running performance counter.\r
68\r
69**/\r
70UINT64\r
71EFIAPI\r
72GetPerformanceCounter (\r
73 VOID\r
74 );\r
75\r
76/**\r
77 Retrieves the 64-bit frequency in Hz and the range of performance counter\r
78 values.\r
79\r
80 If StartValue is not NULL, then the value that the performance counter starts\r
81 with immediately after is it rolls over is returned in StartValue. If\r
82 EndValue is not NULL, then the value that the performance counter end with\r
83 immediately before it rolls over is returned in EndValue. The 64-bit\r
84 frequency of the performance counter in Hz is always returned. If StartValue\r
85 is less than EndValue, then the performance counter counts up. If StartValue\r
86 is greater than EndValue, then the performance counter counts down. For\r
87 example, a 64-bit free running counter that counts up would have a StartValue\r
88 of 0 and an EndValue of 0xFFFFFFFFFFFFFFFF. A 24-bit free running counter\r
89 that counts down would have a StartValue of 0xFFFFFF and an EndValue of 0.\r
90\r
91 @param StartValue The value the performance counter starts with when it\r
92 rolls over.\r
93 @param EndValue The value that the performance counter ends with before\r
94 it rolls over.\r
95\r
96 @return The frequency in Hz.\r
97\r
98**/\r
99UINT64\r
100EFIAPI\r
101GetPerformanceCounterProperties (\r
102 OUT UINT64 *StartValue, OPTIONAL\r
103 OUT UINT64 *EndValue OPTIONAL\r
104 );\r
105\r
106#endif\r