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