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