]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Library/BaseTimerLibNullTemplate/TimerLibNull.c
Set PcdPlatformBootTimeOutDefault to 10 to enable test automation.
[mirror_edk2.git] / MdePkg / Library / BaseTimerLibNullTemplate / TimerLibNull.c
CommitLineData
e1f414b6 1/** @file\r
2 A non-functional instance of the Timer Library.\r
3\r
d0b494ed 4 Copyright (c) 2007 - 2008, Intel Corporation<BR>\r
e1f414b6 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
e1f414b6 13**/\r
14\r
c892d846 15\r
c7d265a9 16#include <Base.h>\r
c892d846 17\r
18\r
c7d265a9 19#include <Library/TimerLib.h>\r
20#include <Library/DebugLib.h>\r
e1f414b6 21\r
22/**\r
e1f414b6 23 Stalls the CPU for the number of microseconds specified by MicroSeconds.\r
24\r
25 @param MicroSeconds The minimum number of microseconds to delay.\r
26\r
d0b494ed 27 @return MicroSeconds.\r
e1f414b6 28\r
29**/\r
30UINTN\r
31EFIAPI\r
32MicroSecondDelay (\r
33 IN UINTN MicroSeconds\r
34 )\r
35{\r
36 ASSERT (FALSE);\r
37 return MicroSeconds;\r
38}\r
39\r
40/**\r
e1f414b6 41 Stalls the CPU for the number of nanoseconds specified by NanoSeconds.\r
42\r
43 @param NanoSeconds The minimum number of nanoseconds to delay.\r
44\r
d0b494ed 45 @return NanoSeconds.\r
e1f414b6 46\r
47**/\r
48UINTN\r
49EFIAPI\r
50NanoSecondDelay (\r
51 IN UINTN NanoSeconds\r
52 )\r
53{\r
54 ASSERT (FALSE);\r
55 return 0;\r
56}\r
57\r
58/**\r
e1f414b6 59 Retrieves the current value of a 64-bit free running performance counter. The\r
60 counter can either count up by 1 or count down by 1. If the physical\r
61 performance counter counts by a larger increment, then the counter values\r
62 must be translated. The properties of the counter can be retrieved from\r
63 GetPerformanceCounterProperties().\r
64\r
65 @return The current value of the free running performance counter.\r
66\r
67**/\r
68UINT64\r
69EFIAPI\r
70GetPerformanceCounter (\r
71 VOID\r
72 )\r
73{\r
74 ASSERT (FALSE);\r
75 return 0;\r
76}\r
77\r
78/**\r
79 Retrieves the 64-bit frequency in Hz and the range of performance counter\r
80 values.\r
81\r
82 If StartValue is not NULL, then the value that the performance counter starts\r
83 with immediately after is it rolls over is returned in StartValue. If\r
84 EndValue is not NULL, then the value that the performance counter end with\r
85 immediately before it rolls over is returned in EndValue. The 64-bit\r
86 frequency of the performance counter in Hz is always returned. If StartValue\r
87 is less than EndValue, then the performance counter counts up. If StartValue\r
88 is greater than EndValue, then the performance counter counts down. For\r
89 example, a 64-bit free running counter that counts up would have a StartValue\r
90 of 0 and an EndValue of 0xFFFFFFFFFFFFFFFF. A 24-bit free running counter\r
91 that counts down would have a StartValue of 0xFFFFFF and an EndValue of 0.\r
92\r
93 @param StartValue The value the performance counter starts with when it\r
94 rolls over.\r
95 @param EndValue The value that the performance counter ends with before\r
96 it rolls over.\r
97\r
98 @return The frequency in Hz.\r
99\r
100**/\r
101UINT64\r
102EFIAPI\r
103GetPerformanceCounterProperties (\r
104 OUT UINT64 *StartValue, OPTIONAL\r
105 OUT UINT64 *EndValue OPTIONAL\r
106 )\r
107{\r
108 ASSERT (FALSE);\r
e19c2c4a 109\r
110 return (UINT64)(-1);\r
e1f414b6 111}\r