VirtualBox

source: vbox/trunk/src/VBox/Devices/EFI/FirmwareNew/MdeModulePkg/Library/DxeReportStatusCodeLib/ReportStatusCodeLib.c

Last change on this file was 99404, checked in by vboxsync, 2 years ago

Devices/EFI/FirmwareNew: Update to edk2-stable202302 and make it build, bugref:4643

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

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette