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