]> git.proxmox.com Git - mirror_edk2.git/blame - IntelFrameworkPkg/Include/Protocol/SmmIchnDispatch.h
Renaming files/directories
[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
4 Copyright (c) 2007, 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
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
89 //\r
90 // INSERT NEW ITEMS JUST BEFORE THIS LINE\r
91 //\r
92 NUM_ICHN_TYPES // the number of items in this enumeration\r
93} EFI_SMM_ICHN_SMI_TYPE;\r
94\r
95typedef struct {\r
96 EFI_SMM_ICHN_SMI_TYPE Type;\r
97} EFI_SMM_ICHN_DISPATCH_CONTEXT;\r
98\r
99//\r
100// Member functions\r
101//\r
102/**\r
103 Dispatch function for a ICH n specific SMI handler.\r
104\r
105 @param DispatchHandle Handle of this dispatch function.\r
106 @param DispatchContext Pointer to the dispatch function's context.\r
107 The DispatchContext fields are filled in\r
108 by the dispatching driver prior to\r
109 invoking this dispatch function.\r
110\r
111 Nothing\r
112\r
113**/\r
114typedef\r
115VOID\r
116(EFIAPI *EFI_SMM_ICHN_DISPATCH) (\r
117 IN EFI_HANDLE DispatchHandle,\r
118 IN EFI_SMM_ICHN_DISPATCH_CONTEXT *DispatchContext\r
119 );\r
120\r
121/**\r
122 Register a child SMI source dispatch function with a parent SMM driver\r
123\r
124 @param This Protocol instance pointer.\r
125 @param DispatchFunction Pointer to dispatch function to be invoked for\r
126 this SMI source\r
127 @param DispatchContext Pointer to the dispatch function's context.\r
128 The caller fills this context in before calling\r
129 the register function to indicate to the register\r
130 function the ICHN SMI source for which the dispatch\r
131 function should be invoked.\r
132 @param DispatchHandle Handle of dispatch function, for when interfacing\r
133 with the parent Sx state SMM driver.\r
134\r
135 @retval EFI_SUCCESS The dispatch function has been successfully\r
136 registered and the SMI source has been enabled.\r
137 @retval EFI_DEVICE_ERROR The driver was unable to enable the SMI source.\r
138 @retval EFI_OUT_OF_RESOURCES Not enough memory (system or SMM) to manage this\r
139 child.\r
140 @retval EFI_INVALID_PARAMETER DispatchContext is invalid. The ICHN input value\r
141 is not within valid range.\r
142\r
143**/\r
144typedef\r
145EFI_STATUS\r
146(EFIAPI *EFI_SMM_ICHN_REGISTER) (\r
147 IN EFI_SMM_ICHN_DISPATCH_PROTOCOL *This,\r
148 IN EFI_SMM_ICHN_DISPATCH DispatchFunction,\r
149 IN EFI_SMM_ICHN_DISPATCH_CONTEXT *DispatchContext,\r
150 OUT EFI_HANDLE *DispatchHandle\r
151 );\r
152\r
153/**\r
154 Unregister a child SMI source dispatch function with a parent SMM driver\r
155\r
156 @param This Protocol instance pointer.\r
157 @param DispatchHandle Handle of dispatch function to deregister.\r
158\r
159 @retval EFI_SUCCESS The dispatch function has been successfully\r
160 unregistered and the SMI source has been disabled\r
161 if there are no other registered child dispatch\r
162 functions for this SMI source.\r
163 @retval EFI_INVALID_PARAMETER Handle is invalid.\r
164 @retval other TBD\r
165\r
166**/\r
167typedef\r
168EFI_STATUS\r
169(EFIAPI *EFI_SMM_ICHN_UNREGISTER) (\r
170 IN EFI_SMM_ICHN_DISPATCH_PROTOCOL *This,\r
171 IN EFI_HANDLE DispatchHandle\r
172 );\r
173\r
174//\r
175// Interface structure for the SMM Ich n specific SMI Dispatch Protocol\r
176//\r
177/**\r
178 @par Protocol Description:\r
179 Provides the parent dispatch service for a given SMI source generator.\r
180\r
181 @param Register\r
182 Installs a child service to be dispatched by this protocol.\r
183\r
184 @param UnRegister\r
185 Removes a child service dispatched by this protocol.\r
186\r
187**/\r
188struct _EFI_SMM_ICHN_DISPATCH_PROTOCOL {\r
189 EFI_SMM_ICHN_REGISTER Register;\r
190 EFI_SMM_ICHN_UNREGISTER UnRegister;\r
191};\r
192\r
193extern EFI_GUID gEfiSmmIchnDispatchProtocolGuid;\r
194\r
195#endif\r