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