]> git.proxmox.com Git - mirror_edk2.git/blob - EdkCompatibilityPkg/Compatibility/PiSmmStatusCodeOnFrameworkSmmStatusCodeThunk/PiSmmStatusCodeOnFrameworkSmmStatusCodeThunk.h
Add PI SMM Status Code Protocol on Framework SMM Status Code Protocol thunk driver...
[mirror_edk2.git] / EdkCompatibilityPkg / Compatibility / PiSmmStatusCodeOnFrameworkSmmStatusCodeThunk / PiSmmStatusCodeOnFrameworkSmmStatusCodeThunk.h
1 /** @file
2 Include file for PI SMM Status Code Protocol on Framework SMM Status Code Protocol Thunk driver.
3
4 Copyright (c) 2010, Intel Corporation. All rights reserved<BR>
5 This program and the accompanying materials are licensed and made available under
6 the terms and conditions of the BSD License that accompanies this distribution.
7 The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php.
9
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12
13 **/
14
15 #ifndef __PI_SMM_STATUS_CODE_ON_FRAMEWORK_SMM_STATUS_CODE_H__
16 #define __PI_SMM_STATUS_CODE_ON_FRAMEWORK_SMM_STATUS_CODE_H__
17
18
19 #include <Protocol/SmmReportStatusCodeHandler.h>
20 #include <Protocol/SmmStatusCode.h>
21
22 #include <Library/BaseLib.h>
23 #include <Library/DebugLib.h>
24 #include <Library/SynchronizationLib.h>
25 #include <Library/UefiDriverEntryPoint.h>
26 #include <Library/SmmServicesTableLib.h>
27 #include <Library/MemoryAllocationLib.h>
28
29 #define SMM_RSC_HANDLER_CALLBACK_ENTRY_SIGNATURE SIGNATURE_32 ('s', 'h', 'c', 'e')
30
31 typedef struct {
32 UINTN Signature;
33 EFI_SMM_RSC_HANDLER_CALLBACK RscHandlerCallback;
34 LIST_ENTRY Node;
35 } SMM_RSC_HANDLER_CALLBACK_ENTRY;
36
37 /**
38 Register the callback function for ReportStatusCode() notification.
39
40 When this function is called the function pointer is added to an internal list and any future calls to
41 ReportStatusCode() will be forwarded to the Callback function.
42
43 @param[in] Callback A pointer to a function of type EFI_PEI_RSC_HANDLER_CALLBACK that is called
44 when a call to ReportStatusCode() occurs.
45
46 @retval EFI_SUCCESS Function was successfully registered.
47 @retval EFI_INVALID_PARAMETER The callback function was NULL.
48 @retval EFI_OUT_OF_RESOURCES The internal buffer ran out of space. No more functions can be
49 registered.
50 @retval EFI_ALREADY_STARTED The function was already registered. It can't be registered again.
51
52 **/
53 EFI_STATUS
54 EFIAPI
55 Register (
56 IN EFI_SMM_RSC_HANDLER_CALLBACK Callback
57 );
58
59 /**
60 Remove a previously registered callback function from the notification list.
61
62 ReportStatusCode() messages will no longer be forwarded to the Callback function.
63
64 @param[in] Callback A pointer to a function of type EFI_PEI_RSC_HANDLER_CALLBACK that is to be
65 unregistered.
66
67 @retval EFI_SUCCESS The function was successfully unregistered.
68 @retval EFI_INVALID_PARAMETER The callback function was NULL.
69 @retval EFI_NOT_FOUND The callback function was not found to be unregistered.
70
71 **/
72 EFI_STATUS
73 EFIAPI
74 Unregister (
75 IN EFI_SMM_RSC_HANDLER_CALLBACK Callback
76 );
77
78 /**
79 Provides an interface that a software module can call to report a status code.
80
81 @param This EFI_SMM_STATUS_CODE_PROTOCOL instance.
82 @param Type Indicates the type of status code being reported.
83 @param Value Describes the current status of a hardware or software entity.
84 This included information about the class and subclass that is used to
85 classify the entity as well as an operation.
86 @param Instance The enumeration of a hardware or software entity within
87 the system. Valid instance numbers start with 1.
88 @param CallerId This optional parameter may be used to identify the caller.
89 This parameter allows the status code driver to apply different rules to
90 different callers.
91 @param Data This optional parameter may be used to pass additional data.
92
93 @retval EFI_SUCCESS The function completed successfully
94 @retval EFI_DEVICE_ERROR The function should not be completed due to a device error.
95
96 **/
97 EFI_STATUS
98 EFIAPI
99 ReportDispatcher (
100 IN CONST EFI_SMM_STATUS_CODE_PROTOCOL *This,
101 IN EFI_STATUS_CODE_TYPE Type,
102 IN EFI_STATUS_CODE_VALUE Value,
103 IN UINT32 Instance,
104 IN CONST EFI_GUID *CallerId OPTIONAL,
105 IN EFI_STATUS_CODE_DATA *Data OPTIONAL
106 );
107
108 #endif
109 /** @file
110 Include file for PI SMM Status Code Protocol on Framework SMM Status Code Protocol Thunk driver.
111
112 Copyright (c) 2010, Intel Corporation. All rights reserved<BR>
113 This program and the accompanying materials are licensed and made available under
114 the terms and conditions of the BSD License that accompanies this distribution.
115 The full text of the license may be found at
116 http://opensource.org/licenses/bsd-license.php.
117
118 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
119 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
120
121 **/
122
123 #ifndef __PI_SMM_STATUS_CODE_ON_FRAMEWORK_SMM_STATUS_CODE_H__
124 #define __PI_SMM_STATUS_CODE_ON_FRAMEWORK_SMM_STATUS_CODE_H__
125
126
127 #include <Protocol/SmmReportStatusCodeHandler.h>
128 #include <Protocol/SmmStatusCode.h>
129
130 #include <Library/BaseLib.h>
131 #include <Library/DebugLib.h>
132 #include <Library/SynchronizationLib.h>
133 #include <Library/UefiDriverEntryPoint.h>
134 #include <Library/SmmServicesTableLib.h>
135 #include <Library/MemoryAllocationLib.h>
136
137 #define SMM_RSC_HANDLER_CALLBACK_ENTRY_SIGNATURE SIGNATURE_32 ('s', 'h', 'c', 'e')
138
139 typedef struct {
140 UINTN Signature;
141 EFI_SMM_RSC_HANDLER_CALLBACK RscHandlerCallback;
142 LIST_ENTRY Node;
143 } SMM_RSC_HANDLER_CALLBACK_ENTRY;
144
145 /**
146 Register the callback function for ReportStatusCode() notification.
147
148 When this function is called the function pointer is added to an internal list and any future calls to
149 ReportStatusCode() will be forwarded to the Callback function.
150
151 @param[in] Callback A pointer to a function of type EFI_PEI_RSC_HANDLER_CALLBACK that is called
152 when a call to ReportStatusCode() occurs.
153
154 @retval EFI_SUCCESS Function was successfully registered.
155 @retval EFI_INVALID_PARAMETER The callback function was NULL.
156 @retval EFI_OUT_OF_RESOURCES The internal buffer ran out of space. No more functions can be
157 registered.
158 @retval EFI_ALREADY_STARTED The function was already registered. It can't be registered again.
159
160 **/
161 EFI_STATUS
162 EFIAPI
163 Register (
164 IN EFI_SMM_RSC_HANDLER_CALLBACK Callback
165 );
166
167 /**
168 Remove a previously registered callback function from the notification list.
169
170 ReportStatusCode() messages will no longer be forwarded to the Callback function.
171
172 @param[in] Callback A pointer to a function of type EFI_PEI_RSC_HANDLER_CALLBACK that is to be
173 unregistered.
174
175 @retval EFI_SUCCESS The function was successfully unregistered.
176 @retval EFI_INVALID_PARAMETER The callback function was NULL.
177 @retval EFI_NOT_FOUND The callback function was not found to be unregistered.
178
179 **/
180 EFI_STATUS
181 EFIAPI
182 Unregister (
183 IN EFI_SMM_RSC_HANDLER_CALLBACK Callback
184 );
185
186 /**
187 Provides an interface that a software module can call to report a status code.
188
189 @param This EFI_SMM_STATUS_CODE_PROTOCOL instance.
190 @param Type Indicates the type of status code being reported.
191 @param Value Describes the current status of a hardware or software entity.
192 This included information about the class and subclass that is used to
193 classify the entity as well as an operation.
194 @param Instance The enumeration of a hardware or software entity within
195 the system. Valid instance numbers start with 1.
196 @param CallerId This optional parameter may be used to identify the caller.
197 This parameter allows the status code driver to apply different rules to
198 different callers.
199 @param Data This optional parameter may be used to pass additional data.
200
201 @retval EFI_SUCCESS The function completed successfully
202 @retval EFI_DEVICE_ERROR The function should not be completed due to a device error.
203
204 **/
205 EFI_STATUS
206 EFIAPI
207 ReportDispatcher (
208 IN CONST EFI_SMM_STATUS_CODE_PROTOCOL *This,
209 IN EFI_STATUS_CODE_TYPE Type,
210 IN EFI_STATUS_CODE_VALUE Value,
211 IN UINT32 Instance,
212 IN CONST EFI_GUID *CallerId OPTIONAL,
213 IN EFI_STATUS_CODE_DATA *Data OPTIONAL
214 );
215
216 #endif