]> git.proxmox.com Git - mirror_edk2.git/blame - IntelFrameworkPkg/Include/Protocol/SmmPeriodicTimerDispatch.h
Correct the structure's comments to follow doxygen format.
[mirror_edk2.git] / IntelFrameworkPkg / Include / Protocol / SmmPeriodicTimerDispatch.h
CommitLineData
79964ac8 1/** @file\r
8411f1c0 2 Provides the parent dispatch service for the periodical timer SMI source generator.\r
79964ac8 3\r
358e78ed 4 Copyright (c) 2007 - 2009, Intel Corporation\r
79964ac8 5 All rights reserved. This program and the accompanying materials\r
6 are licensed and made available under the terms and conditions of the BSD License\r
7 which accompanies this distribution. The full text of the license may be found at\r
8 http://opensource.org/licenses/bsd-license.php\r
9\r
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
12\r
13 Module Name: SmmPeriodicTimerDispatch.h\r
14\r
15 @par Revision Reference:\r
16 This Protocol is defined in Framework of EFI SMM Core Interface Spec\r
17 Version 0.9.\r
18\r
19**/\r
20\r
21#ifndef _EFI_SMM_PERIODIC_TIMER_DISPATCH_H_\r
22#define _EFI_SMM_PERIODIC_TIMER_DISPATCH_H_\r
23\r
b80fbe85 24#include <PiDxe.h>\r
25\r
79964ac8 26//\r
27// Global ID for the Periodic Timer SMI Protocol\r
28//\r
29#define EFI_SMM_PERIODIC_TIMER_DISPATCH_PROTOCOL_GUID \\r
30 { \\r
31 0x9cca03fc, 0x4c9e, 0x4a19, {0x9b, 0x6, 0xed, 0x7b, 0x47, 0x9b, 0xde, 0x55 } \\r
32 }\r
33\r
34typedef struct _EFI_SMM_PERIODIC_TIMER_DISPATCH_PROTOCOL EFI_SMM_PERIODIC_TIMER_DISPATCH_PROTOCOL;\r
35\r
36//\r
37// Related Definitions\r
38//\r
358e78ed 39\r
79964ac8 40typedef struct {\r
358e78ed 41 ///\r
42 /// The minimum period of time in 100 nanosecond units that child gets called.\r
43 /// The child will be called back after a time greater than the time Period.\r
44 ///\r
79964ac8 45 UINT64 Period;\r
358e78ed 46 ///\r
47 /// The period of time interval between SMIs. Children of this interface\r
48 /// should use this field when registering for periodic timer intervals when a finer\r
49 /// granularity periodic SMI is desired. Valid values for this field are those returned\r
50 /// by GetNextInterval. A value of 0 indicates the parent is allowed to use any SMI\r
51 /// interval period to satisfy the requested period.\r
52 ///\r
79964ac8 53 UINT64 SmiTickInterval;\r
358e78ed 54 ///\r
55 /// The actual time in 100 nanosecond units elapsed since last called, a\r
56 /// value of 0 indicates an unknown amount of time.\r
57 ///\r
79964ac8 58 UINT64 ElapsedTime;\r
59} EFI_SMM_PERIODIC_TIMER_DISPATCH_CONTEXT;\r
60\r
61//\r
62// Member functions\r
63//\r
64/**\r
65 Dispatch function for a Periodic Timer SMI handler.\r
66\r
67 @param DispatchHandle Handle of this dispatch function.\r
68 @param DispatchContext Pointer to the dispatch function's context.\r
69 The DispatchContext fields are filled in\r
70 by the dispatching driver prior to\r
71 invoking this dispatch function.\r
72\r
700a7869 73 @return None\r
79964ac8 74\r
75**/\r
76typedef\r
77VOID\r
69686d56 78(EFIAPI *EFI_SMM_PERIODIC_TIMER_DISPATCH)(\r
700a7869 79 IN EFI_HANDLE DispatchHandle,\r
80 IN EFI_SMM_PERIODIC_TIMER_DISPATCH_CONTEXT *DispatchContext\r
79964ac8 81 );\r
82\r
83/**\r
84 Returns the next SMI tick period supported by the chipset. The order\r
85 returned is from longest to shortest interval period.\r
86\r
87 @param This Protocol instance pointer.\r
88 @param SmiTickInterval Pointer to pointer of next shorter SMI interval\r
89 period supported by the child. This parameter works as a get-first,\r
90 get-next field.The first time this function is called, *SmiTickInterval\r
91 should be set to NULL to get the longest SMI interval.The returned\r
92 *SmiTickInterval should be passed in on subsequent calls to get the\r
93 next shorter interval period until *SmiTickInterval = NULL.\r
94\r
95 @retval EFI_SUCCESS The service returned successfully.\r
96\r
97**/\r
98typedef\r
99EFI_STATUS\r
69686d56 100(EFIAPI *EFI_SMM_PERIODIC_TIMER_INTERVAL)(\r
79964ac8 101 IN EFI_SMM_PERIODIC_TIMER_DISPATCH_PROTOCOL *This,\r
102 IN OUT UINT64 **SmiTickInterval\r
103 );\r
104\r
105/**\r
106 Register a child SMI source dispatch function with a parent SMM driver\r
107\r
700a7869 108 @param This Pointer to the EFI_SMM_PERIODIC_TIMER_DISPATCH_PROTOCOL instance.\r
109 @param DispatchFunction Function to install.\r
79964ac8 110 @param DispatchContext Pointer to the dispatch function's context.\r
111 The caller fills this context in before calling\r
112 the register function to indicate to the register\r
113 function the period at which the dispatch function\r
114 should be invoked.\r
700a7869 115 @param DispatchHandle Handle generated by the dispatcher to track the function instance.\r
79964ac8 116\r
117 @retval EFI_SUCCESS The dispatch function has been successfully\r
118 registered and the SMI source has been enabled.\r
119 @retval EFI_DEVICE_ERROR The driver was unable to enable the SMI source.\r
120 @retval EFI_OUT_OF_RESOURCES Not enough memory (system or SMM) to manage this\r
121 child.\r
122 @retval EFI_INVALID_PARAMETER DispatchContext is invalid. The period input value\r
123 is not within valid range.\r
124\r
125**/\r
126typedef\r
127EFI_STATUS\r
69686d56 128(EFIAPI *EFI_SMM_PERIODIC_TIMER_REGISTER)(\r
700a7869 129 IN EFI_SMM_PERIODIC_TIMER_DISPATCH_PROTOCOL *This,\r
130 IN EFI_SMM_PERIODIC_TIMER_DISPATCH DispatchFunction,\r
131 IN EFI_SMM_PERIODIC_TIMER_DISPATCH_CONTEXT *DispatchContext,\r
132 OUT EFI_HANDLE *DispatchHandle\r
79964ac8 133 );\r
134\r
135/**\r
700a7869 136 Unregisters a periodic timer service.\r
79964ac8 137\r
700a7869 138 @param This Pointer to the EFI_SMM_PERIODIC_TIMER_DISPATCH_PROTOCOL instance.\r
139 @param DispatchHandle Handle of the service to remove.\r
79964ac8 140\r
141 @retval EFI_SUCCESS The dispatch function has been successfully\r
142 unregistered and the SMI source has been disabled\r
143 if there are no other registered child dispatch\r
144 functions for this SMI source.\r
145 @retval EFI_INVALID_PARAMETER Handle is invalid.\r
146\r
147**/\r
148typedef\r
149EFI_STATUS\r
69686d56 150(EFIAPI *EFI_SMM_PERIODIC_TIMER_UNREGISTER)(\r
700a7869 151 IN EFI_SMM_PERIODIC_TIMER_DISPATCH_PROTOCOL *This,\r
152 IN EFI_HANDLE DispatchHandle\r
79964ac8 153 );\r
154\r
155//\r
156// Interface structure for the SMM Periodic Timer Dispatch Protocol\r
157//\r
158/**\r
79964ac8 159 Provides the parent dispatch service for the periodical timer SMI source generator.\r
79964ac8 160**/\r
161struct _EFI_SMM_PERIODIC_TIMER_DISPATCH_PROTOCOL {\r
2bbaeb0d 162 ///\r
163 /// Installs a child service to be dispatched by this protocol.\r
164 ///\r
79964ac8 165 EFI_SMM_PERIODIC_TIMER_REGISTER Register;\r
2bbaeb0d 166 \r
167 ///\r
168 /// Removes a child service dispatched by this protocol.\r
169 ///\r
79964ac8 170 EFI_SMM_PERIODIC_TIMER_UNREGISTER UnRegister;\r
2bbaeb0d 171 \r
172 ///\r
173 /// Returns the next SMI tick period that is supported by the chipset.\r
174 ///\r
79964ac8 175 EFI_SMM_PERIODIC_TIMER_INTERVAL GetNextShorterInterval;\r
176};\r
177\r
178extern EFI_GUID gEfiSmmPeriodicTimerDispatchProtocolGuid;\r
179\r
180#endif\r