]>
Commit | Line | Data |
---|---|---|
3cbfba02 DW |
1 | /**\r |
2 | **/\r | |
3 | /**\r | |
4 | \r | |
5 | Copyright (c) 2012 - 2014, Intel Corporation. All rights reserved\r | |
6 | \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 | |
9 | 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 | \r | |
16 | \r | |
17 | @file\r | |
18 | SmmIchnDispatchEx.h\r | |
19 | \r | |
20 | @brief\r | |
21 | SmmIchnDispatch Extended Protocol\r | |
22 | \r | |
23 | **/\r | |
24 | #ifndef _EFI_SMM_ICHN_DISPATCH_EX_H_\r | |
25 | #define _EFI_SMM_ICHN_DISPATCH_EX_H_\r | |
26 | \r | |
27 | #ifdef ECP_FLAG\r | |
28 | #include <Protocol/SmmIchnDispatch/SmmIchnDispatch.h>\r | |
29 | #else\r | |
30 | #include <Protocol/SmmIchnDispatch.h>\r | |
31 | #endif\r | |
32 | \r | |
33 | #define EFI_SMM_ICHN_DISPATCH_EX_PROTOCOL_GUID \\r | |
34 | { \\r | |
35 | 0x3920405b, 0xc897, 0x44da, 0x88, 0xf3, 0x4c, 0x49, 0x8a, 0x6f, 0xf7, 0x36 \\r | |
36 | }\r | |
37 | extern EFI_GUID gEfiSmmIchnDispatchExProtocolGuid;\r | |
38 | \r | |
39 | ///\r | |
40 | /// Forward reference for ANSI C compatibility\r | |
41 | ///\r | |
42 | typedef struct _EFI_SMM_ICHN_DISPATCH_EX_PROTOCOL EFI_SMM_ICHN_DISPATCH_EX_PROTOCOL;\r | |
43 | \r | |
44 | ///\r | |
45 | /// Related Definitions\r | |
46 | ///\r | |
47 | ///\r | |
48 | /// Ichn Dispatch Extended Types\r | |
49 | ///\r | |
50 | typedef enum {\r | |
51 | IchnExPciExpress = NUM_ICHN_TYPES + 1,\r | |
52 | IchnExMonitor,\r | |
53 | IchnExSpi,\r | |
54 | IchnExQRT,\r | |
55 | IchnExGpioUnlock,\r | |
56 | IchnExTmrOverflow,\r | |
57 | IchnExPcie0Hotplug,\r | |
58 | IchnExPcie1Hotplug,\r | |
59 | IchnExPcie2Hotplug,\r | |
60 | IchnExPcie3Hotplug,\r | |
61 | IchnExPcie0LinkActive,\r | |
62 | IchnExPcie1LinkActive,\r | |
63 | IchnExPcie2LinkActive,\r | |
64 | IchnExPcie3LinkActive,\r | |
65 | ///\r | |
66 | /// INSERT NEW ITEMS JUST BEFORE THIS LINE\r | |
67 | ///\r | |
68 | IchnExTypeMAX /// the maximum number of items in this enumeration\r | |
69 | } EFI_SMM_ICHN_EX_SMI_TYPE;\r | |
70 | \r | |
71 | typedef struct {\r | |
72 | EFI_SMM_ICHN_EX_SMI_TYPE Type;\r | |
73 | } EFI_SMM_ICHN_DISPATCH_EX_CONTEXT;\r | |
74 | \r | |
75 | ///\r | |
76 | /// Member functions\r | |
77 | ///\r | |
78 | typedef\r | |
79 | VOID\r | |
80 | (EFIAPI *EFI_SMM_ICHN_DISPATCH_EX) (\r | |
81 | IN EFI_HANDLE DispatchHandle,\r | |
82 | IN EFI_SMM_ICHN_DISPATCH_EX_CONTEXT * DispatchContext\r | |
83 | );\r | |
84 | \r | |
85 | /**\r | |
86 | \r | |
87 | @brief\r | |
88 | Dispatch function for a ICH n Extended specific SMI handler.\r | |
89 | \r | |
90 | @param[in] DispatchHandle Handle of this dispatch function.\r | |
91 | @param[in] DispatchContext Pointer to the dispatch function's context.\r | |
92 | The DispatchContext fields are filled in\r | |
93 | by the dispatching driver prior to\r | |
94 | invoking this dispatch function.\r | |
95 | \r | |
96 | @retval None\r | |
97 | \r | |
98 | **/\r | |
99 | typedef\r | |
100 | EFI_STATUS\r | |
101 | (EFIAPI *EFI_SMM_ICHN_EX_REGISTER) (\r | |
102 | IN EFI_SMM_ICHN_DISPATCH_EX_PROTOCOL * This,\r | |
103 | IN EFI_SMM_ICHN_DISPATCH_EX DispatchFunction,\r | |
104 | IN EFI_SMM_ICHN_DISPATCH_EX_CONTEXT * DispatchContext,\r | |
105 | OUT EFI_HANDLE * DispatchHandle\r | |
106 | );\r | |
107 | \r | |
108 | /**\r | |
109 | \r | |
110 | @brief\r | |
111 | Register a child SMI source dispatch function with a parent SMM driver\r | |
112 | \r | |
113 | @param[in] This Protocol instance pointer.\r | |
114 | @param[in] DispatchFunction Pointer to dispatch function to be invoked for\r | |
115 | this SMI source\r | |
116 | @param[in] DispatchContext Pointer to the dispatch function's context.\r | |
117 | The caller fills this context in before calling\r | |
118 | the register function to indicate to the register\r | |
119 | function the ICHN SMI source for which the dispatch\r | |
120 | function should be invoked.\r | |
121 | @param[in] DispatchHandle Handle of dispatch function, for when interfacing\r | |
122 | with the parent SMM driver.\r | |
123 | \r | |
124 | @retval EFI_SUCCESS The dispatch function has been successfully\r | |
125 | registered and the SMI source has been enabled.\r | |
126 | @retval EFI_DEVICE_ERROR The driver was unable to enable the SMI source.\r | |
127 | @retval EFI_OUT_OF_RESOURCES Not enough memory (system or SMM) to manage this\r | |
128 | child.\r | |
129 | @retval EFI_INVALID_PARAMETER DispatchContext is invalid. The ICHN input value\r | |
130 | is not within valid range.\r | |
131 | \r | |
132 | **/\r | |
133 | typedef\r | |
134 | EFI_STATUS\r | |
135 | (EFIAPI *EFI_SMM_ICHN_EX_UNREGISTER) (\r | |
136 | IN EFI_SMM_ICHN_DISPATCH_EX_PROTOCOL * This,\r | |
137 | IN EFI_HANDLE DispatchHandle\r | |
138 | );\r | |
139 | \r | |
140 | /**\r | |
141 | \r | |
142 | @brief\r | |
143 | Unregister a child SMI source dispatch function with a parent SMM driver\r | |
144 | \r | |
145 | @param[in] This Protocol instance pointer.\r | |
146 | @param[in] DispatchHandle Handle of dispatch function to deregister.\r | |
147 | \r | |
148 | @retval EFI_SUCCESS The dispatch function has been successfully\r | |
149 | unregistered and the SMI source has been disabled\r | |
150 | if there are no other registered child dispatch\r | |
151 | functions for this SMI source.\r | |
152 | @retval EFI_INVALID_PARAMETER Handle is invalid.\r | |
153 | @retval Others TBD\r | |
154 | \r | |
155 | **/\r | |
156 | \r | |
157 | ///\r | |
158 | /// Interface structure for the SMM Ich n specific SMI Dispatch Protocol\r | |
159 | ///\r | |
160 | typedef struct _EFI_SMM_ICHN_DISPATCH_EX_PROTOCOL {\r | |
161 | EFI_SMM_ICHN_EX_REGISTER Register;\r | |
162 | EFI_SMM_ICHN_EX_UNREGISTER UnRegister;\r | |
163 | };\r | |
164 | \r | |
165 | #endif\r |