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