2 Null Base Debug Library instance with empty functions.
4 Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
10 #include <Library/DebugLib.h>
13 Prints a debug message to the debug output device if the specified error level is enabled.
15 If any bit in ErrorLevel is also set in DebugPrintErrorLevelLib function
16 GetDebugPrintErrorLevel (), then print the message specified by Format and the
17 associated variable argument list to the debug output device.
19 If Format is NULL, then ASSERT().
21 @param ErrorLevel The error level of the debug message.
22 @param Format Format string for the debug message to print.
23 @param ... Variable argument list whose contents are accessed
24 based on the format string specified by Format.
31 IN CONST CHAR8
*Format
,
39 Prints a debug message to the debug output device if the specified
40 error level is enabled.
42 If any bit in ErrorLevel is also set in DebugPrintErrorLevelLib function
43 GetDebugPrintErrorLevel (), then print the message specified by Format and
44 the associated variable argument list to the debug output device.
46 If Format is NULL, then ASSERT().
48 @param ErrorLevel The error level of the debug message.
49 @param Format Format string for the debug message to print.
50 @param VaListMarker VA_LIST marker for the variable argument list.
57 IN CONST CHAR8
*Format
,
58 IN VA_LIST VaListMarker
65 Prints a debug message to the debug output device if the specified
66 error level is enabled.
67 This function use BASE_LIST which would provide a more compatible
70 If any bit in ErrorLevel is also set in DebugPrintErrorLevelLib function
71 GetDebugPrintErrorLevel (), then print the message specified by Format and
72 the associated variable argument list to the debug output device.
74 If Format is NULL, then ASSERT().
76 @param ErrorLevel The error level of the debug message.
77 @param Format Format string for the debug message to print.
78 @param BaseListMarker BASE_LIST marker for the variable argument list.
85 IN CONST CHAR8
*Format
,
86 IN BASE_LIST BaseListMarker
93 Prints an assert message containing a filename, line number, and description.
94 This may be followed by a breakpoint or a dead loop.
96 Print a message of the form "ASSERT <FileName>(<LineNumber>): <Description>\n"
97 to the debug output device. If DEBUG_PROPERTY_ASSERT_BREAKPOINT_ENABLED bit of
98 PcdDebugProperyMask is set then CpuBreakpoint() is called. Otherwise, if
99 DEBUG_PROPERTY_ASSERT_DEADLOOP_ENABLED bit of PcdDebugProperyMask is set then
100 CpuDeadLoop() is called. If neither of these bits are set, then this function
101 returns immediately after the message is printed to the debug output device.
102 DebugAssert() must actively prevent recursion. If DebugAssert() is called while
103 processing another DebugAssert(), then DebugAssert() must return immediately.
105 If FileName is NULL, then a <FileName> string of "(NULL) Filename" is printed.
106 If Description is NULL, then a <Description> string of "(NULL) Description" is printed.
108 @param FileName The pointer to the name of the source file that generated the assert condition.
109 @param LineNumber The line number in the source file that generated the assert condition
110 @param Description The pointer to the description of the assert condition.
116 IN CONST CHAR8
*FileName
,
118 IN CONST CHAR8
*Description
125 Fills a target buffer with PcdDebugClearMemoryValue, and returns the target buffer.
127 This function fills Length bytes of Buffer with the value specified by
128 PcdDebugClearMemoryValue, and returns Buffer.
130 If Buffer is NULL, then ASSERT().
131 If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
133 @param Buffer The pointer to the target buffer to be filled with PcdDebugClearMemoryValue.
134 @param Length The number of bytes in Buffer to fill with zeros PcdDebugClearMemoryValue.
136 @return Buffer The pointer to the target buffer filled with PcdDebugClearMemoryValue.
151 Returns TRUE if ASSERT() macros are enabled.
153 This function returns TRUE if the DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED bit of
154 PcdDebugProperyMask is set. Otherwise FALSE is returned.
156 @retval TRUE The DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED bit of PcdDebugProperyMask is set.
157 @retval FALSE The DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED bit of PcdDebugProperyMask is clear.
171 Returns TRUE if DEBUG() macros are enabled.
173 This function returns TRUE if the DEBUG_PROPERTY_DEBUG_PRINT_ENABLED bit of
174 PcdDebugProperyMask is set. Otherwise FALSE is returned.
176 @retval TRUE The DEBUG_PROPERTY_DEBUG_PRINT_ENABLED bit of PcdDebugProperyMask is set.
177 @retval FALSE The DEBUG_PROPERTY_DEBUG_PRINT_ENABLED bit of PcdDebugProperyMask is clear.
191 Returns TRUE if DEBUG_CODE() macros are enabled.
193 This function returns TRUE if the DEBUG_PROPERTY_DEBUG_CODE_ENABLED bit of
194 PcdDebugProperyMask is set. Otherwise FALSE is returned.
196 @retval TRUE The DEBUG_PROPERTY_DEBUG_CODE_ENABLED bit of PcdDebugProperyMask is set.
197 @retval FALSE The DEBUG_PROPERTY_DEBUG_CODE_ENABLED bit of PcdDebugProperyMask is clear.
211 Returns TRUE if DEBUG_CLEAR_MEMORY() macro is enabled.
213 This function returns TRUE if the DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED bit of
214 PcdDebugProperyMask is set. Otherwise FALSE is returned.
216 @retval TRUE The DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED bit of PcdDebugProperyMask is set.
217 @retval FALSE The DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED bit of PcdDebugProperyMask is clear.
222 DebugClearMemoryEnabled (
230 Returns TRUE if any one of the bit is set both in ErrorLevel and PcdFixedDebugPrintErrorLevel.
232 This function compares the bit mask of ErrorLevel and PcdFixedDebugPrintErrorLevel.
234 @retval TRUE Current ErrorLevel is supported.
235 @retval FALSE Current ErrorLevel is not supported.
240 DebugPrintLevelEnabled (
241 IN CONST UINTN ErrorLevel