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