3 Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
19 #ifndef __EFI_WATCHDOG_TIMER_DRIVER_PROTOCOL_H__
20 #define __EFI_WATCHDOG_TIMER_DRIVER_PROTOCOL_H__
22 #define EFI_WATCHDOG_TIMER_DRIVER_PROTOCOL_GUID \
23 { 0xd5b06d16, 0x2ea1, 0x4def, 0x98, 0xd0, 0xa0, 0x5d, 0x40, 0x72, 0x84, 0x17 }
25 #define EFI_WATCHDOG_TIMER_NOT_SUPPORTED_PROTOCOL_GUID \
26 { 0xe9e156ac, 0x3203, 0x4572, 0xac, 0xdf, 0x84, 0x4f, 0xdc, 0xdb, 0x6, 0xbf }
29 #include <Guid/HwWatchdogTimerHob.h>
32 // General Purpose Constants
34 #define ICH_INSTAFLUSH_GPIO BIT16 // BIT 16 in GPIO Level 2 is GPIO 48.
35 #define B_INSTAFLUSH BIT4
38 // Other Watchdog timer values
40 #define WDT_COUNTDOWN_VALUE 0x14
41 #define BDS_WDT_COUNTDOWN_VALUE 0x35
44 // Prototypes for the Watchdog Timer Driver Protocol
48 This service begins the Watchdog Timer countdown. If the countdown completes prior to
49 Stop Timer or Restart Timer the system will reset.
53 @retval EFI_SUCCESS Operation completed successfully
54 @retval EFI_DEVICE_ERROR The command was unsuccessful
59 (EFIAPI
*EFI_WATCHDOG_START_TIMER
) (
64 This service resets the Watchdog Timer countdown and should only be called after the
69 @retval EFI_SUCCESS Operation completed successfully
70 @retval EFI_DEVICE_ERROR The command was unsuccessful
75 (EFIAPI
*PEI_WATCHDOG_RESET_TIMER
) (
80 This service restarts the Watchdog Timer countdown and should only be called after the
85 @retval EFI_SUCCESS Operation completed successfully
86 @retval EFI_DEVICE_ERROR The command was unsuccessful
91 (EFIAPI
*EFI_WATCHDOG_RESTART_TIMER
) (
96 This service disables the Watchdog Timer countdown.
100 @retval EFI_SUCCESS Operation completed successfully
101 @retval EFI_DEVICE_ERROR The command was unsuccessful
106 (EFIAPI
*EFI_WATCHDOG_STOP_TIMER
) (
115 (EFIAPI
*EFI_WATCHDOG_CHECK_TIMEOUT
) (
116 OUT HW_WATCHDOG_TIMEOUT
*WatchdogTimeout
122 This service forces a reboot of the system due to a reset of the POWERGOOD_PS,
123 POWERGOOD_CLK, and the BSEL Override
129 This function should not return!
131 EFI_DEVICE_ERROR - The command was unsuccessful and a reboot did not occur
136 (EFIAPI
*EFI_WATCHDOG_FORCE_REBOOT
) (
137 IN BOOLEAN ForceTimeout
,
142 This service notifies the Watchdog Timer of the fact that a known reset is occuring.
144 @param[in] AllowReset TRUE if a Reset is currently expected
145 FALSE if a Reset is not currently expected
147 This function should not return!
149 EFI_DEVICE_ERROR - The command was unsuccessful and a reboot did not occur
154 (EFIAPI
*EFI_WATCHDOG_KNOWN_RESET
) (
155 IN BOOLEAN AllowReset
159 This service reads the current Watchdog Timer countdown reload value.
161 @param[in] CountdownValue pointer to UINT32 to return the value of the reload register.
163 @retval EFI_SUCCESS Operation completed successfully
164 @retval EFI_DEVICE_ERROR The command was unsuccessful
169 (EFIAPI
*EFI_GET_TIMER_COUNT_DOWN_PERIOD
)(
170 OUT UINT32
*CountdownValue
174 This service reads the current Watchdog Timer countdown reload value.
176 @param[in] CountdownValue Value to set the reload register.
178 @retval EFI_SUCCESS Operation completed successfully
179 @retval EFI_DEVICE_ERROR The command was unsuccessful
184 (EFIAPI
*EFI_SET_TIMER_COUNT_DOWN_PERIOD
)(
185 OUT UINT32 CountdownValue
189 This service clears the state that indicates the Watchdog Timer fired.
191 @retval EFI_SUCCESS - Operation completed successfully
192 @retval EFI_DEVICE_ERROR - The command was unsuccessful
197 (EFIAPI
*PEI_WATCHDOG_CLEAR_TIMER_STATE
) (
201 This service disables the Watchdog Timer countdown. It also closes the recurring restart event
204 @param[in] Stall TRUE = Stop the timer countdown
205 FALSE = Start the timer countdown
207 @retval EFI_SUCCESS Operation completed successfully
208 @retval EFI_DEVICE_ERROR The command was unsuccessful
213 (EFIAPI
*EFI_STALL_WATCHDOG_COUNTDOWN
) (
218 typedef struct _EFI_WATCHDOG_TIMER_DRIVER_PROTOCOL
{
219 EFI_WATCHDOG_START_TIMER StartWatchdogTimer
;
220 PEI_WATCHDOG_RESET_TIMER ResetWatchdogTimeout
;
221 EFI_WATCHDOG_RESTART_TIMER RestartWatchdogTimer
;
222 EFI_WATCHDOG_STOP_TIMER StopWatchdogTimer
;
223 EFI_WATCHDOG_CHECK_TIMEOUT CheckWatchdogTimeout
;
224 EFI_WATCHDOG_FORCE_REBOOT ForceReboot
;
225 EFI_WATCHDOG_KNOWN_RESET AllowKnownReset
;
226 EFI_GET_TIMER_COUNT_DOWN_PERIOD GetCountdownPeriod
;
227 EFI_SET_TIMER_COUNT_DOWN_PERIOD SetCountdownPeriod
;
228 PEI_WATCHDOG_CLEAR_TIMER_STATE ClearTimerState
;
229 EFI_STALL_WATCHDOG_COUNTDOWN StallWatchdogCountdown
;
230 } EFI_WATCHDOG_TIMER_DRIVER_PROTOCOL
;
232 extern EFI_GUID gEfiWatchdogTimerDriverProtocolGuid
;
233 extern EFI_GUID gEfiWatchdogTimerNotSupportedProtocolGuid
;