TianoCore EDK2 master
Loading...
Searching...
No Matches
WatchdogTimer.h File Reference

Go to the source code of this file.

Data Structures

struct  _EFI_WATCHDOG_TIMER_ARCH_PROTOCOL
 

Macros

#define EFI_WATCHDOG_TIMER_ARCH_PROTOCOL_GUID    { 0x665E3FF5, 0x46CC, 0x11d4, {0x9A, 0x38, 0x00, 0x90, 0x27, 0x3F, 0xC1, 0x4D } }
 

Typedefs

typedef struct _EFI_WATCHDOG_TIMER_ARCH_PROTOCOL EFI_WATCHDOG_TIMER_ARCH_PROTOCOL
 
typedef VOID(EFIAPI * EFI_WATCHDOG_TIMER_NOTIFY) (IN UINT64 Time)
 
typedef EFI_STATUS(EFIAPI * EFI_WATCHDOG_TIMER_REGISTER_HANDLER) (IN EFI_WATCHDOG_TIMER_ARCH_PROTOCOL *This, IN EFI_WATCHDOG_TIMER_NOTIFY NotifyFunction)
 
typedef EFI_STATUS(EFIAPI * EFI_WATCHDOG_TIMER_SET_TIMER_PERIOD) (IN EFI_WATCHDOG_TIMER_ARCH_PROTOCOL *This, IN UINT64 TimerPeriod)
 
typedef EFI_STATUS(EFIAPI * EFI_WATCHDOG_TIMER_GET_TIMER_PERIOD) (IN EFI_WATCHDOG_TIMER_ARCH_PROTOCOL *This, OUT UINT64 *TimerPeriod)
 

Variables

EFI_GUID gEfiWatchdogTimerArchProtocolGuid
 

Detailed Description

Watchdog Timer Architectural Protocol as defined in PI Specification VOLUME 2 DXE

Used to provide system watchdog timer services

Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file WatchdogTimer.h.

Macro Definition Documentation

◆ EFI_WATCHDOG_TIMER_ARCH_PROTOCOL_GUID

#define EFI_WATCHDOG_TIMER_ARCH_PROTOCOL_GUID    { 0x665E3FF5, 0x46CC, 0x11d4, {0x9A, 0x38, 0x00, 0x90, 0x27, 0x3F, 0xC1, 0x4D } }

Global ID for the Watchdog Timer Architectural Protocol

Definition at line 16 of file WatchdogTimer.h.

Typedef Documentation

◆ EFI_WATCHDOG_TIMER_ARCH_PROTOCOL

Declare forward reference for the Timer Architectural Protocol

Definition at line 22 of file WatchdogTimer.h.

◆ EFI_WATCHDOG_TIMER_GET_TIMER_PERIOD

typedef EFI_STATUS(EFIAPI * EFI_WATCHDOG_TIMER_GET_TIMER_PERIOD) (IN EFI_WATCHDOG_TIMER_ARCH_PROTOCOL *This, OUT UINT64 *TimerPeriod)

This function retrieves the amount of time the system will wait before firing the watchdog timer. This period is returned in TimerPeriod, and EFI_SUCCESS is returned. If TimerPeriod is NULL, then EFI_INVALID_PARAMETER is returned.

Parameters
ThisThe EFI_WATCHDOG_TIMER_ARCH_PROTOCOL instance.
TimerPeriodA pointer to the amount of time in 100 nS units that the system will wait before the watchdog timer is fired. If TimerPeriod of zero is returned, then the watchdog timer is disabled.
Return values
EFI_SUCCESSThe amount of time that the system will wait before firing the watchdog timer was returned in TimerPeriod.
EFI_INVALID_PARAMETERTimerPeriod is NULL.

Definition at line 111 of file WatchdogTimer.h.

◆ EFI_WATCHDOG_TIMER_NOTIFY

typedef VOID(EFIAPI * EFI_WATCHDOG_TIMER_NOTIFY) (IN UINT64 Time)

A function of this type is called when the watchdog timer fires if a handler has been registered.

Parameters
TimeThe time in 100 ns units that has passed since the watchdog timer was armed. For the notify function to be called, this must be greater than TimerPeriod.
Returns
None.

Definition at line 36 of file WatchdogTimer.h.

◆ EFI_WATCHDOG_TIMER_REGISTER_HANDLER

typedef EFI_STATUS(EFIAPI * EFI_WATCHDOG_TIMER_REGISTER_HANDLER) (IN EFI_WATCHDOG_TIMER_ARCH_PROTOCOL *This, IN EFI_WATCHDOG_TIMER_NOTIFY NotifyFunction)

This function registers a handler that is to be invoked when the watchdog timer fires. By default, the EFI_WATCHDOG_TIMER protocol will call the Runtime Service ResetSystem() when the watchdog timer fires. If a NotifyFunction is registered, then the NotifyFunction will be called before the Runtime Service ResetSystem() is called. If NotifyFunction is NULL, then the watchdog handler is unregistered. If a watchdog handler is registered, then EFI_SUCCESS is returned. If an attempt is made to register a handler when a handler is already registered, then EFI_ALREADY_STARTED is returned. If an attempt is made to uninstall a handler when a handler is not installed, then return EFI_INVALID_PARAMETER.

Parameters
ThisThe EFI_WATCHDOG_TIMER_ARCH_PROTOCOL instance.
NotifyFunctionThe function to call when the watchdog timer fires. If this is NULL, then the handler will be unregistered.
Return values
EFI_SUCCESSThe watchdog timer handler was registered or unregistered.
EFI_ALREADY_STARTEDNotifyFunction is not NULL, and a handler is already registered.
EFI_INVALID_PARAMETERNotifyFunction is NULL, and a handler was not previously registered.

Definition at line 66 of file WatchdogTimer.h.

◆ EFI_WATCHDOG_TIMER_SET_TIMER_PERIOD

typedef EFI_STATUS(EFIAPI * EFI_WATCHDOG_TIMER_SET_TIMER_PERIOD) (IN EFI_WATCHDOG_TIMER_ARCH_PROTOCOL *This, IN UINT64 TimerPeriod)

This function sets the amount of time to wait before firing the watchdog timer to TimerPeriod 100 nS units. If TimerPeriod is 0, then the watchdog timer is disabled.

Parameters
ThisThe EFI_WATCHDOG_TIMER_ARCH_PROTOCOL instance.
TimerPeriodThe amount of time in 100 nS units to wait before the watchdog timer is fired. If TimerPeriod is zero, then the watchdog timer is disabled.
Return values
EFI_SUCCESSThe watchdog timer has been programmed to fire in Time 100 nS units.
EFI_DEVICE_ERRORA watchdog timer could not be programmed due to a device error.

Definition at line 89 of file WatchdogTimer.h.