]> git.proxmox.com Git - mirror_edk2.git/blame - Vlv2TbltDevicePkg/Include/Protocol/HwWatchdogTimer.h
UefiCpuPkg: Fix comment typo for MtrrLibApplyFixedMtrrs function
[mirror_edk2.git] / Vlv2TbltDevicePkg / Include / Protocol / HwWatchdogTimer.h
CommitLineData
3cbfba02
DW
1/*++\r
2\r
3 Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>\r
4 \r\r
5 This program and the accompanying materials are licensed and made available under\r\r
6 the terms and conditions of the BSD License that accompanies this distribution. \r\r
7 The full text of the license may be found at \r\r
8 http://opensource.org/licenses/bsd-license.php. \r\r
9 \r\r
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r\r
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r\r
12 \r\r
13\r
14\r
15Module Name:\r
16\r
17 HwWatchdogTimer.h\r
18\r
19Abstract:\r
20\r
21\r
22--*/\r
23\r
24#ifndef __EFI_WATCHDOG_TIMER_DRIVER_PROTOCOL_H__\r
25#define __EFI_WATCHDOG_TIMER_DRIVER_PROTOCOL_H__\r
26\r
27#define EFI_WATCHDOG_TIMER_DRIVER_PROTOCOL_GUID \\r
28 { 0xd5b06d16, 0x2ea1, 0x4def, 0x98, 0xd0, 0xa0, 0x5d, 0x40, 0x72, 0x84, 0x17 }\r
29\r
30#define EFI_WATCHDOG_TIMER_NOT_SUPPORTED_PROTOCOL_GUID \\r
31 { 0xe9e156ac, 0x3203, 0x4572, 0xac, 0xdf, 0x84, 0x4f, 0xdc, 0xdb, 0x6, 0xbf }\r
32\r
33\r
34#include <Guid/HwWatchdogTimerHob.h>\r
35\r
36//\r
37// General Purpose Constants\r
38//\r
39#define ICH_INSTAFLUSH_GPIO BIT16 // BIT 16 in GPIO Level 2 is GPIO 48.\r
40#define B_INSTAFLUSH BIT4\r
41\r
42//\r
43// Other Watchdog timer values\r
44//\r
45#define WDT_COUNTDOWN_VALUE 0x14\r
46#define BDS_WDT_COUNTDOWN_VALUE 0x35\r
47\r
48//\r
49// Prototypes for the Watchdog Timer Driver Protocol\r
50//\r
51\r
52/**\r
53 This service begins the Watchdog Timer countdown. If the countdown completes prior to\r
54 Stop Timer or Restart Timer the system will reset.\r
55\r
56 @param[in] None\r
57\r
58 @retval EFI_SUCCESS Operation completed successfully\r
59 @retval EFI_DEVICE_ERROR The command was unsuccessful\r
60\r
61**/\r
62typedef\r
63EFI_STATUS\r
64(EFIAPI *EFI_WATCHDOG_START_TIMER) (\r
65 VOID\r
66 );\r
67\r
68/**\r
69 This service resets the Watchdog Timer countdown and should only be called after the\r
70 Start Timer function.\r
71\r
72 @param[in] None\r
73\r
74 @retval EFI_SUCCESS Operation completed successfully\r
75 @retval EFI_DEVICE_ERROR The command was unsuccessful\r
76\r
77**/\r
78typedef\r
79EFI_STATUS\r
80(EFIAPI *PEI_WATCHDOG_RESET_TIMER) (\r
81 VOID\r
82 );\r
83\r
84/**\r
85 This service restarts the Watchdog Timer countdown and should only be called after the\r
86 Start Timer function.\r
87\r
88 @param[in] None\r
89\r
90 @retval EFI_SUCCESS Operation completed successfully\r
91 @retval EFI_DEVICE_ERROR The command was unsuccessful\r
92\r
93**/\r
94typedef\r
95EFI_STATUS\r
96(EFIAPI *EFI_WATCHDOG_RESTART_TIMER) (\r
97 VOID\r
98 );\r
99\r
100/**\r
101 This service disables the Watchdog Timer countdown.\r
102\r
103 @param[in] None\r
104\r
105 @retval EFI_SUCCESS Operation completed successfully\r
106 @retval EFI_DEVICE_ERROR The command was unsuccessful\r
107\r
108**/\r
109typedef\r
110EFI_STATUS\r
111(EFIAPI *EFI_WATCHDOG_STOP_TIMER) (\r
112 VOID\r
113 );\r
114\r
115/**\r
116\r
117**/\r
118typedef\r
119EFI_STATUS\r
120(EFIAPI *EFI_WATCHDOG_CHECK_TIMEOUT) (\r
121 OUT HW_WATCHDOG_TIMEOUT *WatchdogTimeout\r
122 );\r
123\r
124\r
125\r
126/**\r
127 This service forces a reboot of the system due to a reset of the POWERGOOD_PS,\r
128 POWERGOOD_CLK, and the BSEL Override\r
129\r
130 Arguments:\r
131 None\r
132\r
133 Returns:\r
134 This function should not return!\r
135\r
136 EFI_DEVICE_ERROR - The command was unsuccessful and a reboot did not occur\r
137\r
138**/\r
139typedef\r
140EFI_STATUS\r
141(EFIAPI *EFI_WATCHDOG_FORCE_REBOOT) (\r
142 IN BOOLEAN ForceTimeout,\r
143 IN UINT8 ResetType\r
144 );\r
145\r
146/**\r
147 This service notifies the Watchdog Timer of the fact that a known reset is occuring.\r
148\r
149 @param[in] AllowReset TRUE if a Reset is currently expected\r
150 FALSE if a Reset is not currently expected\r
151\r
152 This function should not return!\r
153\r
154 EFI_DEVICE_ERROR - The command was unsuccessful and a reboot did not occur\r
155\r
156**/\r
157typedef\r
158EFI_STATUS\r
159(EFIAPI *EFI_WATCHDOG_KNOWN_RESET) (\r
160 IN BOOLEAN AllowReset\r
161 );\r
162\r
163/**\r
164 This service reads the current Watchdog Timer countdown reload value.\r
165\r
166 @param[in] CountdownValue pointer to UINT32 to return the value of the reload register.\r
167\r
168 @retval EFI_SUCCESS Operation completed successfully\r
169 @retval EFI_DEVICE_ERROR The command was unsuccessful\r
170\r
171**/\r
172typedef\r
173EFI_STATUS\r
174(EFIAPI *EFI_GET_TIMER_COUNT_DOWN_PERIOD)(\r
175 OUT UINT32 *CountdownValue\r
176 );\r
177\r
178/**\r
179 This service reads the current Watchdog Timer countdown reload value.\r
180\r
181 @param[in] CountdownValue Value to set the reload register.\r
182\r
183 @retval EFI_SUCCESS Operation completed successfully\r
184 @retval EFI_DEVICE_ERROR The command was unsuccessful\r
185\r
186**/\r
187typedef\r
188EFI_STATUS\r
189(EFIAPI *EFI_SET_TIMER_COUNT_DOWN_PERIOD)(\r
190 OUT UINT32 CountdownValue\r
191 );\r
192\r
193/**\r
194 This service clears the state that indicates the Watchdog Timer fired.\r
195\r
196 @retval EFI_SUCCESS - Operation completed successfully\r
197 @retval EFI_DEVICE_ERROR - The command was unsuccessful\r
198\r
199**/\r
200typedef\r
201EFI_STATUS\r
202(EFIAPI *PEI_WATCHDOG_CLEAR_TIMER_STATE) (\r
203 );\r
204\r
205/**\r
206 This service disables the Watchdog Timer countdown. It also closes the recurring restart event\r
207 if the event exists.\r
208\r
209 @param[in] Stall TRUE = Stop the timer countdown\r
210 FALSE = Start the timer countdown\r
211\r
212 @retval EFI_SUCCESS Operation completed successfully\r
213 @retval EFI_DEVICE_ERROR The command was unsuccessful\r
214\r
215**/\r
216typedef\r
217EFI_STATUS\r
218(EFIAPI *EFI_STALL_WATCHDOG_COUNTDOWN) (\r
219 IN BOOLEAN Stall\r
220 );\r
221\r
222\r
223typedef struct _EFI_WATCHDOG_TIMER_DRIVER_PROTOCOL {\r
224 EFI_WATCHDOG_START_TIMER StartWatchdogTimer;\r
225 PEI_WATCHDOG_RESET_TIMER ResetWatchdogTimeout;\r
226 EFI_WATCHDOG_RESTART_TIMER RestartWatchdogTimer;\r
227 EFI_WATCHDOG_STOP_TIMER StopWatchdogTimer;\r
228 EFI_WATCHDOG_CHECK_TIMEOUT CheckWatchdogTimeout;\r
229 EFI_WATCHDOG_FORCE_REBOOT ForceReboot;\r
230 EFI_WATCHDOG_KNOWN_RESET AllowKnownReset;\r
231 EFI_GET_TIMER_COUNT_DOWN_PERIOD GetCountdownPeriod;\r
232 EFI_SET_TIMER_COUNT_DOWN_PERIOD SetCountdownPeriod;\r
233 PEI_WATCHDOG_CLEAR_TIMER_STATE ClearTimerState;\r
234 EFI_STALL_WATCHDOG_COUNTDOWN StallWatchdogCountdown;\r
235} EFI_WATCHDOG_TIMER_DRIVER_PROTOCOL;\r
236\r
237extern EFI_GUID gEfiWatchdogTimerDriverProtocolGuid;\r
238extern EFI_GUID gEfiWatchdogTimerNotSupportedProtocolGuid;\r
239\r
240#endif\r