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