2 Provides the parent dispatch service for the periodical timer SMI source generator.
4 Copyright (c) 2007 - 2009, Intel Corporation
5 All rights reserved. This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. 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 Module Name: SmmPeriodicTimerDispatch.h
15 @par Revision Reference:
16 This Protocol is defined in Framework of EFI SMM Core Interface Spec
21 #ifndef _EFI_SMM_PERIODIC_TIMER_DISPATCH_H_
22 #define _EFI_SMM_PERIODIC_TIMER_DISPATCH_H_
26 // Global ID for the Periodic Timer SMI Protocol
28 #define EFI_SMM_PERIODIC_TIMER_DISPATCH_PROTOCOL_GUID \
30 0x9cca03fc, 0x4c9e, 0x4a19, {0x9b, 0x6, 0xed, 0x7b, 0x47, 0x9b, 0xde, 0x55 } \
33 typedef struct _EFI_SMM_PERIODIC_TIMER_DISPATCH_PROTOCOL EFI_SMM_PERIODIC_TIMER_DISPATCH_PROTOCOL
;
36 // Related Definitions
41 /// The minimum period of time in 100 nanosecond units that child gets called.
42 /// The child will be called back after a time greater than the time Period.
46 /// The period of time interval between SMIs. Children of this interface
47 /// should use this field when registering for periodic timer intervals when a finer
48 /// granularity periodic SMI is desired. Valid values for this field are those returned
49 /// by GetNextInterval. A value of 0 indicates the parent is allowed to use any SMI
50 /// interval period to satisfy the requested period.
52 UINT64 SmiTickInterval
;
54 /// The actual time in 100 nanosecond units elapsed since last called, a
55 /// value of 0 indicates an unknown amount of time.
58 } EFI_SMM_PERIODIC_TIMER_DISPATCH_CONTEXT
;
64 Dispatch function for a Periodic Timer SMI handler.
66 @param DispatchHandle Handle of this dispatch function.
67 @param DispatchContext Pointer to the dispatch function's context.
68 The DispatchContext fields are filled in
69 by the dispatching driver prior to
70 invoking this dispatch function.
77 (EFIAPI
*EFI_SMM_PERIODIC_TIMER_DISPATCH
)(
78 IN EFI_HANDLE DispatchHandle
,
79 IN EFI_SMM_PERIODIC_TIMER_DISPATCH_CONTEXT
*DispatchContext
83 Returns the next SMI tick period supported by the chipset. The order
84 returned is from longest to shortest interval period.
86 @param This Protocol instance pointer.
87 @param SmiTickInterval Pointer to pointer of next shorter SMI interval
88 period supported by the child. This parameter works as a get-first,
89 get-next field.The first time this function is called, *SmiTickInterval
90 should be set to NULL to get the longest SMI interval.The returned
91 *SmiTickInterval should be passed in on subsequent calls to get the
92 next shorter interval period until *SmiTickInterval = NULL.
94 @retval EFI_SUCCESS The service returned successfully.
99 (EFIAPI
*EFI_SMM_PERIODIC_TIMER_INTERVAL
)(
100 IN EFI_SMM_PERIODIC_TIMER_DISPATCH_PROTOCOL
*This
,
101 IN OUT UINT64
**SmiTickInterval
105 Register a child SMI source dispatch function with a parent SMM driver
107 @param This Pointer to the EFI_SMM_PERIODIC_TIMER_DISPATCH_PROTOCOL instance.
108 @param DispatchFunction Function to install.
109 @param DispatchContext Pointer to the dispatch function's context.
110 The caller fills this context in before calling
111 the register function to indicate to the register
112 function the period at which the dispatch function
114 @param DispatchHandle Handle generated by the dispatcher to track the function instance.
116 @retval EFI_SUCCESS The dispatch function has been successfully
117 registered and the SMI source has been enabled.
118 @retval EFI_DEVICE_ERROR The driver was unable to enable the SMI source.
119 @retval EFI_OUT_OF_RESOURCES Not enough memory (system or SMM) to manage this
121 @retval EFI_INVALID_PARAMETER DispatchContext is invalid. The period input value
122 is not within valid range.
127 (EFIAPI
*EFI_SMM_PERIODIC_TIMER_REGISTER
)(
128 IN EFI_SMM_PERIODIC_TIMER_DISPATCH_PROTOCOL
*This
,
129 IN EFI_SMM_PERIODIC_TIMER_DISPATCH DispatchFunction
,
130 IN EFI_SMM_PERIODIC_TIMER_DISPATCH_CONTEXT
*DispatchContext
,
131 OUT EFI_HANDLE
*DispatchHandle
135 Unregisters a periodic timer service.
137 @param This Pointer to the EFI_SMM_PERIODIC_TIMER_DISPATCH_PROTOCOL instance.
138 @param DispatchHandle Handle of the service to remove.
140 @retval EFI_SUCCESS The dispatch function has been successfully
141 unregistered and the SMI source has been disabled
142 if there are no other registered child dispatch
143 functions for this SMI source.
144 @retval EFI_INVALID_PARAMETER Handle is invalid.
149 (EFIAPI
*EFI_SMM_PERIODIC_TIMER_UNREGISTER
)(
150 IN EFI_SMM_PERIODIC_TIMER_DISPATCH_PROTOCOL
*This
,
151 IN EFI_HANDLE DispatchHandle
155 // Interface structure for the SMM Periodic Timer Dispatch Protocol
158 Provides the parent dispatch service for the periodical timer SMI source generator.
160 struct _EFI_SMM_PERIODIC_TIMER_DISPATCH_PROTOCOL
{
162 /// Installs a child service to be dispatched by this protocol.
164 EFI_SMM_PERIODIC_TIMER_REGISTER Register
;
167 /// Removes a child service dispatched by this protocol.
169 EFI_SMM_PERIODIC_TIMER_UNREGISTER UnRegister
;
172 /// Returns the next SMI tick period that is supported by the chipset.
174 EFI_SMM_PERIODIC_TIMER_INTERVAL GetNextShorterInterval
;
177 extern EFI_GUID gEfiSmmPeriodicTimerDispatchProtocolGuid
;