2 Null Base Debug Library instance with empty functions.
4 Copyright (c) 2006 - 2019, 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.
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.
16 #include <Library/DebugLib.h>
19 Prints a debug message to the debug output device if the specified error level is enabled.
21 If any bit in ErrorLevel is also set in DebugPrintErrorLevelLib function
22 GetDebugPrintErrorLevel (), then print the message specified by Format and the
23 associated variable argument list to the debug output device.
25 If Format is NULL, then ASSERT().
27 @param ErrorLevel The error level of the debug message.
28 @param Format Format string for the debug message to print.
29 @param ... Variable argument list whose contents are accessed
30 based on the format string specified by Format.
37 IN CONST CHAR8
*Format
,
45 Prints a debug message to the debug output device if the specified
46 error level is enabled.
48 If any bit in ErrorLevel is also set in DebugPrintErrorLevelLib function
49 GetDebugPrintErrorLevel (), then print the message specified by Format and
50 the associated variable argument list to the debug output device.
52 If Format is NULL, then ASSERT().
54 @param ErrorLevel The error level of the debug message.
55 @param Format Format string for the debug message to print.
56 @param VaListMarker VA_LIST marker for the variable argument list.
63 IN CONST CHAR8
*Format
,
64 IN VA_LIST VaListMarker
71 Prints a debug message to the debug output device if the specified
72 error level is enabled.
73 This function use BASE_LIST which would provide a more compatible
76 If any bit in ErrorLevel is also set in DebugPrintErrorLevelLib function
77 GetDebugPrintErrorLevel (), then print the message specified by Format and
78 the associated variable argument list to the debug output device.
80 If Format is NULL, then ASSERT().
82 @param ErrorLevel The error level of the debug message.
83 @param Format Format string for the debug message to print.
84 @param BaseListMarker BASE_LIST marker for the variable argument list.
91 IN CONST CHAR8
*Format
,
92 IN BASE_LIST BaseListMarker
99 Prints an assert message containing a filename, line number, and description.
100 This may be followed by a breakpoint or a dead loop.
102 Print a message of the form "ASSERT <FileName>(<LineNumber>): <Description>\n"
103 to the debug output device. If DEBUG_PROPERTY_ASSERT_BREAKPOINT_ENABLED bit of
104 PcdDebugProperyMask is set then CpuBreakpoint() is called. Otherwise, if
105 DEBUG_PROPERTY_ASSERT_DEADLOOP_ENABLED bit of PcdDebugProperyMask is set then
106 CpuDeadLoop() is called. If neither of these bits are set, then this function
107 returns immediately after the message is printed to the debug output device.
108 DebugAssert() must actively prevent recursion. If DebugAssert() is called while
109 processing another DebugAssert(), then DebugAssert() must return immediately.
111 If FileName is NULL, then a <FileName> string of "(NULL) Filename" is printed.
112 If Description is NULL, then a <Description> string of "(NULL) Description" is printed.
114 @param FileName The pointer to the name of the source file that generated the assert condition.
115 @param LineNumber The line number in the source file that generated the assert condition
116 @param Description The pointer to the description of the assert condition.
122 IN CONST CHAR8
*FileName
,
124 IN CONST CHAR8
*Description
131 Fills a target buffer with PcdDebugClearMemoryValue, and returns the target buffer.
133 This function fills Length bytes of Buffer with the value specified by
134 PcdDebugClearMemoryValue, and returns Buffer.
136 If Buffer is NULL, then ASSERT().
137 If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
139 @param Buffer The pointer to the target buffer to be filled with PcdDebugClearMemoryValue.
140 @param Length The number of bytes in Buffer to fill with zeros PcdDebugClearMemoryValue.
142 @return Buffer The pointer to the target buffer filled with PcdDebugClearMemoryValue.
157 Returns TRUE if ASSERT() macros are enabled.
159 This function returns TRUE if the DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED bit of
160 PcdDebugProperyMask is set. Otherwise FALSE is returned.
162 @retval TRUE The DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED bit of PcdDebugProperyMask is set.
163 @retval FALSE The DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED bit of PcdDebugProperyMask is clear.
177 Returns TRUE if DEBUG() macros are enabled.
179 This function returns TRUE if the DEBUG_PROPERTY_DEBUG_PRINT_ENABLED bit of
180 PcdDebugProperyMask is set. Otherwise FALSE is returned.
182 @retval TRUE The DEBUG_PROPERTY_DEBUG_PRINT_ENABLED bit of PcdDebugProperyMask is set.
183 @retval FALSE The DEBUG_PROPERTY_DEBUG_PRINT_ENABLED bit of PcdDebugProperyMask is clear.
197 Returns TRUE if DEBUG_CODE() macros are enabled.
199 This function returns TRUE if the DEBUG_PROPERTY_DEBUG_CODE_ENABLED bit of
200 PcdDebugProperyMask is set. Otherwise FALSE is returned.
202 @retval TRUE The DEBUG_PROPERTY_DEBUG_CODE_ENABLED bit of PcdDebugProperyMask is set.
203 @retval FALSE The DEBUG_PROPERTY_DEBUG_CODE_ENABLED bit of PcdDebugProperyMask is clear.
217 Returns TRUE if DEBUG_CLEAR_MEMORY() macro is enabled.
219 This function returns TRUE if the DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED bit of
220 PcdDebugProperyMask is set. Otherwise FALSE is returned.
222 @retval TRUE The DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED bit of PcdDebugProperyMask is set.
223 @retval FALSE The DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED bit of PcdDebugProperyMask is clear.
228 DebugClearMemoryEnabled (
236 Returns TRUE if any one of the bit is set both in ErrorLevel and PcdFixedDebugPrintErrorLevel.
238 This function compares the bit mask of ErrorLevel and PcdFixedDebugPrintErrorLevel.
240 @retval TRUE Current ErrorLevel is supported.
241 @retval FALSE Current ErrorLevel is not supported.
246 DebugPrintLevelEnabled (
247 IN CONST UINTN ErrorLevel