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