]> git.proxmox.com Git - mirror_edk2.git/blame - EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/SmmRuntimeDxeReportStatusCodeLib/ReportStatusCodeLib.c
Update the copyright notice format
[mirror_edk2.git] / EdkCompatibilityPkg / Foundation / Library / EdkIIGlueLib / Library / SmmRuntimeDxeReportStatusCodeLib / ReportStatusCodeLib.c
CommitLineData
9e18c9b3
LG
1/*++\r
2\r
2c7e5c2f
HT
3Copyright (c) 2004 - 2010, Intel Corporation. All rights reserved.<BR>\r
4This program and the accompanying materials \r
9e18c9b3
LG
5are licensed and made available under the terms and conditions of the BSD License \r
6which accompanies this distribution. The full text of the license may be found at \r
7http://opensource.org/licenses/bsd-license.php \r
8 \r
9THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
10WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
11\r
12\r
13Module Name:\r
14\r
15 ReportStatusCodeLib.c\r
16 \r
17Abstract: \r
18\r
19 Report Status Code Library for SMM Runtime driver.\r
20\r
21--*/\r
22\r
23#include "ReportStatusCodeLibInternal.h"\r
24\r
25 \r
26EFI_REPORT_STATUS_CODE mReportStatusCode = NULL;\r
27\r
28/**\r
29 Internal worker function that reports a status code through the Status Code Protocol\r
30\r
31 This function checks to see if a Status Code Protocol is present in the handle\r
32 database. If a Status Code Protocol is not present, then EFI_UNSUPPORTED is\r
33 returned. If a Status Code Protocol is present, then it is cached in gStatusCode,\r
34 and the ReportStatusCode() service of the Status Code Protocol is called passing in\r
35 Type, Value, Instance, CallerId, and Data. The result of this call is returned.\r
36\r
37 @param Type Status code type.\r
38 @param Value Status code value.\r
39 @param Instance Status code instance number.\r
40 @param CallerId Pointer to a GUID that identifies the caller of this\r
41 function. This is an optional parameter that may be\r
42 NULL.\r
43 @param Data Pointer to the extended data buffer. This is an\r
44 optional parameter that may be NULL.\r
45\r
46 @retval EFI_SUCCESS The status code was reported.\r
47 @retval EFI_OUT_OF_RESOURCES There were not enough resources to report the status code.\r
48 @retval EFI_UNSUPPORTED Status Code Protocol is not available.\r
49\r
50**/\r
51EFI_STATUS\r
52InternalReportStatusCode (\r
53 IN EFI_STATUS_CODE_TYPE Type,\r
54 IN EFI_STATUS_CODE_VALUE Value,\r
55 IN UINT32 Instance,\r
56 IN CONST EFI_GUID *CallerId OPTIONAL,\r
57 IN EFI_STATUS_CODE_DATA *Data OPTIONAL\r
58 )\r
59{\r
60 //\r
61 // If gStatusCode is NULL, then see if a Status Code Protocol instance is present\r
62 // in the handle database.\r
63 //\r
64 if (mReportStatusCode == NULL) {\r
65 mReportStatusCode = InternalGetReportStatusCode ();\r
66 if (mReportStatusCode == NULL) {\r
67 return EFI_UNSUPPORTED;\r
68 }\r
69 }\r
70\r
71 //\r
72 // A Status Code Protocol is present in the handle database, so pass in all the\r
73 // parameters to the ReportStatusCode() service of the Status Code Protocol\r
74 //\r
75 return (*mReportStatusCode) (Type, Value, Instance, (EFI_GUID *)CallerId, Data);\r
76}\r
77\r
78\r
79/**\r
80 Computes and returns the size, in bytes, of a device path.\r
81\r
82 @param DevicePath A pointer to a device path.\r
83\r
84 @return The size, in bytes, of DevicePath.\r
85\r
86**/\r
87UINTN\r
88InternalReportStatusCodeDevicePathSize (\r
89 IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath\r
90 )\r
91{\r
92 CONST EFI_DEVICE_PATH_PROTOCOL *Start;\r
93\r
94 //\r
95 // Search for the end of the device path structure\r
96 //\r
97 Start = DevicePath;\r
98 while (!IsDevicePathEnd (DevicePath)) {\r
99 DevicePath = NextDevicePathNode (DevicePath);\r
100 }\r
101\r
102 //\r
103 // Subtract the start node from the end node and add in the size of the end node\r
104 //\r
105 return ((UINTN) DevicePath - (UINTN) Start) + DevicePathNodeLength (DevicePath);\r
106}\r
107\r
108\r
109/**\r
110 Converts a status code to an 8-bit POST code value.\r
111\r
112 Converts the status code specified by CodeType and Value to an 8-bit POST code\r
113 and returns the 8-bit POST code in PostCode. If CodeType is an\r
114 EFI_PROGRESS_CODE or CodeType is an EFI_ERROR_CODE, then bits 0..4 of PostCode\r
115 are set to bits 16..20 of Value, and bits 5..7 of PostCode are set to bits\r
116 24..26 of Value., and TRUE is returned. Otherwise, FALSE is returned.\r
117\r
118 If PostCode is NULL, then ASSERT().\r
119\r
120 @param CodeType The type of status code being converted.\r
121 @param Value The status code value being converted.\r
122 @param PostCode A pointer to the 8-bit POST code value to return.\r
123\r
124 @retval TRUE The status code specified by CodeType and Value was converted\r
125 to an 8-bit POST code and returned in PostCode.\r
126 @retval FALSE The status code specified by CodeType and Value could not be\r
127 converted to an 8-bit POST code value.\r
128\r
129**/\r
130BOOLEAN\r
131EFIAPI\r
132GlueCodeTypeToPostCode (\r
133 IN EFI_STATUS_CODE_TYPE CodeType,\r
134 IN EFI_STATUS_CODE_VALUE Value,\r
135 OUT UINT8 *PostCode\r
136 )\r
137{\r
138 //\r
139 // If PostCode is NULL, then ASSERT()\r
140 //\r
141 ASSERT (PostCode != NULL);\r
142\r
143 //\r
144 // Convert Value to an 8 bit post code\r
145 //\r
146 if (((CodeType & EFI_STATUS_CODE_TYPE_MASK) == EFI_PROGRESS_CODE) ||\r
147 ((CodeType & EFI_STATUS_CODE_TYPE_MASK) == EFI_ERROR_CODE) ) {\r
148 *PostCode = (UINT8) ((((Value & EFI_STATUS_CODE_CLASS_MASK) >> 24) << 5) |\r
149 (((Value & EFI_STATUS_CODE_SUBCLASS_MASK) >> 16) & 0x1f));\r
150 return TRUE;\r
151 }\r
152 return FALSE;\r
153}\r
154\r
155\r
156/**\r
157 Extracts ASSERT() information from a status code structure.\r
158\r
159 Converts the status code specified by CodeType, Value, and Data to the ASSERT()\r
160 arguments specified by Filename, Description, and LineNumber. If CodeType is\r
161 an EFI_ERROR_CODE, and CodeType has a severity of EFI_ERROR_UNRECOVERED, and\r
162 Value has an operation mask of EFI_SW_EC_ILLEGAL_SOFTWARE_STATE, extract\r
163 Filename, Description, and LineNumber from the optional data area of the\r
164 status code buffer specified by Data. The optional data area of Data contains\r
165 a Null-terminated ASCII string for the FileName, followed by a Null-terminated\r
166 ASCII string for the Description, followed by a 32-bit LineNumber. If the\r
167 ASSERT() information could be extracted from Data, then return TRUE.\r
168 Otherwise, FALSE is returned.\r
169\r
170 If Data is NULL, then ASSERT().\r
171 If Filename is NULL, then ASSERT().\r
172 If Description is NULL, then ASSERT().\r
173 If LineNumber is NULL, then ASSERT().\r
174\r
175 @param CodeType The type of status code being converted.\r
176 @param Value The status code value being converted.\r
177 @param Data Pointer to status code data buffer.\r
178 @param Filename Pointer to the source file name that generated the ASSERT().\r
179 @param Description Pointer to the description of the ASSERT().\r
180 @param LineNumber Pointer to source line number that generated the ASSERT().\r
181\r
182 @retval TRUE The status code specified by CodeType, Value, and Data was\r
183 converted ASSERT() arguments specified by Filename, Description,\r
184 and LineNumber.\r
185 @retval FALSE The status code specified by CodeType, Value, and Data could\r
186 not be converted to ASSERT() arguments.\r
187\r
188**/\r
189BOOLEAN\r
190EFIAPI\r
191GlueReportStatusCodeExtractAssertInfo (\r
192 IN EFI_STATUS_CODE_TYPE CodeType,\r
193 IN EFI_STATUS_CODE_VALUE Value,\r
194 IN CONST EFI_STATUS_CODE_DATA *Data,\r
195 OUT CHAR8 **Filename,\r
196 OUT CHAR8 **Description,\r
197 OUT UINT32 *LineNumber\r
198 )\r
199{\r
200 EFI_DEBUG_ASSERT_DATA *AssertData;\r
201\r
202 ASSERT (Data != NULL);\r
203 ASSERT (Filename != NULL);\r
204 ASSERT (Description != NULL);\r
205 ASSERT (LineNumber != NULL);\r
206\r
207 if (((CodeType & EFI_STATUS_CODE_TYPE_MASK) == EFI_ERROR_CODE) &&\r
208 ((CodeType & EFI_STATUS_CODE_SEVERITY_MASK) == EFI_ERROR_UNRECOVERED) &&\r
209 ((Value & EFI_STATUS_CODE_OPERATION_MASK) == EFI_SW_EC_ILLEGAL_SOFTWARE_STATE)) {\r
210 AssertData = (EFI_DEBUG_ASSERT_DATA *)(Data + 1);\r
211 *Filename = (CHAR8 *)(AssertData + 1);\r
212 *Description = *Filename + AsciiStrLen (*Filename) + 1;\r
213 *LineNumber = AssertData->LineNumber;\r
214 return TRUE;\r
215 }\r
216 return FALSE;\r
217}\r
218\r
219\r
220/**\r
221 Extracts DEBUG() information from a status code structure.\r
222\r
223 Converts the status code specified by Data to the DEBUG() arguments specified\r
224 by ErrorLevel, Marker, and Format. If type GUID in Data is\r
225 EFI_STATUS_CODE_DATA_TYPE_DEBUG_GUID, then extract ErrorLevel, Marker, and\r
226 Format from the optional data area of the status code buffer specified by Data.\r
227 The optional data area of Data contains a 32-bit ErrorLevel followed by Marker\r
228 which is 12 UINTN parameters, followed by a Null-terminated ASCII string for\r
229 the Format. If the DEBUG() information could be extracted from Data, then\r
230 return TRUE. Otherwise, FALSE is returned.\r
231\r
232 If Data is NULL, then ASSERT().\r
233 If ErrorLevel is NULL, then ASSERT().\r
234 If Marker is NULL, then ASSERT().\r
235 If Format is NULL, then ASSERT().\r
236\r
237 @param Data Pointer to status code data buffer.\r
238 @param ErrorLevel Pointer to error level mask for a debug message.\r
239 @param Marker Pointer to the variable argument list associated with Format.\r
240 @param Format Pointer to a Null-terminated ASCII format string of a\r
241 debug message.\r
242\r
243 @retval TRUE The status code specified by Data was converted DEBUG() arguments\r
244 specified by ErrorLevel, Marker, and Format.\r
245 @retval FALSE The status code specified by Data could not be converted to\r
246 DEBUG() arguments.\r
247\r
248**/\r
249BOOLEAN\r
250EFIAPI\r
251GlueReportStatusCodeExtractDebugInfo (\r
252 IN CONST EFI_STATUS_CODE_DATA *Data,\r
253 OUT UINT32 *ErrorLevel,\r
254 OUT VA_LIST *Marker,\r
255 OUT CHAR8 **Format\r
256 )\r
257{\r
258 EFI_DEBUG_INFO *DebugInfo;\r
259\r
260 ASSERT (Data != NULL);\r
261 ASSERT (ErrorLevel != NULL);\r
262 ASSERT (Marker != NULL);\r
263 ASSERT (Format != NULL);\r
264\r
265 //\r
266 // If the GUID type is not EFI_STATUS_CODE_DATA_TYPE_DEBUG_GUID then return FALSE\r
267 //\r
268 if (!CompareGuid (&Data->Type, &gEfiStatusCodeDataTypeDebugGuid)) {\r
269 return FALSE;\r
270 }\r
271\r
272 //\r
273 // Retrieve the debug information from the status code record\r
274 //\r
275 DebugInfo = (EFI_DEBUG_INFO *)(Data + 1);\r
276\r
277 *ErrorLevel = DebugInfo->ErrorLevel;\r
278\r
279 //\r
280 // The first 12 * UINTN bytes of the string are really an\r
281 // argument stack to support varargs on the Format string.\r
282 //\r
283 *Marker = (VA_LIST) (DebugInfo + 1);\r
284 *Format = (CHAR8 *)(((UINT64 *)*Marker) + 12);\r
285\r
286 return TRUE;\r
287}\r
288\r
289\r
290/**\r
291 Reports a status code.\r
292\r
293 Reports the status code specified by the parameters Type and Value. Status\r
294 code also require an instance, caller ID, and extended data. This function\r
295 passed in a zero instance, NULL extended data, and a caller ID of\r
296 gEfiCallerIdGuid, which is the GUID for the module.\r
297\r
298 ReportStatusCode()must actively prevent recusrsion. If ReportStatusCode()\r
299 is called while processing another any other Report Status Code Library function,\r
300 then ReportStatusCode() must return immediately.\r
301\r
302 @param Type Status code type.\r
303 @param Value Status code value.\r
304\r
305 @retval EFI_SUCCESS The status code was reported.\r
306 @retval EFI_DEVICE_ERROR There status code could not be reported due to a\r
307 device error.\r
308 @retval EFI_UNSUPPORTED Report status code is not supported\r
309\r
310**/\r
311EFI_STATUS\r
312EFIAPI\r
313GlueReportStatusCode (\r
314 IN EFI_STATUS_CODE_TYPE Type,\r
315 IN EFI_STATUS_CODE_VALUE Value\r
316 )\r
317{\r
318 return InternalReportStatusCode (Type, Value, 0, &gEfiCallerIdGuid, NULL);\r
319}\r
320\r
321\r
322/**\r
323 Reports a status code with a Device Path Protocol as the extended data.\r
324\r
325 Allocates and fills in the extended data section of a status code with the\r
326 Device Path Protocol specified by DevicePath. This function is responsible\r
327 for allocating a buffer large enough for the standard header and the device\r
328 path. The standard header is filled in with a GUID of\r
329 gEfiStatusCodeSpecificDataGuid. The status code is reported with a zero\r
330 instance and a caller ID of gEfiCallerIdGuid.\r
331\r
332 ReportStatusCodeWithDevicePath()must actively prevent recursion. If\r
333 ReportStatusCodeWithDevicePath() is called while processing another any other\r
334 Report Status Code Library function, then ReportStatusCodeWithDevicePath()\r
335 must return EFI_DEVICE_ERROR immediately.\r
336\r
337 If DevicePath is NULL, then ASSERT().\r
338\r
339 @param Type Status code type.\r
340 @param Value Status code value.\r
341 @param DevicePath Pointer to the Device Path Protocol to be reported.\r
342\r
343 @retval EFI_SUCCESS The status code was reported with the extended\r
344 data specified by DevicePath.\r
345 @retval EFI_OUT_OF_RESOURCES There were not enough resources to allocate the\r
346 extended data section.\r
347 @retval EFI_UNSUPPORTED Report status code is not supported\r
348\r
349**/\r
350EFI_STATUS\r
351EFIAPI\r
352GlueReportStatusCodeWithDevicePath (\r
353 IN EFI_STATUS_CODE_TYPE Type,\r
354 IN EFI_STATUS_CODE_VALUE Value,\r
355 IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath\r
356 )\r
357{\r
358 ASSERT (DevicePath != NULL);\r
359 return ReportStatusCodeWithExtendedData (\r
360 Type,\r
361 Value,\r
362 (VOID *)DevicePath,\r
363 InternalReportStatusCodeDevicePathSize (DevicePath)\r
364 );\r
365}\r
366\r
367\r
368/**\r
369 Reports a status code with an extended data buffer.\r
370\r
371 Allocates and fills in the extended data section of a status code with the\r
372 extended data specified by ExtendedData and ExtendedDataSize. ExtendedData\r
373 is assumed to be one of the data structures specified in Related Definitions.\r
374 These data structure do not have the standard header, so this function is\r
375 responsible for allocating a buffer large enough for the standard header and\r
376 the extended data passed into this function. The standard header is filled\r
377 in with a GUID of gEfiStatusCodeSpecificDataGuid. The status code is reported\r
378 with a zero instance and a caller ID of gEfiCallerIdGuid.\r
379\r
380 ReportStatusCodeWithExtendedData()must actively prevent recursion. If\r
381 ReportStatusCodeWithExtendedData() is called while processing another any other\r
382 Report Status Code Library function, then ReportStatusCodeWithExtendedData()\r
383 must return EFI_DEVICE_ERROR immediately.\r
384\r
385 If ExtendedData is NULL, then ASSERT().\r
386 If ExtendedDataSize is 0, then ASSERT().\r
387\r
388 @param Type Status code type.\r
389 @param Value Status code value.\r
390 @param ExtendedData Pointer to the extended data buffer to be reported.\r
391 @param ExtendedDataSize The size, in bytes, of the extended data buffer to\r
392 be reported.\r
393\r
394 @retval EFI_SUCCESS The status code was reported with the extended\r
395 data specified by ExtendedData and ExtendedDataSize.\r
396 @retval EFI_OUT_OF_RESOURCES There were not enough resources to allocate the\r
397 extended data section.\r
398 @retval EFI_UNSUPPORTED Report status code is not supported\r
399\r
400**/\r
401EFI_STATUS\r
402EFIAPI\r
403GlueReportStatusCodeWithExtendedData (\r
404 IN EFI_STATUS_CODE_TYPE Type,\r
405 IN EFI_STATUS_CODE_VALUE Value,\r
406 IN CONST VOID *ExtendedData,\r
407 IN UINTN ExtendedDataSize\r
408 )\r
409{\r
410 ASSERT (ExtendedData != NULL);\r
411 ASSERT (ExtendedDataSize != 0);\r
412 return ReportStatusCodeEx (\r
413 Type,\r
414 Value,\r
415 0,\r
416 NULL,\r
417 NULL,\r
418 ExtendedData,\r
419 ExtendedDataSize\r
420 );\r
421}\r
422\r
423\r
424/**\r
425 Reports a status code with full parameters.\r
426\r
427 The function reports a status code. If ExtendedData is NULL and ExtendedDataSize\r
428 is 0, then an extended data buffer is not reported. If ExtendedData is not\r
429 NULL and ExtendedDataSize is not 0, then an extended data buffer is allocated.\r
430 ExtendedData is assumed not have the standard status code header, so this function\r
431 is responsible for allocating a buffer large enough for the standard header and\r
432 the extended data passed into this function. The standard header is filled in\r
433 with a GUID specified by ExtendedDataGuid. If ExtendedDataGuid is NULL, then a\r
434 GUID of gEfiStatusCodeSpecificDatauid is used. The status code is reported with\r
435 an instance specified by Instance and a caller ID specified by CallerId. If\r
436 CallerId is NULL, then a caller ID of gEfiCallerIdGuid is used.\r
437\r
438 ReportStatusCodeEx()must actively prevent recursion. If\r
439 ReportStatusCodeEx() is called while processing another any\r
440 other Report Status Code Library function, then\r
441 ReportStatusCodeEx() must return EFI_DEVICE_ERROR immediately.\r
442\r
443 If ExtendedData is NULL and ExtendedDataSize is not zero, then ASSERT().\r
444 If ExtendedData is not NULL and ExtendedDataSize is zero, then ASSERT().\r
445\r
446 @param Type Status code type.\r
447 @param Value Status code value.\r
448 @param Instance Status code instance number.\r
449 @param CallerId Pointer to a GUID that identifies the caller of this\r
450 function. If this parameter is NULL, then a caller\r
451 ID of gEfiCallerIdGuid is used.\r
452 @param ExtendedDataGuid Pointer to the GUID for the extended data buffer.\r
453 If this parameter is NULL, then a the status code\r
454 standard header is filled in with\r
455 gEfiStatusCodeSpecificDataGuid.\r
456 @param ExtendedData Pointer to the extended data buffer. This is an\r
457 optional parameter that may be NULL.\r
458 @param ExtendedDataSize The size, in bytes, of the extended data buffer.\r
459\r
460 @retval EFI_SUCCESS The status code was reported.\r
461 @retval EFI_OUT_OF_RESOURCES There were not enough resources to allocate\r
462 the extended data section if it was specified.\r
463 @retval EFI_UNSUPPORTED Report status code is not supported\r
464\r
465**/\r
466EFI_STATUS\r
467EFIAPI\r
468GlueReportStatusCodeEx (\r
469 IN EFI_STATUS_CODE_TYPE Type,\r
470 IN EFI_STATUS_CODE_VALUE Value,\r
471 IN UINT32 Instance,\r
472 IN CONST EFI_GUID *CallerId OPTIONAL,\r
473 IN CONST EFI_GUID *ExtendedDataGuid OPTIONAL,\r
474 IN CONST VOID *ExtendedData OPTIONAL,\r
475 IN UINTN ExtendedDataSize\r
476 )\r
477{\r
478 EFI_STATUS Status;\r
479\r
480 Status = InternalReportStatusCodeEx (\r
481 Type,\r
482 Value,\r
483 Instance,\r
484 CallerId,\r
485 ExtendedDataGuid,\r
486 ExtendedData,\r
487 ExtendedDataSize\r
488 );\r
489\r
490 return Status;\r
491}\r
492\r
493\r
494/**\r
495 Returns TRUE if status codes of type EFI_PROGRESS_CODE are enabled\r
496\r
497 This function returns TRUE if the REPORT_STATUS_CODE_PROPERTY_PROGRESS_CODE_ENABLED\r
498 bit of PcdReportStatusCodeProperyMask is set. Otherwise FALSE is returned.\r
499\r
500 @retval TRUE The REPORT_STATUS_CODE_PROPERTY_PROGRESS_CODE_ENABLED bit of\r
501 PcdReportStatusCodeProperyMask is set.\r
502 @retval FALSE The REPORT_STATUS_CODE_PROPERTY_PROGRESS_CODE_ENABLED bit of\r
503 PcdReportStatusCodeProperyMask is clear.\r
504\r
505**/\r
506BOOLEAN\r
507EFIAPI\r
508GlueReportProgressCodeEnabled (\r
509 VOID\r
510 )\r
511{\r
512 return (BOOLEAN) ((PcdGet8(PcdReportStatusCodePropertyMask) & REPORT_STATUS_CODE_PROPERTY_PROGRESS_CODE_ENABLED) != 0);\r
513}\r
514\r
515\r
516/**\r
517 Returns TRUE if status codes of type EFI_ERROR_CODE are enabled\r
518\r
519 This function returns TRUE if the REPORT_STATUS_CODE_PROPERTY_ERROR_CODE_ENABLED\r
520 bit of PcdReportStatusCodeProperyMask is set. Otherwise FALSE is returned.\r
521\r
522 @retval TRUE The REPORT_STATUS_CODE_PROPERTY_ERROR_CODE_ENABLED bit of\r
523 PcdReportStatusCodeProperyMask is set.\r
524 @retval FALSE The REPORT_STATUS_CODE_PROPERTY_ERROR_CODE_ENABLED bit of\r
525 PcdReportStatusCodeProperyMask is clear.\r
526\r
527**/\r
528BOOLEAN\r
529EFIAPI\r
530GlueReportErrorCodeEnabled (\r
531 VOID\r
532 )\r
533{\r
534 return (BOOLEAN) ((PcdGet8(PcdReportStatusCodePropertyMask) & REPORT_STATUS_CODE_PROPERTY_ERROR_CODE_ENABLED) != 0);\r
535}\r
536\r
537\r
538/**\r
539 Returns TRUE if status codes of type EFI_DEBUG_CODE are enabled\r
540\r
541 This function returns TRUE if the REPORT_STATUS_CODE_PROPERTY_DEBUG_CODE_ENABLED\r
542 bit of PcdReportStatusCodeProperyMask is set. Otherwise FALSE is returned.\r
543\r
544 @retval TRUE The REPORT_STATUS_CODE_PROPERTY_DEBUG_CODE_ENABLED bit of\r
545 PcdReportStatusCodeProperyMask is set.\r
546 @retval FALSE The REPORT_STATUS_CODE_PROPERTY_DEBUG_CODE_ENABLED bit of\r
547 PcdReportStatusCodeProperyMask is clear.\r
548\r
549**/\r
550BOOLEAN\r
551EFIAPI\r
552GlueReportDebugCodeEnabled (\r
553 VOID\r
554 )\r
555{\r
556 return (BOOLEAN) ((PcdGet8(PcdReportStatusCodePropertyMask) & REPORT_STATUS_CODE_PROPERTY_DEBUG_CODE_ENABLED) != 0);\r
557}\r