2 Provides the parent dispatch service for the periodical timer SMI source generator.
4 Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
5 This program and the accompanying materials are licensed and made available under
6 the terms and conditions of the BSD License that accompanies this distribution.
7 The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php.
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
13 @par Revision Reference:
14 This Protocol is defined in Framework of EFI SMM Core Interface Spec
19 #ifndef _EFI_SMM_PERIODIC_TIMER_DISPATCH_H_
20 #define _EFI_SMM_PERIODIC_TIMER_DISPATCH_H_
24 // Global ID for the Periodic Timer SMI Protocol
26 #define EFI_SMM_PERIODIC_TIMER_DISPATCH_PROTOCOL_GUID \
28 0x9cca03fc, 0x4c9e, 0x4a19, {0x9b, 0x6, 0xed, 0x7b, 0x47, 0x9b, 0xde, 0x55 } \
31 typedef struct _EFI_SMM_PERIODIC_TIMER_DISPATCH_PROTOCOL EFI_SMM_PERIODIC_TIMER_DISPATCH_PROTOCOL
;
34 // Related Definitions
39 /// The minimum period of time that the child gets called, in 100 nanosecond units.
40 /// The child will be called back after a time greater than the time Period.
44 /// The period of time interval between SMIs. Children of this interface
45 /// should use this field when registering for periodic timer intervals when a finer
46 /// granularity periodic SMI is desired. Valid values for this field are those returned
47 /// by GetNextInterval. A value of 0 indicates the parent is allowed to use any SMI
48 /// interval period to satisfy the requested period.
50 UINT64 SmiTickInterval
;
52 /// The actual time in 100 nanosecond units elapsed since last called. A
53 /// value of 0 indicates an unknown amount of time.
56 } EFI_SMM_PERIODIC_TIMER_DISPATCH_CONTEXT
;
62 Dispatch function for a Periodic Timer SMI handler.
64 @param DispatchHandle The handle of this dispatch function.
65 @param DispatchContext The pointer to the dispatch function's context.
66 The DispatchContext fields are filled in
67 by the dispatching driver prior to
68 invoking this dispatch function.
75 (EFIAPI
*EFI_SMM_PERIODIC_TIMER_DISPATCH
)(
76 IN EFI_HANDLE DispatchHandle
,
77 IN EFI_SMM_PERIODIC_TIMER_DISPATCH_CONTEXT
*DispatchContext
81 Returns the next SMI tick period supported by the chipset. The order
82 returned is from longest to shortest interval period.
84 @param This The protocol instance pointer.
85 @param SmiTickInterval The pointer to pointer of next shorter SMI interval
86 period supported by the child. This parameter works as a get-first,
87 get-next field. The first time this function is called, *SmiTickInterval
88 should be set to NULL to get the longest SMI interval. The returned
89 *SmiTickInterval should be passed in on subsequent calls to get the
90 next shorter interval period until *SmiTickInterval = NULL.
92 @retval EFI_SUCCESS The service returned successfully.
97 (EFIAPI
*EFI_SMM_PERIODIC_TIMER_INTERVAL
)(
98 IN EFI_SMM_PERIODIC_TIMER_DISPATCH_PROTOCOL
*This
,
99 IN OUT UINT64
**SmiTickInterval
103 Register a child SMI source dispatch function with a parent SMM driver
105 @param This The pointer to the EFI_SMM_PERIODIC_TIMER_DISPATCH_PROTOCOL instance.
106 @param DispatchFunction The function to install.
107 @param DispatchContext The pointer to the dispatch function's context.
108 Indicates to the register
109 function the period at which the dispatch function
111 @param DispatchHandle The handle generated by the dispatcher to track the function instance.
113 @retval EFI_SUCCESS The dispatch function has been successfully
114 registered, and the SMI source has been enabled.
115 @retval EFI_DEVICE_ERROR The driver was unable to enable the SMI source.
116 @retval EFI_OUT_OF_RESOURCES Not enough memory (system or SMM) to manage this
118 @retval EFI_INVALID_PARAMETER DispatchContext is invalid. The period input value
119 is not within valid range.
124 (EFIAPI
*EFI_SMM_PERIODIC_TIMER_REGISTER
)(
125 IN EFI_SMM_PERIODIC_TIMER_DISPATCH_PROTOCOL
*This
,
126 IN EFI_SMM_PERIODIC_TIMER_DISPATCH DispatchFunction
,
127 IN EFI_SMM_PERIODIC_TIMER_DISPATCH_CONTEXT
*DispatchContext
,
128 OUT EFI_HANDLE
*DispatchHandle
132 Unregisters a periodic timer service.
134 @param This The pointer to the EFI_SMM_PERIODIC_TIMER_DISPATCH_PROTOCOL instance.
135 @param DispatchHandle The handle of the service to remove.
137 @retval EFI_SUCCESS The dispatch function has been successfully
138 unregistered, and the SMI source has been disabled
139 if there are no other registered child dispatch
140 functions for this SMI source.
141 @retval EFI_INVALID_PARAMETER The handle is invalid.
146 (EFIAPI
*EFI_SMM_PERIODIC_TIMER_UNREGISTER
)(
147 IN EFI_SMM_PERIODIC_TIMER_DISPATCH_PROTOCOL
*This
,
148 IN EFI_HANDLE DispatchHandle
152 // Interface structure for the SMM Periodic Timer Dispatch Protocol
155 Provides the parent dispatch service for the periodical timer SMI source generator.
157 struct _EFI_SMM_PERIODIC_TIMER_DISPATCH_PROTOCOL
{
159 /// Installs a child service to be dispatched by this protocol.
161 EFI_SMM_PERIODIC_TIMER_REGISTER Register
;
164 /// Removes a child service dispatched by this protocol.
166 EFI_SMM_PERIODIC_TIMER_UNREGISTER UnRegister
;
169 /// Returns the next SMI tick period that is supported by the chipset.
171 EFI_SMM_PERIODIC_TIMER_INTERVAL GetNextShorterInterval
;
174 extern EFI_GUID gEfiSmmPeriodicTimerDispatchProtocolGuid
;