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