]> git.proxmox.com Git - mirror_edk2.git/blob - IntelFrameworkPkg/Include/Protocol/SmmIchnDispatch.h
Update comment in SMM Library class include file.
[mirror_edk2.git] / IntelFrameworkPkg / Include / Protocol / SmmIchnDispatch.h
1 /** @file
2 Provides the parent dispatch service for a given SMI source generator.
3 The EFI_SMM_ICHN_DISPATCH_PROTOCOL provides the ability to install child handlers for
4 the given event types.
5
6 Copyright (c) 2008, Intel Corporation
7 All rights reserved. This program and the accompanying materials
8 are licensed and made available under the terms and conditions of the BSD License
9 which accompanies this distribution. The full text of the license may be found at
10 http://opensource.org/licenses/bsd-license.php
11
12 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
13 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
14
15 Module Name: SmmIchnDispatch.h
16
17 @par Revision Reference:
18 This Protocol is defined in Framework of EFI SMM Core Interface Spec
19 Version 0.9.
20
21 **/
22
23 #ifndef _EFI_SMM_ICHN_DISPATCH_H_
24 #define _EFI_SMM_ICHN_DISPATCH_H_
25
26 #include <PiDxe.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 typedef struct _EFI_SMM_ICHN_DISPATCH_PROTOCOL 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 /**
110 Dispatch function for a ICHN specific SMI handler.
111
112 @param DispatchHandle Handle of this dispatch function.
113 @param DispatchContext Pointer to the dispatch function's context.
114 The DispatchContext fields are filled in
115 by the dispatching driver prior to
116 invoking this dispatch function.
117
118 @return None
119
120 **/
121 typedef
122 VOID
123 (EFIAPI *EFI_SMM_ICHN_DISPATCH)(
124 IN EFI_HANDLE DispatchHandle,
125 IN EFI_SMM_ICHN_DISPATCH_CONTEXT *DispatchContext
126 );
127
128 /**
129 Register a child SMI source dispatch function with a parent SMM driver
130
131 @param This Pointer to the EFI_SMM_ICHN_DISPATCH_PROTOCOL instance.
132 @param DispatchFunction Function to install.
133 @param DispatchContext Pointer to the dispatch function's context.
134 The caller fills this context in before calling
135 the register function to indicate to the register
136 function the ICHN SMI source for which the dispatch
137 function should be invoked.
138 @param DispatchHandle Handle generated by the dispatcher to track the function
139 instance.
140
141 @retval EFI_SUCCESS The dispatch function has been successfully
142 registered and the SMI source has been enabled.
143 @retval EFI_DEVICE_ERROR The driver was unable to enable the SMI source.
144 @retval EFI_OUT_OF_RESOURCES Not enough memory (system or SMM) to manage this
145 child.
146 @retval EFI_INVALID_PARAMETER DispatchContext is invalid. The ICHN input value
147 is not within valid range.
148
149 **/
150 typedef
151 EFI_STATUS
152 (EFIAPI *EFI_SMM_ICHN_REGISTER)(
153 IN EFI_SMM_ICHN_DISPATCH_PROTOCOL *This,
154 IN EFI_SMM_ICHN_DISPATCH DispatchFunction,
155 IN EFI_SMM_ICHN_DISPATCH_CONTEXT *DispatchContext,
156 OUT EFI_HANDLE *DispatchHandle
157 );
158
159 /**
160 Unregister a child SMI source dispatch function with a parent SMM driver
161
162 @param This Pointer to the EFI_SMM_ICHN_DISPATCH_PROTOCOL instance.
163 @param DispatchHandle Handle of the service to remove.
164
165 @retval EFI_SUCCESS The dispatch function has been successfully
166 unregistered and the SMI source has been disabled
167 if there are no other registered child dispatch
168 functions for this SMI source.
169 @retval EFI_INVALID_PARAMETER Handle is invalid.
170
171 **/
172 typedef
173 EFI_STATUS
174 (EFIAPI *EFI_SMM_ICHN_UNREGISTER)(
175 IN EFI_SMM_ICHN_DISPATCH_PROTOCOL *This,
176 IN EFI_HANDLE DispatchHandle
177 );
178
179 //
180 // Interface structure for the SMM ICHN specific SMI Dispatch Protocol
181 //
182 /**
183 @par Protocol Description:
184 Provides the parent dispatch service for a given SMI source generator.
185
186 @param Register
187 Installs a child service to be dispatched by this protocol.
188
189 @param UnRegister
190 Removes a child service dispatched by this protocol.
191
192 **/
193 struct _EFI_SMM_ICHN_DISPATCH_PROTOCOL {
194 EFI_SMM_ICHN_REGISTER Register;
195 EFI_SMM_ICHN_UNREGISTER UnRegister;
196 };
197
198 extern EFI_GUID gEfiSmmIchnDispatchProtocolGuid;
199
200 #endif