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