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