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