]>
Commit | Line | Data |
---|---|---|
6ae81428 | 1 | /**@file\r |
e331c50d | 2 | \r |
3 | Copyright (c) 2006, Intel Corporation \r | |
4 | All rights reserved. This program and the accompanying materials \r | |
5 | are licensed and made available under the terms and conditions of the BSD License \r | |
6 | which accompanies this distribution. The full text of the license may be found at \r | |
7 | http://opensource.org/licenses/bsd-license.php \r | |
8 | \r | |
9 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r | |
10 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r | |
11 | \r | |
12 | Module Name:\r | |
13 | \r | |
14 | Timer.h\r | |
15 | \r | |
16 | Abstract:\r | |
17 | \r | |
18 | NT Emulation Architectural Protocol Driver as defined in Tiano.\r | |
19 | This Timer module uses an NT Thread to simulate the timer-tick driven\r | |
20 | timer service.\r | |
21 | \r | |
6ae81428 | 22 | **/\r |
e331c50d | 23 | \r |
24 | #ifndef _TIMER_H_\r | |
25 | #define _TIMER_H_\r | |
26 | \r | |
27 | \r | |
60c93673 | 28 | #include <Uefi.h>\r |
f2569572 A |
29 | #include <WinNtDxe.h>\r |
30 | #include <Protocol/Timer.h>\r | |
31 | #include <Protocol/Cpu.h>\r | |
32 | #include <Library/DebugLib.h>\r | |
33 | #include <Library/UefiDriverEntryPoint.h>\r | |
34 | #include <Library/WinNtLib.h>\r | |
35 | #include <Library/UefiBootServicesTableLib.h>\r | |
e331c50d | 36 | \r |
37 | \r | |
e331c50d | 38 | //\r |
39 | // Legal timer value range in 100 ns units\r | |
40 | //\r | |
41 | #define TIMER_MINIMUM_VALUE 0\r | |
42 | #define TIMER_MAXIMUM_VALUE (0x100000000 - 1)\r | |
43 | \r | |
44 | //\r | |
45 | // Default timer value in 100 ns units (10 ms)\r | |
46 | //\r | |
47 | #define DEFAULT_TIMER_TICK_DURATION 100000\r | |
48 | \r | |
49 | //\r | |
50 | // Function Prototypes\r | |
51 | //\r | |
52 | EFI_STATUS\r | |
53 | EFIAPI\r | |
54 | WinNtTimerDriverInitialize (\r | |
55 | IN EFI_HANDLE ImageHandle,\r | |
56 | IN EFI_SYSTEM_TABLE *SystemTable\r | |
57 | )\r | |
58 | /*++\r | |
59 | \r | |
60 | Routine Description:\r | |
61 | \r | |
62 | TODO: Add function description\r | |
63 | \r | |
64 | Arguments:\r | |
65 | \r | |
66 | ImageHandle - TODO: add argument description\r | |
67 | SystemTable - TODO: add argument description\r | |
68 | \r | |
69 | Returns:\r | |
70 | \r | |
71 | TODO: add return values\r | |
72 | \r | |
73 | --*/\r | |
74 | ;\r | |
75 | \r | |
76 | EFI_STATUS\r | |
77 | EFIAPI\r | |
78 | WinNtTimerDriverRegisterHandler (\r | |
79 | IN EFI_TIMER_ARCH_PROTOCOL *This,\r | |
80 | IN EFI_TIMER_NOTIFY NotifyFunction\r | |
81 | )\r | |
82 | /*++\r | |
83 | \r | |
84 | Routine Description:\r | |
85 | \r | |
86 | TODO: Add function description\r | |
87 | \r | |
88 | Arguments:\r | |
89 | \r | |
90 | This - TODO: add argument description\r | |
91 | NotifyFunction - TODO: add argument description\r | |
92 | \r | |
93 | Returns:\r | |
94 | \r | |
95 | TODO: add return values\r | |
96 | \r | |
97 | --*/\r | |
98 | ;\r | |
99 | \r | |
100 | EFI_STATUS\r | |
101 | EFIAPI\r | |
102 | WinNtTimerDriverSetTimerPeriod (\r | |
103 | IN EFI_TIMER_ARCH_PROTOCOL *This,\r | |
104 | IN UINT64 TimerPeriod\r | |
105 | )\r | |
106 | /*++\r | |
107 | \r | |
108 | Routine Description:\r | |
109 | \r | |
110 | TODO: Add function description\r | |
111 | \r | |
112 | Arguments:\r | |
113 | \r | |
114 | This - TODO: add argument description\r | |
115 | TimerPeriod - TODO: add argument description\r | |
116 | \r | |
117 | Returns:\r | |
118 | \r | |
119 | TODO: add return values\r | |
120 | \r | |
121 | --*/\r | |
122 | ;\r | |
123 | \r | |
124 | EFI_STATUS\r | |
125 | EFIAPI\r | |
126 | WinNtTimerDriverGetTimerPeriod (\r | |
127 | IN EFI_TIMER_ARCH_PROTOCOL *This,\r | |
128 | OUT UINT64 *TimerPeriod\r | |
129 | )\r | |
130 | /*++\r | |
131 | \r | |
132 | Routine Description:\r | |
133 | \r | |
134 | TODO: Add function description\r | |
135 | \r | |
136 | Arguments:\r | |
137 | \r | |
138 | This - TODO: add argument description\r | |
139 | TimerPeriod - TODO: add argument description\r | |
140 | \r | |
141 | Returns:\r | |
142 | \r | |
143 | TODO: add return values\r | |
144 | \r | |
145 | --*/\r | |
146 | ;\r | |
147 | \r | |
148 | EFI_STATUS\r | |
149 | EFIAPI\r | |
150 | WinNtTimerDriverGenerateSoftInterrupt (\r | |
151 | IN EFI_TIMER_ARCH_PROTOCOL *This\r | |
152 | )\r | |
153 | /*++\r | |
154 | \r | |
155 | Routine Description:\r | |
156 | \r | |
157 | TODO: Add function description\r | |
158 | \r | |
159 | Arguments:\r | |
160 | \r | |
161 | This - TODO: add argument description\r | |
162 | \r | |
163 | Returns:\r | |
164 | \r | |
165 | TODO: add return values\r | |
166 | \r | |
167 | --*/\r | |
168 | ;\r | |
169 | \r | |
170 | #endif\r |