]>
Commit | Line | Data |
---|---|---|
3eb9473e | 1 | /*++\r |
2 | \r | |
f57387d5 HT |
3 | Copyright (c) 1999 - 2007, Intel Corporation. All rights reserved.<BR>\r |
4 | This program and the accompanying materials\r | |
3eb9473e | 5 | are licensed and made available under the terms and conditions of the BSD License\r |
6 | which accompanies this distribution. The full text of the license may be found at\r | |
7 | http://opensource.org/licenses/bsd-license.php\r | |
8 | \r | |
9 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
10 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
11 | \r | |
12 | \r | |
13 | Module Name:\r | |
14 | \r | |
15 | SmmIchnDispatch.h\r | |
16 | \r | |
17 | Abstract:\r | |
18 | \r | |
19 | EFI Smm ICH [N] Specific Smi Child Protocol\r | |
20 | \r | |
21 | Revision History\r | |
22 | \r | |
23 | --*/\r | |
24 | \r | |
25 | #ifndef _EFI_SMM_ICHN_DISPATCH_H_\r | |
26 | #define _EFI_SMM_ICHN_DISPATCH_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 | |
7ccf38a3 | 33 | 0xc50b323e, 0x9075, 0x4f2a, {0xac, 0x8e, 0xd2, 0x59, 0x6a, 0x10, 0x85, 0xcc} \\r |
3eb9473e | 34 | }\r |
35 | \r | |
36 | EFI_FORWARD_DECLARATION (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 | typedef\r | |
110 | VOID\r | |
111 | (EFIAPI *EFI_SMM_ICHN_DISPATCH) (\r | |
112 | IN EFI_HANDLE DispatchHandle,\r | |
113 | IN EFI_SMM_ICHN_DISPATCH_CONTEXT * DispatchContext\r | |
114 | );\r | |
115 | \r | |
116 | /*++\r | |
117 | \r | |
118 | Routine Description:\r | |
119 | Dispatch function for a ICH n specific SMI handler.\r | |
120 | \r | |
121 | Arguments:\r | |
122 | DispatchHandle - Handle of this dispatch function.\r | |
123 | DispatchContext - Pointer to the dispatch function's context.\r | |
124 | The DispatchContext fields are filled in\r | |
125 | by the dispatching driver prior to\r | |
126 | invoking this dispatch function.\r | |
127 | \r | |
128 | Returns:\r | |
129 | Nothing\r | |
130 | \r | |
131 | --*/\r | |
132 | typedef\r | |
133 | EFI_STATUS\r | |
134 | (EFIAPI *EFI_SMM_ICHN_REGISTER) (\r | |
135 | IN EFI_SMM_ICHN_DISPATCH_PROTOCOL * This,\r | |
136 | IN EFI_SMM_ICHN_DISPATCH DispatchFunction,\r | |
137 | IN EFI_SMM_ICHN_DISPATCH_CONTEXT * DispatchContext,\r | |
138 | OUT EFI_HANDLE * DispatchHandle\r | |
139 | );\r | |
140 | \r | |
141 | /*++\r | |
142 | \r | |
143 | Routine Description:\r | |
144 | Register a child SMI source dispatch function with a parent SMM driver\r | |
145 | \r | |
146 | Arguments:\r | |
147 | This - Protocol instance pointer.\r | |
148 | DispatchFunction - Pointer to dispatch function to be invoked for\r | |
149 | this SMI source\r | |
150 | DispatchContext - Pointer to the dispatch function's context.\r | |
151 | The caller fills this context in before calling\r | |
152 | the register function to indicate to the register\r | |
153 | function the ICHN SMI source for which the dispatch\r | |
154 | function should be invoked.\r | |
155 | DispatchHandle - Handle of dispatch function, for when interfacing\r | |
156 | with the parent Sx state SMM driver.\r | |
157 | \r | |
158 | Returns:\r | |
159 | EFI_SUCCESS - The dispatch function has been successfully\r | |
160 | registered and the SMI source has been enabled.\r | |
161 | EFI_DEVICE_ERROR - The driver was unable to enable the SMI source.\r | |
162 | EFI_OUT_OF_RESOURCES - Not enough memory (system or SMM) to manage this\r | |
163 | child.\r | |
164 | EFI_INVALID_PARAMETER - DispatchContext is invalid. The ICHN input value\r | |
165 | is not within valid range.\r | |
166 | \r | |
167 | --*/\r | |
168 | typedef\r | |
169 | EFI_STATUS\r | |
170 | (EFIAPI *EFI_SMM_ICHN_UNREGISTER) (\r | |
171 | IN EFI_SMM_ICHN_DISPATCH_PROTOCOL * This,\r | |
172 | IN EFI_HANDLE DispatchHandle\r | |
173 | );\r | |
174 | \r | |
175 | /*++\r | |
176 | \r | |
177 | Routine Description:\r | |
178 | Unregister a child SMI source dispatch function with a parent SMM driver\r | |
179 | \r | |
180 | Arguments:\r | |
181 | This - Protocol instance pointer.\r | |
182 | DispatchHandle - Handle of dispatch function to deregister.\r | |
183 | \r | |
184 | Returns:\r | |
185 | EFI_SUCCESS - The dispatch function has been successfully \r | |
186 | unregistered and the SMI source has been disabled\r | |
187 | if there are no other registered child dispatch\r | |
188 | functions for this SMI source.\r | |
189 | EFI_INVALID_PARAMETER - Handle is invalid.\r | |
190 | other - TBD\r | |
191 | \r | |
192 | --*/\r | |
193 | \r | |
194 | //\r | |
195 | // Interface structure for the SMM Ich n specific SMI Dispatch Protocol\r | |
196 | //\r | |
5d46191d | 197 | struct _EFI_SMM_ICHN_DISPATCH_PROTOCOL {\r |
3eb9473e | 198 | EFI_SMM_ICHN_REGISTER Register;\r |
199 | EFI_SMM_ICHN_UNREGISTER UnRegister;\r | |
5d46191d | 200 | };\r |
3eb9473e | 201 | \r |
202 | extern EFI_GUID gEfiSmmIchnDispatchProtocolGuid;\r | |
203 | \r | |
204 | #endif\r |