]>
Commit | Line | Data |
---|---|---|
1 | /** @file\r | |
2 | Provides the parent dispatch service for a given SMI source generator.\r | |
3 | The EFI_SMM_ICHN_DISPATCH_PROTOCOL provides the ability to install child handlers for\r | |
4 | the given event types.\r | |
5 | \r | |
6 | Copyright (c) 2008, Intel Corporation\r | |
7 | All rights reserved. This program and the accompanying materials\r | |
8 | are licensed and made available under the terms and conditions of the BSD License\r | |
9 | which accompanies this distribution. The full text of the license may be found at\r | |
10 | http://opensource.org/licenses/bsd-license.php\r | |
11 | \r | |
12 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
13 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
14 | \r | |
15 | Module Name: SmmIchnDispatch.h\r | |
16 | \r | |
17 | @par Revision Reference:\r | |
18 | This Protocol is defined in Framework of EFI SMM Core Interface Spec\r | |
19 | Version 0.9.\r | |
20 | \r | |
21 | **/\r | |
22 | \r | |
23 | #ifndef _EFI_SMM_ICHN_DISPATCH_H_\r | |
24 | #define _EFI_SMM_ICHN_DISPATCH_H_\r | |
25 | \r | |
26 | #include <PiDxe.h>\r | |
27 | \r | |
28 | //\r | |
29 | // Global ID for the ICH SMI Protocol\r | |
30 | //\r | |
31 | #define EFI_SMM_ICHN_DISPATCH_PROTOCOL_GUID \\r | |
32 | { \\r | |
33 | 0xc50b323e, 0x9075, 0x4f2a, {0xac, 0x8e, 0xd2, 0x59, 0x6a, 0x10, 0x85, 0xcc } \\r | |
34 | }\r | |
35 | \r | |
36 | typedef struct _EFI_SMM_ICHN_DISPATCH_PROTOCOL EFI_SMM_ICHN_DISPATCH_PROTOCOL;\r | |
37 | \r | |
38 | //\r | |
39 | // Related Definitions\r | |
40 | //\r | |
41 | //\r | |
42 | // ICHN Specific SMIs. These are miscellaneous SMI sources that are supported by the\r | |
43 | // ICHN specific SMI implementation. These may change over time. TrapNumber is only\r | |
44 | // valid if the Type is Trap.\r | |
45 | //\r | |
46 | typedef enum {\r | |
47 | //\r | |
48 | // NOTE: NEVER delete items from this list/enumeration! Doing so will prevent other versions\r | |
49 | // of the code from compiling. If the ICH version your driver is written for doesn't support\r | |
50 | // some of these SMIs, then simply return EFI_UNSUPPORTED when a child/client tries to register\r | |
51 | // for them.\r | |
52 | //\r | |
53 | IchnMch,\r | |
54 | IchnPme,\r | |
55 | IchnRtcAlarm,\r | |
56 | IchnRingIndicate,\r | |
57 | IchnAc97Wake,\r | |
58 | IchnSerialIrq,\r | |
59 | IchnY2KRollover,\r | |
60 | IchnTcoTimeout,\r | |
61 | IchnOsTco,\r | |
62 | IchnNmi,\r | |
63 | IchnIntruderDetect,\r | |
64 | IchnBiosWp,\r | |
65 | IchnMcSmi,\r | |
66 | IchnPmeB0,\r | |
67 | IchnThrmSts,\r | |
68 | IchnSmBus,\r | |
69 | IchnIntelUsb2,\r | |
70 | IchnMonSmi7,\r | |
71 | IchnMonSmi6,\r | |
72 | IchnMonSmi5,\r | |
73 | IchnMonSmi4,\r | |
74 | IchnDevTrap13,\r | |
75 | IchnDevTrap12,\r | |
76 | IchnDevTrap11,\r | |
77 | IchnDevTrap10,\r | |
78 | IchnDevTrap9,\r | |
79 | IchnDevTrap8,\r | |
80 | IchnDevTrap7,\r | |
81 | IchnDevTrap6,\r | |
82 | IchnDevTrap5,\r | |
83 | IchnDevTrap3,\r | |
84 | IchnDevTrap2,\r | |
85 | IchnDevTrap1,\r | |
86 | IchnDevTrap0,\r | |
87 | IchnIoTrap3,\r | |
88 | IchnIoTrap2,\r | |
89 | IchnIoTrap1,\r | |
90 | IchnIoTrap0,\r | |
91 | IchnPciExpress,\r | |
92 | IchnMonitor,\r | |
93 | IchnSpi,\r | |
94 | IchnQRT,\r | |
95 | IchnGpioUnlock,\r | |
96 | //\r | |
97 | // INSERT NEW ITEMS JUST BEFORE THIS LINE\r | |
98 | //\r | |
99 | NUM_ICHN_TYPES // the number of items in this enumeration\r | |
100 | } EFI_SMM_ICHN_SMI_TYPE;\r | |
101 | \r | |
102 | typedef struct {\r | |
103 | EFI_SMM_ICHN_SMI_TYPE Type;\r | |
104 | } EFI_SMM_ICHN_DISPATCH_CONTEXT;\r | |
105 | \r | |
106 | //\r | |
107 | // Member functions\r | |
108 | //\r | |
109 | /**\r | |
110 | Dispatch function for a ICHN specific SMI handler.\r | |
111 | \r | |
112 | @param DispatchHandle Handle of this dispatch function.\r | |
113 | @param DispatchContext Pointer to the dispatch function's context.\r | |
114 | The DispatchContext fields are filled in\r | |
115 | by the dispatching driver prior to\r | |
116 | invoking this dispatch function.\r | |
117 | \r | |
118 | @return None\r | |
119 | \r | |
120 | **/\r | |
121 | typedef\r | |
122 | VOID\r | |
123 | (EFIAPI *EFI_SMM_ICHN_DISPATCH)(\r | |
124 | IN EFI_HANDLE DispatchHandle,\r | |
125 | IN EFI_SMM_ICHN_DISPATCH_CONTEXT *DispatchContext\r | |
126 | );\r | |
127 | \r | |
128 | /**\r | |
129 | Register a child SMI source dispatch function with a parent SMM driver\r | |
130 | \r | |
131 | @param This Pointer to the EFI_SMM_ICHN_DISPATCH_PROTOCOL instance.\r | |
132 | @param DispatchFunction Function to install.\r | |
133 | @param DispatchContext Pointer to the dispatch function's context.\r | |
134 | The caller fills this context in before calling\r | |
135 | the register function to indicate to the register\r | |
136 | function the ICHN SMI source for which the dispatch\r | |
137 | function should be invoked.\r | |
138 | @param DispatchHandle Handle generated by the dispatcher to track the function\r | |
139 | instance.\r | |
140 | \r | |
141 | @retval EFI_SUCCESS The dispatch function has been successfully\r | |
142 | registered and the SMI source has been enabled.\r | |
143 | @retval EFI_DEVICE_ERROR The driver was unable to enable the SMI source.\r | |
144 | @retval EFI_OUT_OF_RESOURCES Not enough memory (system or SMM) to manage this\r | |
145 | child.\r | |
146 | @retval EFI_INVALID_PARAMETER DispatchContext is invalid. The ICHN input value\r | |
147 | is not within valid range.\r | |
148 | \r | |
149 | **/\r | |
150 | typedef\r | |
151 | EFI_STATUS\r | |
152 | (EFIAPI *EFI_SMM_ICHN_REGISTER)(\r | |
153 | IN EFI_SMM_ICHN_DISPATCH_PROTOCOL *This,\r | |
154 | IN EFI_SMM_ICHN_DISPATCH DispatchFunction,\r | |
155 | IN EFI_SMM_ICHN_DISPATCH_CONTEXT *DispatchContext,\r | |
156 | OUT EFI_HANDLE *DispatchHandle\r | |
157 | );\r | |
158 | \r | |
159 | /**\r | |
160 | Unregister a child SMI source dispatch function with a parent SMM driver\r | |
161 | \r | |
162 | @param This Pointer to the EFI_SMM_ICHN_DISPATCH_PROTOCOL instance.\r | |
163 | @param DispatchHandle Handle of the service to remove.\r | |
164 | \r | |
165 | @retval EFI_SUCCESS The dispatch function has been successfully\r | |
166 | unregistered and the SMI source has been disabled\r | |
167 | if there are no other registered child dispatch\r | |
168 | functions for this SMI source.\r | |
169 | @retval EFI_INVALID_PARAMETER Handle is invalid.\r | |
170 | \r | |
171 | **/\r | |
172 | typedef\r | |
173 | EFI_STATUS\r | |
174 | (EFIAPI *EFI_SMM_ICHN_UNREGISTER)(\r | |
175 | IN EFI_SMM_ICHN_DISPATCH_PROTOCOL *This,\r | |
176 | IN EFI_HANDLE DispatchHandle\r | |
177 | );\r | |
178 | \r | |
179 | //\r | |
180 | // Interface structure for the SMM ICHN specific SMI Dispatch Protocol\r | |
181 | //\r | |
182 | /**\r | |
183 | @par Protocol Description:\r | |
184 | Provides the parent dispatch service for a given SMI source generator.\r | |
185 | \r | |
186 | @param Register\r | |
187 | Installs a child service to be dispatched by this protocol.\r | |
188 | \r | |
189 | @param UnRegister\r | |
190 | Removes a child service dispatched by this protocol.\r | |
191 | \r | |
192 | **/\r | |
193 | struct _EFI_SMM_ICHN_DISPATCH_PROTOCOL {\r | |
194 | EFI_SMM_ICHN_REGISTER Register;\r | |
195 | EFI_SMM_ICHN_UNREGISTER UnRegister;\r | |
196 | };\r | |
197 | \r | |
198 | extern EFI_GUID gEfiSmmIchnDispatchProtocolGuid;\r | |
199 | \r | |
200 | #endif\r |