]> git.proxmox.com Git - mirror_edk2.git/blame - EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/SmmRuntimeDxeReportStatusCodeLib/ReportStatusCodeLib.c
EdkCompatabilityPkg: Fix build issues with X64 clang
[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
271d2c7f 283#ifdef __APPLE__\r
284 // This is non portable C code you can't assume VA_LIST is pointer\r
285 return FALSE;\r
286#else\r
9e18c9b3 287 *Marker = (VA_LIST) (DebugInfo + 1);\r
271d2c7f 288#endif\r
9e18c9b3
LG
289 *Format = (CHAR8 *)(((UINT64 *)*Marker) + 12);\r
290\r
291 return TRUE;\r
292}\r
293\r
294\r
295/**\r
296 Reports a status code.\r
297\r
298 Reports the status code specified by the parameters Type and Value. Status\r
299 code also require an instance, caller ID, and extended data. This function\r
300 passed in a zero instance, NULL extended data, and a caller ID of\r
301 gEfiCallerIdGuid, which is the GUID for the module.\r
302\r
303 ReportStatusCode()must actively prevent recusrsion. If ReportStatusCode()\r
304 is called while processing another any other Report Status Code Library function,\r
305 then ReportStatusCode() must return immediately.\r
306\r
307 @param Type Status code type.\r
308 @param Value Status code value.\r
309\r
310 @retval EFI_SUCCESS The status code was reported.\r
311 @retval EFI_DEVICE_ERROR There status code could not be reported due to a\r
312 device error.\r
313 @retval EFI_UNSUPPORTED Report status code is not supported\r
314\r
315**/\r
316EFI_STATUS\r
317EFIAPI\r
318GlueReportStatusCode (\r
319 IN EFI_STATUS_CODE_TYPE Type,\r
320 IN EFI_STATUS_CODE_VALUE Value\r
321 )\r
322{\r
323 return InternalReportStatusCode (Type, Value, 0, &gEfiCallerIdGuid, NULL);\r
324}\r
325\r
326\r
327/**\r
328 Reports a status code with a Device Path Protocol as the extended data.\r
329\r
330 Allocates and fills in the extended data section of a status code with the\r
331 Device Path Protocol specified by DevicePath. This function is responsible\r
332 for allocating a buffer large enough for the standard header and the device\r
333 path. The standard header is filled in with a GUID of\r
334 gEfiStatusCodeSpecificDataGuid. The status code is reported with a zero\r
335 instance and a caller ID of gEfiCallerIdGuid.\r
336\r
337 ReportStatusCodeWithDevicePath()must actively prevent recursion. If\r
338 ReportStatusCodeWithDevicePath() is called while processing another any other\r
339 Report Status Code Library function, then ReportStatusCodeWithDevicePath()\r
340 must return EFI_DEVICE_ERROR immediately.\r
341\r
342 If DevicePath is NULL, then ASSERT().\r
343\r
344 @param Type Status code type.\r
345 @param Value Status code value.\r
346 @param DevicePath Pointer to the Device Path Protocol to be reported.\r
347\r
348 @retval EFI_SUCCESS The status code was reported with the extended\r
349 data specified by DevicePath.\r
350 @retval EFI_OUT_OF_RESOURCES There were not enough resources to allocate the\r
351 extended data section.\r
352 @retval EFI_UNSUPPORTED Report status code is not supported\r
353\r
354**/\r
355EFI_STATUS\r
356EFIAPI\r
357GlueReportStatusCodeWithDevicePath (\r
358 IN EFI_STATUS_CODE_TYPE Type,\r
359 IN EFI_STATUS_CODE_VALUE Value,\r
360 IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath\r
361 )\r
362{\r
363 ASSERT (DevicePath != NULL);\r
364 return ReportStatusCodeWithExtendedData (\r
365 Type,\r
366 Value,\r
367 (VOID *)DevicePath,\r
368 InternalReportStatusCodeDevicePathSize (DevicePath)\r
369 );\r
370}\r
371\r
372\r
373/**\r
374 Reports a status code with an extended data buffer.\r
375\r
376 Allocates and fills in the extended data section of a status code with the\r
377 extended data specified by ExtendedData and ExtendedDataSize. ExtendedData\r
378 is assumed to be one of the data structures specified in Related Definitions.\r
379 These data structure do not have the standard header, so this function is\r
380 responsible for allocating a buffer large enough for the standard header and\r
381 the extended data passed into this function. The standard header is filled\r
382 in with a GUID of gEfiStatusCodeSpecificDataGuid. The status code is reported\r
383 with a zero instance and a caller ID of gEfiCallerIdGuid.\r
384\r
385 ReportStatusCodeWithExtendedData()must actively prevent recursion. If\r
386 ReportStatusCodeWithExtendedData() is called while processing another any other\r
387 Report Status Code Library function, then ReportStatusCodeWithExtendedData()\r
388 must return EFI_DEVICE_ERROR immediately.\r
389\r
390 If ExtendedData is NULL, then ASSERT().\r
391 If ExtendedDataSize is 0, then ASSERT().\r
392\r
393 @param Type Status code type.\r
394 @param Value Status code value.\r
395 @param ExtendedData Pointer to the extended data buffer to be reported.\r
396 @param ExtendedDataSize The size, in bytes, of the extended data buffer to\r
397 be reported.\r
398\r
399 @retval EFI_SUCCESS The status code was reported with the extended\r
400 data specified by ExtendedData and ExtendedDataSize.\r
401 @retval EFI_OUT_OF_RESOURCES There were not enough resources to allocate the\r
402 extended data section.\r
403 @retval EFI_UNSUPPORTED Report status code is not supported\r
404\r
405**/\r
406EFI_STATUS\r
407EFIAPI\r
408GlueReportStatusCodeWithExtendedData (\r
409 IN EFI_STATUS_CODE_TYPE Type,\r
410 IN EFI_STATUS_CODE_VALUE Value,\r
411 IN CONST VOID *ExtendedData,\r
412 IN UINTN ExtendedDataSize\r
413 )\r
414{\r
415 ASSERT (ExtendedData != NULL);\r
416 ASSERT (ExtendedDataSize != 0);\r
417 return ReportStatusCodeEx (\r
418 Type,\r
419 Value,\r
420 0,\r
421 NULL,\r
422 NULL,\r
423 ExtendedData,\r
424 ExtendedDataSize\r
425 );\r
426}\r
427\r
428\r
429/**\r
430 Reports a status code with full parameters.\r
431\r
432 The function reports a status code. If ExtendedData is NULL and ExtendedDataSize\r
433 is 0, then an extended data buffer is not reported. If ExtendedData is not\r
434 NULL and ExtendedDataSize is not 0, then an extended data buffer is allocated.\r
435 ExtendedData is assumed not have the standard status code header, so this function\r
436 is responsible for allocating a buffer large enough for the standard header and\r
437 the extended data passed into this function. The standard header is filled in\r
438 with a GUID specified by ExtendedDataGuid. If ExtendedDataGuid is NULL, then a\r
439 GUID of gEfiStatusCodeSpecificDatauid is used. The status code is reported with\r
440 an instance specified by Instance and a caller ID specified by CallerId. If\r
441 CallerId is NULL, then a caller ID of gEfiCallerIdGuid is used.\r
442\r
443 ReportStatusCodeEx()must actively prevent recursion. If\r
444 ReportStatusCodeEx() is called while processing another any\r
445 other Report Status Code Library function, then\r
446 ReportStatusCodeEx() must return EFI_DEVICE_ERROR immediately.\r
447\r
448 If ExtendedData is NULL and ExtendedDataSize is not zero, then ASSERT().\r
449 If ExtendedData is not NULL and ExtendedDataSize is zero, then ASSERT().\r
450\r
451 @param Type Status code type.\r
452 @param Value Status code value.\r
453 @param Instance Status code instance number.\r
454 @param CallerId Pointer to a GUID that identifies the caller of this\r
455 function. If this parameter is NULL, then a caller\r
456 ID of gEfiCallerIdGuid is used.\r
457 @param ExtendedDataGuid Pointer to the GUID for the extended data buffer.\r
458 If this parameter is NULL, then a the status code\r
459 standard header is filled in with\r
460 gEfiStatusCodeSpecificDataGuid.\r
461 @param ExtendedData Pointer to the extended data buffer. This is an\r
462 optional parameter that may be NULL.\r
463 @param ExtendedDataSize The size, in bytes, of the extended data buffer.\r
464\r
465 @retval EFI_SUCCESS The status code was reported.\r
466 @retval EFI_OUT_OF_RESOURCES There were not enough resources to allocate\r
467 the extended data section if it was specified.\r
468 @retval EFI_UNSUPPORTED Report status code is not supported\r
469\r
470**/\r
471EFI_STATUS\r
472EFIAPI\r
473GlueReportStatusCodeEx (\r
474 IN EFI_STATUS_CODE_TYPE Type,\r
475 IN EFI_STATUS_CODE_VALUE Value,\r
476 IN UINT32 Instance,\r
477 IN CONST EFI_GUID *CallerId OPTIONAL,\r
478 IN CONST EFI_GUID *ExtendedDataGuid OPTIONAL,\r
479 IN CONST VOID *ExtendedData OPTIONAL,\r
480 IN UINTN ExtendedDataSize\r
481 )\r
482{\r
483 EFI_STATUS Status;\r
484\r
485 Status = InternalReportStatusCodeEx (\r
486 Type,\r
487 Value,\r
488 Instance,\r
489 CallerId,\r
490 ExtendedDataGuid,\r
491 ExtendedData,\r
492 ExtendedDataSize\r
493 );\r
494\r
495 return Status;\r
496}\r
497\r
498\r
499/**\r
500 Returns TRUE if status codes of type EFI_PROGRESS_CODE are enabled\r
501\r
502 This function returns TRUE if the REPORT_STATUS_CODE_PROPERTY_PROGRESS_CODE_ENABLED\r
503 bit of PcdReportStatusCodeProperyMask is set. Otherwise FALSE is returned.\r
504\r
505 @retval TRUE The REPORT_STATUS_CODE_PROPERTY_PROGRESS_CODE_ENABLED bit of\r
506 PcdReportStatusCodeProperyMask is set.\r
507 @retval FALSE The REPORT_STATUS_CODE_PROPERTY_PROGRESS_CODE_ENABLED bit of\r
508 PcdReportStatusCodeProperyMask is clear.\r
509\r
510**/\r
511BOOLEAN\r
512EFIAPI\r
513GlueReportProgressCodeEnabled (\r
514 VOID\r
515 )\r
516{\r
517 return (BOOLEAN) ((PcdGet8(PcdReportStatusCodePropertyMask) & REPORT_STATUS_CODE_PROPERTY_PROGRESS_CODE_ENABLED) != 0);\r
518}\r
519\r
520\r
521/**\r
522 Returns TRUE if status codes of type EFI_ERROR_CODE are enabled\r
523\r
524 This function returns TRUE if the REPORT_STATUS_CODE_PROPERTY_ERROR_CODE_ENABLED\r
525 bit of PcdReportStatusCodeProperyMask is set. Otherwise FALSE is returned.\r
526\r
527 @retval TRUE The REPORT_STATUS_CODE_PROPERTY_ERROR_CODE_ENABLED bit of\r
528 PcdReportStatusCodeProperyMask is set.\r
529 @retval FALSE The REPORT_STATUS_CODE_PROPERTY_ERROR_CODE_ENABLED bit of\r
530 PcdReportStatusCodeProperyMask is clear.\r
531\r
532**/\r
533BOOLEAN\r
534EFIAPI\r
535GlueReportErrorCodeEnabled (\r
536 VOID\r
537 )\r
538{\r
539 return (BOOLEAN) ((PcdGet8(PcdReportStatusCodePropertyMask) & REPORT_STATUS_CODE_PROPERTY_ERROR_CODE_ENABLED) != 0);\r
540}\r
541\r
542\r
543/**\r
544 Returns TRUE if status codes of type EFI_DEBUG_CODE are enabled\r
545\r
546 This function returns TRUE if the REPORT_STATUS_CODE_PROPERTY_DEBUG_CODE_ENABLED\r
547 bit of PcdReportStatusCodeProperyMask is set. Otherwise FALSE is returned.\r
548\r
549 @retval TRUE The REPORT_STATUS_CODE_PROPERTY_DEBUG_CODE_ENABLED bit of\r
550 PcdReportStatusCodeProperyMask is set.\r
551 @retval FALSE The REPORT_STATUS_CODE_PROPERTY_DEBUG_CODE_ENABLED bit of\r
552 PcdReportStatusCodeProperyMask is clear.\r
553\r
554**/\r
555BOOLEAN\r
556EFIAPI\r
557GlueReportDebugCodeEnabled (\r
558 VOID\r
559 )\r
560{\r
561 return (BOOLEAN) ((PcdGet8(PcdReportStatusCodePropertyMask) & REPORT_STATUS_CODE_PROPERTY_DEBUG_CODE_ENABLED) != 0);\r
562}\r