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