]>
Commit | Line | Data |
---|---|---|
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 |
1c2f052d LG |
6 | Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.<BR>\r |
7 | This program and the accompanying materials are licensed and made available under\r | |
8 | the terms and conditions of the BSD License that accompanies this distribution.\r | |
f22f941e | 9 | The full text of the license may be found at\r |
1c2f052d LG |
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 | |
f22f941e | 13 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r |
79964ac8 | 14 | \r |
79964ac8 | 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 | \r |
79964ac8 | 25 | //\r |
26 | // Global ID for the ICH SMI Protocol\r | |
27 | //\r | |
28 | #define EFI_SMM_ICHN_DISPATCH_PROTOCOL_GUID \\r | |
29 | { \\r | |
30 | 0xc50b323e, 0x9075, 0x4f2a, {0xac, 0x8e, 0xd2, 0x59, 0x6a, 0x10, 0x85, 0xcc } \\r | |
31 | }\r | |
32 | \r | |
33 | typedef struct _EFI_SMM_ICHN_DISPATCH_PROTOCOL EFI_SMM_ICHN_DISPATCH_PROTOCOL;\r | |
34 | \r | |
35 | //\r | |
36 | // Related Definitions\r | |
37 | //\r | |
38 | //\r | |
39 | // ICHN Specific SMIs. These are miscellaneous SMI sources that are supported by the\r | |
40 | // ICHN specific SMI implementation. These may change over time. TrapNumber is only\r | |
41 | // valid if the Type is Trap.\r | |
42 | //\r | |
43 | typedef enum {\r | |
44 | //\r | |
45 | // NOTE: NEVER delete items from this list/enumeration! Doing so will prevent other versions\r | |
46 | // of the code from compiling. If the ICH version your driver is written for doesn't support\r | |
47 | // some of these SMIs, then simply return EFI_UNSUPPORTED when a child/client tries to register\r | |
48 | // for them.\r | |
49 | //\r | |
50 | IchnMch,\r | |
51 | IchnPme,\r | |
52 | IchnRtcAlarm,\r | |
53 | IchnRingIndicate,\r | |
54 | IchnAc97Wake,\r | |
55 | IchnSerialIrq,\r | |
56 | IchnY2KRollover,\r | |
57 | IchnTcoTimeout,\r | |
58 | IchnOsTco,\r | |
59 | IchnNmi,\r | |
60 | IchnIntruderDetect,\r | |
61 | IchnBiosWp,\r | |
62 | IchnMcSmi,\r | |
63 | IchnPmeB0,\r | |
64 | IchnThrmSts,\r | |
65 | IchnSmBus,\r | |
66 | IchnIntelUsb2,\r | |
67 | IchnMonSmi7,\r | |
68 | IchnMonSmi6,\r | |
69 | IchnMonSmi5,\r | |
70 | IchnMonSmi4,\r | |
71 | IchnDevTrap13,\r | |
72 | IchnDevTrap12,\r | |
73 | IchnDevTrap11,\r | |
74 | IchnDevTrap10,\r | |
75 | IchnDevTrap9,\r | |
76 | IchnDevTrap8,\r | |
77 | IchnDevTrap7,\r | |
78 | IchnDevTrap6,\r | |
79 | IchnDevTrap5,\r | |
80 | IchnDevTrap3,\r | |
81 | IchnDevTrap2,\r | |
82 | IchnDevTrap1,\r | |
83 | IchnDevTrap0,\r | |
84 | IchnIoTrap3,\r | |
85 | IchnIoTrap2,\r | |
86 | IchnIoTrap1,\r | |
87 | IchnIoTrap0,\r | |
9d198522 | 88 | IchnPciExpress,\r |
89 | IchnMonitor,\r | |
90 | IchnSpi,\r | |
91 | IchnQRT,\r | |
92 | IchnGpioUnlock,\r | |
79964ac8 | 93 | //\r |
94 | // INSERT NEW ITEMS JUST BEFORE THIS LINE\r | |
95 | //\r | |
96 | NUM_ICHN_TYPES // the number of items in this enumeration\r | |
97 | } EFI_SMM_ICHN_SMI_TYPE;\r | |
98 | \r | |
99 | typedef struct {\r | |
100 | EFI_SMM_ICHN_SMI_TYPE Type;\r | |
101 | } EFI_SMM_ICHN_DISPATCH_CONTEXT;\r | |
102 | \r | |
103 | //\r | |
104 | // Member functions\r | |
105 | //\r | |
106 | /**\r | |
700a7869 | 107 | Dispatch function for a ICHN specific SMI handler.\r |
79964ac8 | 108 | \r |
f22f941e | 109 | @param DispatchHandle The handle of this dispatch function.\r |
110 | @param DispatchContext The pointer to the dispatch function's context.\r | |
79964ac8 | 111 | The DispatchContext fields are filled in\r |
112 | by the dispatching driver prior to\r | |
113 | invoking this dispatch function.\r | |
114 | \r | |
700a7869 | 115 | @return None\r |
79964ac8 | 116 | \r |
117 | **/\r | |
118 | typedef\r | |
119 | VOID\r | |
69686d56 | 120 | (EFIAPI *EFI_SMM_ICHN_DISPATCH)(\r |
79964ac8 | 121 | IN EFI_HANDLE DispatchHandle,\r |
122 | IN EFI_SMM_ICHN_DISPATCH_CONTEXT *DispatchContext\r | |
123 | );\r | |
124 | \r | |
125 | /**\r | |
f22f941e | 126 | Register a child SMI source dispatch function with a parent SMM driver.\r |
79964ac8 | 127 | \r |
f22f941e | 128 | @param This The pointer to the EFI_SMM_ICHN_DISPATCH_PROTOCOL instance.\r |
129 | @param DispatchFunction The function to install.\r | |
130 | @param DispatchContext The pointer to the dispatch function's context.\r | |
5259c97d | 131 | The caller fills in this context before calling\r |
79964ac8 | 132 | the register function to indicate to the register\r |
133 | function the ICHN SMI source for which the dispatch\r | |
134 | function should be invoked.\r | |
f22f941e | 135 | @param DispatchHandle The handle generated by the dispatcher to track the function\r |
700a7869 | 136 | instance.\r |
79964ac8 | 137 | \r |
138 | @retval EFI_SUCCESS The dispatch function has been successfully\r | |
139 | registered and the SMI source has been enabled.\r | |
5259c97d | 140 | @retval EFI_DEVICE_ERROR The driver could not enable the SMI source.\r |
79964ac8 | 141 | @retval EFI_OUT_OF_RESOURCES Not enough memory (system or SMM) to manage this\r |
142 | child.\r | |
143 | @retval EFI_INVALID_PARAMETER DispatchContext is invalid. The ICHN input value\r | |
144 | is not within valid range.\r | |
145 | \r | |
146 | **/\r | |
147 | typedef\r | |
148 | EFI_STATUS\r | |
69686d56 | 149 | (EFIAPI *EFI_SMM_ICHN_REGISTER)(\r |
700a7869 | 150 | IN EFI_SMM_ICHN_DISPATCH_PROTOCOL *This,\r |
151 | IN EFI_SMM_ICHN_DISPATCH DispatchFunction,\r | |
152 | IN EFI_SMM_ICHN_DISPATCH_CONTEXT *DispatchContext,\r | |
153 | OUT EFI_HANDLE *DispatchHandle\r | |
79964ac8 | 154 | );\r |
155 | \r | |
156 | /**\r | |
157 | Unregister a child SMI source dispatch function with a parent SMM driver\r | |
158 | \r | |
f22f941e | 159 | @param This The pointer to the EFI_SMM_ICHN_DISPATCH_PROTOCOL instance.\r |
160 | @param DispatchHandle The handle of the service to remove.\r | |
79964ac8 | 161 | \r |
162 | @retval EFI_SUCCESS The dispatch function has been successfully\r | |
f22f941e | 163 | unregistered, and the SMI source has been disabled,\r |
79964ac8 | 164 | if there are no other registered child dispatch\r |
165 | functions for this SMI source.\r | |
f22f941e | 166 | @retval EFI_INVALID_PARAMETER The handle is invalid.\r |
79964ac8 | 167 | \r |
168 | **/\r | |
169 | typedef\r | |
170 | EFI_STATUS\r | |
69686d56 | 171 | (EFIAPI *EFI_SMM_ICHN_UNREGISTER)(\r |
700a7869 | 172 | IN EFI_SMM_ICHN_DISPATCH_PROTOCOL *This,\r |
173 | IN EFI_HANDLE DispatchHandle\r | |
79964ac8 | 174 | );\r |
175 | \r | |
176 | //\r | |
700a7869 | 177 | // Interface structure for the SMM ICHN specific SMI Dispatch Protocol\r |
79964ac8 | 178 | //\r |
179 | /**\r | |
79964ac8 | 180 | Provides the parent dispatch service for a given SMI source generator.\r |
79964ac8 | 181 | **/\r |
182 | struct _EFI_SMM_ICHN_DISPATCH_PROTOCOL {\r | |
2bbaeb0d | 183 | EFI_SMM_ICHN_REGISTER Register; ///< Installs a child service to be dispatched by this protocol.\r |
184 | EFI_SMM_ICHN_UNREGISTER UnRegister; ///< Removes a child service dispatched by this protocol.\r | |
79964ac8 | 185 | };\r |
186 | \r | |
187 | extern EFI_GUID gEfiSmmIchnDispatchProtocolGuid;\r | |
188 | \r | |
189 | #endif\r |