]> git.proxmox.com Git - mirror_edk2.git/blame - MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.h
Update the copyright notice format
[mirror_edk2.git] / MdeModulePkg / Universal / WatchdogTimerDxe / WatchdogTimer.h
CommitLineData
504214c4 1/** @file\r
96437c90 2 The internal include file for WatchDogTimer module. \r
504214c4 3\r
e5eed7d3
HT
4Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>\r
5This program and the accompanying materials \r
de4c8a30 6are licensed and made available under the terms and conditions of the BSD License \r
7which accompanies this distribution. The full text of the license may be found at \r
8http://opensource.org/licenses/bsd-license.php \r
9 \r
10THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
11WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
12\r
504214c4 13**/\r
de4c8a30 14\r
15#ifndef _WATCHDOG_TIMER_H_\r
16#define _WATCHDOG_TIMER_H_\r
17\r
ba237732 18\r
ed7748fe 19\r
60c93673 20#include <Uefi.h>\r
ba237732
A
21#include <Library/DebugLib.h>\r
22#include <Library/UefiDriverEntryPoint.h>\r
23#include <Library/ReportStatusCodeLib.h>\r
24#include <Library/UefiBootServicesTableLib.h>\r
25#include <Library/UefiRuntimeServicesTableLib.h>\r
c0d17d24 26#include <Protocol/WatchdogTimer.h>\r
ba237732
A
27\r
28\r
36093af9 29/**\r
96437c90 30 Registers a handler that is to be invoked when the watchdog timer fires.\r
31\r
36093af9 32 This function registers a handler that is to be invoked when the watchdog\r
33 timer fires. By default, the EFI_WATCHDOG_TIMER protocol will call the\r
34 Runtime Service ResetSystem() when the watchdog timer fires. If a\r
35 NotifyFunction is registered, then the NotifyFunction will be called before\r
36 the Runtime Service ResetSystem() is called. If NotifyFunction is NULL, then\r
37 the watchdog handler is unregistered. If a watchdog handler is registered,\r
38 then EFI_SUCCESS is returned. If an attempt is made to register a handler\r
39 when a handler is already registered, then EFI_ALREADY_STARTED is returned.\r
40 If an attempt is made to uninstall a handler when a handler is not installed,\r
41 then return EFI_INVALID_PARAMETER.\r
42\r
43 @param This The EFI_WATCHDOG_TIMER_ARCH_PROTOCOL instance.\r
44 @param NotifyFunction The function to call when the watchdog timer fires. If this\r
45 is NULL, then the handler will be unregistered.\r
46\r
96437c90 47 @retval EFI_SUCCESS The watchdog timer handler was registered or unregistered.\r
48 @retval EFI_ALREADY_STARTED NotifyFunction is not NULL, and a handler is already registered.\r
49 @retval EFI_INVALID_PARAMETER NotifyFunction is NULL, and a handler was not previously registered.\r
36093af9 50\r
51**/\r
de4c8a30 52EFI_STATUS\r
53EFIAPI\r
54WatchdogTimerDriverRegisterHandler (\r
55 IN EFI_WATCHDOG_TIMER_ARCH_PROTOCOL *This,\r
56 IN EFI_WATCHDOG_TIMER_NOTIFY NotifyFunction\r
ba237732 57 );\r
de4c8a30 58\r
36093af9 59/**\r
96437c90 60 Sets the amount of time in the future to fire the watchdog timer.\r
61\r
36093af9 62 This function sets the amount of time to wait before firing the watchdog\r
96437c90 63 timer to TimerPeriod 100 ns units. If TimerPeriod is 0, then the watchdog\r
36093af9 64 timer is disabled.\r
65\r
66 @param This The EFI_WATCHDOG_TIMER_ARCH_PROTOCOL instance.\r
96437c90 67 @param TimerPeriod The amount of time in 100 ns units to wait before the watchdog\r
36093af9 68 timer is fired. If TimerPeriod is zero, then the watchdog\r
69 timer is disabled.\r
70\r
96437c90 71 @retval EFI_SUCCESS The watchdog timer has been programmed to fire in Time\r
72 100 ns units.\r
73 @retval EFI_DEVICE_ERROR A watchdog timer could not be programmed due to a device\r
36093af9 74 error.\r
75\r
76**/\r
de4c8a30 77EFI_STATUS\r
78EFIAPI\r
79WatchdogTimerDriverSetTimerPeriod (\r
80 IN EFI_WATCHDOG_TIMER_ARCH_PROTOCOL *This,\r
81 IN UINT64 TimerPeriod\r
ba237732 82 );\r
de4c8a30 83\r
36093af9 84/**\r
96437c90 85 Retrieves the amount of time in 100 ns units that the system will wait before firing the watchdog timer.\r
86\r
36093af9 87 This function retrieves the amount of time the system will wait before firing\r
88 the watchdog timer. This period is returned in TimerPeriod, and EFI_SUCCESS\r
89 is returned. If TimerPeriod is NULL, then EFI_INVALID_PARAMETER is returned.\r
90\r
91 @param This The EFI_WATCHDOG_TIMER_ARCH_PROTOCOL instance.\r
96437c90 92 @param TimerPeriod A pointer to the amount of time in 100 ns units that the system\r
36093af9 93 will wait before the watchdog timer is fired. If TimerPeriod of\r
94 zero is returned, then the watchdog timer is disabled.\r
95\r
96437c90 96 @retval EFI_SUCCESS The amount of time that the system will wait before\r
36093af9 97 firing the watchdog timer was returned in TimerPeriod.\r
96437c90 98 @retval EFI_INVALID_PARAMETER TimerPeriod is NULL.\r
36093af9 99\r
100**/\r
de4c8a30 101EFI_STATUS\r
102EFIAPI\r
103WatchdogTimerDriverGetTimerPeriod (\r
104 IN EFI_WATCHDOG_TIMER_ARCH_PROTOCOL *This,\r
105 IN UINT64 *TimerPeriod\r
ba237732 106 );\r
de4c8a30 107\r
de4c8a30 108#endif\r