]> git.proxmox.com Git - mirror_edk2.git/blame - MdeModulePkg/Library/SmmReportStatusCodeLib/ReportStatusCodeLib.c
BaseTools:Change the path of the file that Binary Cache
[mirror_edk2.git] / MdeModulePkg / Library / SmmReportStatusCodeLib / ReportStatusCodeLib.c
CommitLineData
c5631cef 1/** @file\r
2 Report Status Code Library for SMM Phase.\r
3\r
d1102dba 4 Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
9d510e61 5 SPDX-License-Identifier: BSD-2-Clause-Patent\r
c5631cef 6\r
7**/\r
8\r
9#include <Library/ReportStatusCodeLib.h>\r
10#include <Library/DebugLib.h>\r
11#include <Library/SmmServicesTableLib.h>\r
12#include <Library/BaseLib.h>\r
13#include <Library/BaseMemoryLib.h>\r
14#include <Library/PcdLib.h>\r
300240b6 15#include <Library/MemoryAllocationLib.h>\r
c5631cef 16\r
17#include <Guid/StatusCodeDataTypeId.h>\r
18#include <Guid/StatusCodeDataTypeDebug.h>\r
19#include <Protocol/SmmStatusCode.h>\r
20\r
21EFI_SMM_REPORT_STATUS_CODE mReportStatusCode = NULL;\r
22EFI_SMM_STATUS_CODE_PROTOCOL *mStatusCodeProtocol = NULL;\r
23\r
24\r
25/**\r
26 Locate the report status code service.\r
27\r
28 @return Function pointer to the report status code service.\r
29 NULL is returned if no status code service is available.\r
30\r
31**/\r
32EFI_SMM_REPORT_STATUS_CODE\r
33InternalGetReportStatusCode (\r
34 VOID\r
35 )\r
36{\r
37 EFI_STATUS Status;\r
38\r
39 Status = gSmst->SmmLocateProtocol (&gEfiSmmStatusCodeProtocolGuid, NULL, (VOID**)&mStatusCodeProtocol);\r
40 if (!EFI_ERROR (Status) && mStatusCodeProtocol != NULL) {\r
41 return mStatusCodeProtocol->ReportStatusCode;\r
42 }\r
43 return NULL;\r
44}\r
45\r
46/**\r
47 Internal worker function that reports a status code through the status code service.\r
48\r
49 If status code service is not cached, then this function checks if status code service is\r
50 available in system. If status code service is not available, then EFI_UNSUPPORTED is\r
51 returned. If status code service is present, then it is cached in mReportStatusCode.\r
52 Finally this function reports status code through the status code service.\r
53\r
54 @param Type Status code type.\r
55 @param Value Status code value.\r
56 @param Instance Status code instance number.\r
57 @param CallerId Pointer to a GUID that identifies the caller of this\r
58 function. This is an optional parameter that may be\r
59 NULL.\r
60 @param Data Pointer to the extended data buffer. This is an\r
61 optional parameter that may be NULL.\r
62\r
63 @retval EFI_SUCCESS The status code was reported.\r
64 @retval EFI_UNSUPPORTED Status code service is not available.\r
65 @retval EFI_UNSUPPORTED Status code type is not supported.\r
66\r
67**/\r
68EFI_STATUS\r
69InternalReportStatusCode (\r
70 IN EFI_STATUS_CODE_TYPE Type,\r
71 IN EFI_STATUS_CODE_VALUE Value,\r
72 IN UINT32 Instance,\r
73 IN CONST EFI_GUID *CallerId OPTIONAL,\r
74 IN EFI_STATUS_CODE_DATA *Data OPTIONAL\r
75 )\r
76{\r
77 if ((ReportProgressCodeEnabled() && ((Type) & EFI_STATUS_CODE_TYPE_MASK) == EFI_PROGRESS_CODE) ||\r
78 (ReportErrorCodeEnabled() && ((Type) & EFI_STATUS_CODE_TYPE_MASK) == EFI_ERROR_CODE) ||\r
79 (ReportDebugCodeEnabled() && ((Type) & EFI_STATUS_CODE_TYPE_MASK) == EFI_DEBUG_CODE)) {\r
80 //\r
81 // If mReportStatusCode is NULL, then check if status code service is available in system.\r
82 //\r
83 if (mReportStatusCode == NULL) {\r
84 mReportStatusCode = InternalGetReportStatusCode ();\r
85 if (mReportStatusCode == NULL) {\r
86 return EFI_UNSUPPORTED;\r
87 }\r
88 }\r
d1102dba 89\r
c5631cef 90 //\r
91 // A status code service is present in system, so pass in all the parameters to the service.\r
92 //\r
93 return (*mReportStatusCode) (mStatusCodeProtocol, Type, Value, Instance, (EFI_GUID *)CallerId, Data);\r
94 }\r
d1102dba 95\r
c5631cef 96 return EFI_UNSUPPORTED;\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 BASE_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 * sizeof (UINT64) bytes following EFI_DEBUG_INFO are for variable arguments\r
272 // of format in DEBUG string. Its address is returned in Marker and has to be 64-bit aligned.\r
273 // It must be noticed that EFI_DEBUG_INFO follows EFI_STATUS_CODE_DATA, whose size is\r
274 // 20 bytes. The size of EFI_DEBUG_INFO is 4 bytes, so we can ensure that Marker\r
275 // returned is 64-bit aligned.\r
276 // 64-bit aligned is a must, otherwise retrieving 64-bit parameter from BASE_LIST will\r
277 // cause unalignment exception.\r
278 //\r
279 *Marker = (BASE_LIST) (DebugInfo + 1);\r
280 *Format = (CHAR8 *)(((UINT64 *)*Marker) + 12);\r
281\r
282 return TRUE;\r
283}\r
284\r
285\r
286/**\r
287 Reports a status code.\r
288\r
289 Reports the status code specified by the parameters Type and Value. Status\r
290 code also require an instance, caller ID, and extended data. This function\r
291 passed in a zero instance, NULL extended data, and a caller ID of\r
292 gEfiCallerIdGuid, which is the GUID for the module.\r
293\r
294 ReportStatusCode()must actively prevent recusrsion. If ReportStatusCode()\r
295 is called while processing another any other Report Status Code Library function,\r
296 then ReportStatusCode() must return immediately.\r
297\r
298 @param Type Status code type.\r
299 @param Value Status code value.\r
300\r
301 @retval EFI_SUCCESS The status code was reported.\r
302 @retval EFI_DEVICE_ERROR There status code could not be reported due to a\r
303 device error.\r
304 @retval EFI_UNSUPPORTED Report status code is not supported\r
305\r
306**/\r
307EFI_STATUS\r
308EFIAPI\r
309ReportStatusCode (\r
310 IN EFI_STATUS_CODE_TYPE Type,\r
311 IN EFI_STATUS_CODE_VALUE Value\r
312 )\r
313{\r
314 return InternalReportStatusCode (Type, Value, 0, &gEfiCallerIdGuid, NULL);\r
315}\r
316\r
317\r
318/**\r
319 Reports a status code with an extended data buffer.\r
320\r
321 Allocates and fills in the extended data section of a status code with the\r
322 extended data specified by ExtendedData and ExtendedDataSize. ExtendedData\r
323 is assumed to be one of the data structures specified in Related Definitions.\r
324 These data structure do not have the standard header, so this function is\r
325 responsible for allocating a buffer large enough for the standard header and\r
326 the extended data passed into this function. The standard header is filled\r
327 in with a GUID of gEfiStatusCodeSpecificDataGuid. The status code is reported\r
328 with a zero instance and a caller ID of gEfiCallerIdGuid.\r
329\r
330 ReportStatusCodeWithExtendedData()must actively prevent recursion. If\r
331 ReportStatusCodeWithExtendedData() is called while processing another any other\r
332 Report Status Code Library function, then ReportStatusCodeWithExtendedData()\r
333 must return EFI_DEVICE_ERROR immediately.\r
334\r
335 If ExtendedData is NULL, then ASSERT().\r
336 If ExtendedDataSize is 0, then ASSERT().\r
337\r
338 @param Type Status code type.\r
339 @param Value Status code value.\r
340 @param ExtendedData Pointer to the extended data buffer to be reported.\r
341 @param ExtendedDataSize The size, in bytes, of the extended data buffer to\r
342 be reported.\r
343\r
344 @retval EFI_SUCCESS The status code was reported with the extended\r
345 data specified by ExtendedData and ExtendedDataSize.\r
346 @retval EFI_OUT_OF_RESOURCES There were not enough resources to allocate the\r
347 extended data section.\r
348 @retval EFI_UNSUPPORTED Report status code is not supported\r
349\r
350**/\r
351EFI_STATUS\r
352EFIAPI\r
353ReportStatusCodeWithExtendedData (\r
354 IN EFI_STATUS_CODE_TYPE Type,\r
355 IN EFI_STATUS_CODE_VALUE Value,\r
356 IN CONST VOID *ExtendedData,\r
357 IN UINTN ExtendedDataSize\r
358 )\r
359{\r
360 ASSERT (ExtendedData != NULL);\r
361 ASSERT (ExtendedDataSize != 0);\r
362 return ReportStatusCodeEx (\r
363 Type,\r
364 Value,\r
365 0,\r
366 NULL,\r
367 NULL,\r
368 ExtendedData,\r
369 ExtendedDataSize\r
370 );\r
371}\r
372\r
373\r
374/**\r
375 Reports a status code with full parameters.\r
376\r
377 The function reports a status code. If ExtendedData is NULL and ExtendedDataSize\r
378 is 0, then an extended data buffer is not reported. If ExtendedData is not\r
379 NULL and ExtendedDataSize is not 0, then an extended data buffer is allocated.\r
380 ExtendedData is assumed not have the standard status code header, so this function\r
381 is responsible for allocating a buffer large enough for the standard header and\r
382 the extended data passed into this function. The standard header is filled in\r
383 with a GUID specified by ExtendedDataGuid. If ExtendedDataGuid is NULL, then a\r
384 GUID of gEfiStatusCodeSpecificDataGuid is used. The status code is reported with\r
385 an instance specified by Instance and a caller ID specified by CallerId. If\r
386 CallerId is NULL, then a caller ID of gEfiCallerIdGuid is used.\r
387\r
388 ReportStatusCodeEx()must actively prevent recursion. If\r
389 ReportStatusCodeEx() is called while processing another any\r
390 other Report Status Code Library function, then\r
391 ReportStatusCodeEx() must return EFI_DEVICE_ERROR immediately.\r
392\r
393 If ExtendedData is NULL and ExtendedDataSize is not zero, then ASSERT().\r
394 If ExtendedData is not NULL and ExtendedDataSize is zero, then ASSERT().\r
395\r
396 @param Type Status code type.\r
397 @param Value Status code value.\r
398 @param Instance Status code instance number.\r
399 @param CallerId Pointer to a GUID that identifies the caller of this\r
400 function. If this parameter is NULL, then a caller\r
401 ID of gEfiCallerIdGuid is used.\r
402 @param ExtendedDataGuid Pointer to the GUID for the extended data buffer.\r
403 If this parameter is NULL, then a the status code\r
404 standard header is filled in with\r
405 gEfiStatusCodeSpecificDataGuid.\r
406 @param ExtendedData Pointer to the extended data buffer. This is an\r
407 optional parameter that may be NULL.\r
408 @param ExtendedDataSize The size, in bytes, of the extended data buffer.\r
409\r
410 @retval EFI_SUCCESS The status code was reported.\r
411 @retval EFI_OUT_OF_RESOURCES There were not enough resources to allocate\r
412 the extended data section if it was specified.\r
413 @retval EFI_UNSUPPORTED Report status code is not supported\r
414\r
415**/\r
416EFI_STATUS\r
417EFIAPI\r
418ReportStatusCodeEx (\r
419 IN EFI_STATUS_CODE_TYPE Type,\r
420 IN EFI_STATUS_CODE_VALUE Value,\r
421 IN UINT32 Instance,\r
422 IN CONST EFI_GUID *CallerId OPTIONAL,\r
423 IN CONST EFI_GUID *ExtendedDataGuid OPTIONAL,\r
424 IN CONST VOID *ExtendedData OPTIONAL,\r
425 IN UINTN ExtendedDataSize\r
426 )\r
427{\r
428 EFI_STATUS Status;\r
429 EFI_STATUS_CODE_DATA *StatusCodeData;\r
430\r
431 ASSERT (!((ExtendedData == NULL) && (ExtendedDataSize != 0)));\r
432 ASSERT (!((ExtendedData != NULL) && (ExtendedDataSize == 0)));\r
433\r
c5631cef 434 //\r
435 // Allocate space for the Status Code Header and its buffer\r
436 //\r
300240b6 437 StatusCodeData = AllocatePool (sizeof (EFI_STATUS_CODE_DATA) + ExtendedDataSize);\r
c5631cef 438 if (StatusCodeData == NULL) {\r
439 return EFI_OUT_OF_RESOURCES;\r
440 }\r
441\r
442 //\r
443 // Fill in the extended data header\r
444 //\r
c9325700
ED
445 StatusCodeData->HeaderSize = (UINT16) sizeof (EFI_STATUS_CODE_DATA);\r
446 StatusCodeData->Size = (UINT16) ExtendedDataSize;\r
c5631cef 447 if (ExtendedDataGuid == NULL) {\r
448 ExtendedDataGuid = &gEfiStatusCodeSpecificDataGuid;\r
449 }\r
450 CopyGuid (&StatusCodeData->Type, ExtendedDataGuid);\r
451\r
452 //\r
453 // Fill in the extended data buffer\r
454 //\r
455 if (ExtendedData != NULL) {\r
456 CopyMem (StatusCodeData + 1, ExtendedData, ExtendedDataSize);\r
457 }\r
458\r
459 //\r
460 // Report the status code\r
461 //\r
462 if (CallerId == NULL) {\r
463 CallerId = &gEfiCallerIdGuid;\r
464 }\r
465 Status = InternalReportStatusCode (Type, Value, Instance, CallerId, StatusCodeData);\r
466\r
467 //\r
468 // Free the allocated buffer\r
469 //\r
300240b6 470 FreePool (StatusCodeData);\r
c5631cef 471\r
472 return Status;\r
473}\r
474\r
475\r
476/**\r
477 Returns TRUE if status codes of type EFI_PROGRESS_CODE are enabled\r
478\r
479 This function returns TRUE if the REPORT_STATUS_CODE_PROPERTY_PROGRESS_CODE_ENABLED\r
480 bit of PcdReportStatusCodeProperyMask is set. Otherwise FALSE is returned.\r
481\r
482 @retval TRUE The REPORT_STATUS_CODE_PROPERTY_PROGRESS_CODE_ENABLED bit of\r
483 PcdReportStatusCodeProperyMask is set.\r
484 @retval FALSE The REPORT_STATUS_CODE_PROPERTY_PROGRESS_CODE_ENABLED bit of\r
485 PcdReportStatusCodeProperyMask is clear.\r
486\r
487**/\r
488BOOLEAN\r
489EFIAPI\r
490ReportProgressCodeEnabled (\r
491 VOID\r
492 )\r
493{\r
494 return (BOOLEAN) ((PcdGet8 (PcdReportStatusCodePropertyMask) & REPORT_STATUS_CODE_PROPERTY_PROGRESS_CODE_ENABLED) != 0);\r
495}\r
496\r
497\r
498/**\r
499 Returns TRUE if status codes of type EFI_ERROR_CODE are enabled\r
500\r
501 This function returns TRUE if the REPORT_STATUS_CODE_PROPERTY_ERROR_CODE_ENABLED\r
502 bit of PcdReportStatusCodeProperyMask is set. Otherwise FALSE is returned.\r
503\r
504 @retval TRUE The REPORT_STATUS_CODE_PROPERTY_ERROR_CODE_ENABLED bit of\r
505 PcdReportStatusCodeProperyMask is set.\r
506 @retval FALSE The REPORT_STATUS_CODE_PROPERTY_ERROR_CODE_ENABLED bit of\r
507 PcdReportStatusCodeProperyMask is clear.\r
508\r
509**/\r
510BOOLEAN\r
511EFIAPI\r
512ReportErrorCodeEnabled (\r
513 VOID\r
514 )\r
515{\r
516 return (BOOLEAN) ((PcdGet8 (PcdReportStatusCodePropertyMask) & REPORT_STATUS_CODE_PROPERTY_ERROR_CODE_ENABLED) != 0);\r
517}\r
518\r
519\r
520/**\r
521 Returns TRUE if status codes of type EFI_DEBUG_CODE are enabled\r
522\r
523 This function returns TRUE if the REPORT_STATUS_CODE_PROPERTY_DEBUG_CODE_ENABLED\r
524 bit of PcdReportStatusCodeProperyMask is set. Otherwise FALSE is returned.\r
525\r
526 @retval TRUE The REPORT_STATUS_CODE_PROPERTY_DEBUG_CODE_ENABLED bit of\r
527 PcdReportStatusCodeProperyMask is set.\r
528 @retval FALSE The REPORT_STATUS_CODE_PROPERTY_DEBUG_CODE_ENABLED bit of\r
529 PcdReportStatusCodeProperyMask is clear.\r
530\r
531**/\r
532BOOLEAN\r
533EFIAPI\r
534ReportDebugCodeEnabled (\r
535 VOID\r
536 )\r
537{\r
538 return (BOOLEAN) ((PcdGet8 (PcdReportStatusCodePropertyMask) & REPORT_STATUS_CODE_PROPERTY_DEBUG_CODE_ENABLED) != 0);\r
539}\r