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