3 Copyright (c) 2004, Intel Corporation. All rights reserved.<BR>
4 This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
18 Support for Debug primatives.
23 #include "EfiRuntimeLib.h"
24 #include EFI_GUID_DEFINITION (StatusCodeCallerId)
25 #include EFI_GUID_DEFINITION (StatusCodeDataTypeId)
27 #define EFI_STATUS_CODE_DATA_MAX_SIZE64 (EFI_STATUS_CODE_DATA_MAX_SIZE / 8)
39 Worker function for ASSERT (). If Error Logging hub is loaded log ASSERT
40 information. If Error Logging hub is not loaded BREAKPOINT ().
44 FileName - File name of failing routine.
46 LineNumber - Line number of failing ASSERT ().
48 Description - Description, usually the assertion,
56 UINT64 Buffer
[EFI_STATUS_CODE_DATA_MAX_SIZE64
];
58 EfiDebugAssertWorker (FileName
, LineNumber
, Description
, sizeof (Buffer
), Buffer
);
61 (EFI_ERROR_CODE
| EFI_ERROR_UNRECOVERED
),
62 (EFI_SOFTWARE_DXE_RT_DRIVER
| EFI_SW_EC_ILLEGAL_SOFTWARE_STATE
),
65 (EFI_STATUS_CODE_DATA
*) Buffer
69 // Put break point in module that contained the error.
84 Worker function for DEBUG (). If Error Logging hub is loaded log ASSERT
85 information. If Error Logging hub is not loaded do nothing.
89 ErrorLevel - If error level is set do the debug print.
91 Format - String to use for the print, followed by Print arguments.
101 UINT64 Buffer
[EFI_STATUS_CODE_DATA_MAX_SIZE64
];
103 if (!(gRtErrorLevel
& ErrorLevel
)) {
107 EfiDebugVPrintWorker (ErrorLevel
, Format
, Marker
, sizeof (Buffer
), Buffer
);
109 EfiReportStatusCode (
111 (EFI_SOFTWARE_DXE_RT_DRIVER
| EFI_DC_UNSPECIFIED
),
114 (EFI_STATUS_CODE_DATA
*) Buffer
130 Worker function for DEBUG (). If Error Logging hub is loaded log ASSERT
131 information. If Error Logging hub is not loaded do nothing.
133 We use UINT64 buffers due to IPF alignment concerns.
137 ErrorLevel - If error level is set do the debug print.
139 Format - String to use for the print, followed by Print arguments.
141 ... - VAR args for Format
151 VA_START (Marker
, Format
);
152 EfiDebugVPrint (ErrorLevel
, Format
, Marker
);