]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Include/Protocol/SmmIchnDispatch.h
Change the Guid Value of EFI_ISCSI_INITIATOR_NAME_PROTOCOL_GUID.
[mirror_edk2.git] / MdePkg / Include / Protocol / SmmIchnDispatch.h
CommitLineData
878ddf1f 1/** @file\r
2 This file declares EFI Smm ICH [N] Specific Smi Child Protocol\r
3\r
4 Copyright (c) 2006, Intel Corporation \r
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: SmmIchnDispatch.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_ICHN_DISPATCH_H_\r
22#define _EFI_SMM_ICHN_DISPATCH_H_\r
23\r
24//\r
25// Global ID for the ICH SMI Protocol\r
26//\r
27#define EFI_SMM_ICHN_DISPATCH_PROTOCOL_GUID \\r
28 { \\r
29 0xc50b323e, 0x9075, 0x4f2a, {0xac, 0x8e, 0xd2, 0x59, 0x6a, 0x10, 0x85, 0xcc } \\r
30 }\r
31\r
32typedef struct _EFI_SMM_ICHN_DISPATCH_PROTOCOL EFI_SMM_ICHN_DISPATCH_PROTOCOL;\r
33\r
34//\r
35// Related Definitions\r
36//\r
37//\r
38// ICHN Specific SMIs. These are miscellaneous SMI sources that are supported by the\r
39// ICHN specific SMI implementation. These may change over time. TrapNumber is only\r
40// valid if the Type is Trap.\r
41//\r
42typedef enum {\r
43 //\r
44 // NOTE: NEVER delete items from this list/enumeration! Doing so will prevent other versions\r
45 // of the code from compiling. If the ICH version your driver is written for doesn't support\r
46 // some of these SMIs, then simply return EFI_UNSUPPORTED when a child/client tries to register\r
47 // for them.\r
48 //\r
49 IchnMch,\r
50 IchnPme,\r
51 IchnRtcAlarm,\r
52 IchnRingIndicate,\r
53 IchnAc97Wake,\r
54 IchnSerialIrq,\r
55 IchnY2KRollover,\r
56 IchnTcoTimeout,\r
57 IchnOsTco,\r
58 IchnNmi,\r
59 IchnIntruderDetect,\r
60 IchnBiosWp,\r
61 IchnMcSmi,\r
62 IchnPmeB0,\r
63 IchnThrmSts,\r
64 IchnSmBus,\r
65 IchnIntelUsb2,\r
66 IchnMonSmi7,\r
67 IchnMonSmi6,\r
68 IchnMonSmi5,\r
69 IchnMonSmi4,\r
70 IchnDevTrap13,\r
71 IchnDevTrap12,\r
72 IchnDevTrap11,\r
73 IchnDevTrap10,\r
74 IchnDevTrap9,\r
75 IchnDevTrap8,\r
76 IchnDevTrap7,\r
77 IchnDevTrap6,\r
78 IchnDevTrap5,\r
79 IchnDevTrap3,\r
80 IchnDevTrap2,\r
81 IchnDevTrap1,\r
82 IchnDevTrap0,\r
83 IchnIoTrap3,\r
84 IchnIoTrap2,\r
85 IchnIoTrap1,\r
86 IchnIoTrap0,\r
87 //\r
88 // INSERT NEW ITEMS JUST BEFORE THIS LINE\r
89 //\r
90 NUM_ICHN_TYPES // the number of items in this enumeration\r
91} EFI_SMM_ICHN_SMI_TYPE;\r
92\r
93typedef struct {\r
94 EFI_SMM_ICHN_SMI_TYPE Type;\r
95} EFI_SMM_ICHN_DISPATCH_CONTEXT;\r
96\r
97//\r
98// Member functions\r
99//\r
100/**\r
101 Dispatch function for a ICH n specific SMI handler.\r
102\r
0647c9ad
LG
103 @param DispatchHandle Handle of this dispatch function.\r
104 @param DispatchContext Pointer to the dispatch function's context.\r
105 The DispatchContext fields are filled in\r
106 by the dispatching driver prior to\r
107 invoking this dispatch function.\r
878ddf1f 108\r
109 Nothing\r
110\r
111**/\r
112typedef\r
113VOID\r
114(EFIAPI *EFI_SMM_ICHN_DISPATCH) (\r
115 IN EFI_HANDLE DispatchHandle,\r
116 IN EFI_SMM_ICHN_DISPATCH_CONTEXT *DispatchContext\r
117 );\r
118\r
119/**\r
120 Register a child SMI source dispatch function with a parent SMM driver\r
121\r
0647c9ad
LG
122 @param This Protocol instance pointer.\r
123 @param DispatchFunction Pointer to dispatch function to be invoked for\r
124 this SMI source\r
125 @param DispatchContext Pointer to the dispatch function's context.\r
126 The caller fills this context in before calling\r
127 the register function to indicate to the register\r
128 function the ICHN SMI source for which the dispatch\r
129 function should be invoked.\r
130 @param DispatchHandle Handle of dispatch function, for when interfacing\r
131 with the parent Sx state SMM driver.\r
132\r
133 @retval EFI_SUCCESS The dispatch function has been successfully\r
134 registered and the SMI source has been enabled.\r
135 @retval EFI_DEVICE_ERROR The driver was unable to enable the SMI source.\r
136 @retval EFI_OUT_OF_RESOURCES Not enough memory (system or SMM) to manage this\r
137 child.\r
138 @retval EFI_INVALID_PARAMETER DispatchContext is invalid. The ICHN input value\r
139 is not within valid range.\r
878ddf1f 140\r
141**/\r
142typedef\r
143EFI_STATUS\r
144(EFIAPI *EFI_SMM_ICHN_REGISTER) (\r
145 IN EFI_SMM_ICHN_DISPATCH_PROTOCOL *This,\r
146 IN EFI_SMM_ICHN_DISPATCH DispatchFunction,\r
147 IN EFI_SMM_ICHN_DISPATCH_CONTEXT *DispatchContext,\r
148 OUT EFI_HANDLE *DispatchHandle\r
149 );\r
150\r
151/**\r
152 Unregister a child SMI source dispatch function with a parent SMM driver\r
153\r
0647c9ad
LG
154 @param This Protocol instance pointer.\r
155 @param DispatchHandle Handle of dispatch function to deregister.\r
878ddf1f 156\r
0647c9ad
LG
157 @retval EFI_SUCCESS The dispatch function has been successfully\r
158 unregistered and the SMI source has been disabled\r
159 if there are no other registered child dispatch\r
160 functions for this SMI source.\r
161 @retval EFI_INVALID_PARAMETER Handle is invalid.\r
162 @retval other TBD\r
878ddf1f 163\r
164**/\r
165typedef\r
166EFI_STATUS\r
167(EFIAPI *EFI_SMM_ICHN_UNREGISTER) (\r
168 IN EFI_SMM_ICHN_DISPATCH_PROTOCOL *This,\r
169 IN EFI_HANDLE DispatchHandle\r
170 );\r
171\r
172//\r
173// Interface structure for the SMM Ich n specific SMI Dispatch Protocol\r
174//\r
175/**\r
176 @par Protocol Description:\r
177 Provides the parent dispatch service for a given SMI source generator.\r
178\r
179 @param Register\r
180 Installs a child service to be dispatched by this protocol.\r
181\r
182 @param UnRegister\r
183 Removes a child service dispatched by this protocol.\r
184\r
185**/\r
186struct _EFI_SMM_ICHN_DISPATCH_PROTOCOL {\r
187 EFI_SMM_ICHN_REGISTER Register;\r
188 EFI_SMM_ICHN_UNREGISTER UnRegister;\r
189};\r
190\r
191extern EFI_GUID gEfiSmmIchnDispatchProtocolGuid;\r
192\r
193#endif\r