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
,
38 Prints a debug message to the debug output device if the specified
39 error level is enabled.
41 If any bit in ErrorLevel is also set in DebugPrintErrorLevelLib function
42 GetDebugPrintErrorLevel (), then print the message specified by Format and
43 the associated variable argument list to the debug output device.
45 If Format is NULL, then ASSERT().
47 @param ErrorLevel The error level of the debug message.
48 @param Format Format string for the debug message to print.
49 @param VaListMarker VA_LIST marker for the variable argument list.
56 IN CONST CHAR8
*Format
,
57 IN VA_LIST VaListMarker
63 Prints a debug message to the debug output device if the specified
64 error level is enabled.
65 This function use BASE_LIST which would provide a more compatible
68 If any bit in ErrorLevel is also set in DebugPrintErrorLevelLib function
69 GetDebugPrintErrorLevel (), then print the message specified by Format and
70 the associated variable argument list to the debug output device.
72 If Format is NULL, then ASSERT().
74 @param ErrorLevel The error level of the debug message.
75 @param Format Format string for the debug message to print.
76 @param BaseListMarker BASE_LIST marker for the variable argument list.
83 IN CONST CHAR8
*Format
,
84 IN BASE_LIST BaseListMarker
90 Prints an assert message containing a filename, line number, and description.
91 This may be followed by a breakpoint or a dead loop.
93 Print a message of the form "ASSERT <FileName>(<LineNumber>): <Description>\n"
94 to the debug output device. If DEBUG_PROPERTY_ASSERT_BREAKPOINT_ENABLED bit of
95 PcdDebugProperyMask is set then CpuBreakpoint() is called. Otherwise, if
96 DEBUG_PROPERTY_ASSERT_DEADLOOP_ENABLED bit of PcdDebugProperyMask is set then
97 CpuDeadLoop() is called. If neither of these bits are set, then this function
98 returns immediately after the message is printed to the debug output device.
99 DebugAssert() must actively prevent recursion. If DebugAssert() is called while
100 processing another DebugAssert(), then DebugAssert() must return immediately.
102 If FileName is NULL, then a <FileName> string of "(NULL) Filename" is printed.
103 If Description is NULL, then a <Description> string of "(NULL) Description" is printed.
105 @param FileName The pointer to the name of the source file that generated the assert condition.
106 @param LineNumber The line number in the source file that generated the assert condition
107 @param Description The pointer to the description of the assert condition.
113 IN CONST CHAR8
*FileName
,
115 IN CONST CHAR8
*Description
121 Fills a target buffer with PcdDebugClearMemoryValue, and returns the target buffer.
123 This function fills Length bytes of Buffer with the value specified by
124 PcdDebugClearMemoryValue, and returns Buffer.
126 If Buffer is NULL, then ASSERT().
127 If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
129 @param Buffer The pointer to the target buffer to be filled with PcdDebugClearMemoryValue.
130 @param Length The number of bytes in Buffer to fill with zeros PcdDebugClearMemoryValue.
132 @return Buffer The pointer to the target buffer filled with PcdDebugClearMemoryValue.
146 Returns TRUE if ASSERT() macros are enabled.
148 This function returns TRUE if the DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED bit of
149 PcdDebugProperyMask is set. Otherwise FALSE is returned.
151 @retval TRUE The DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED bit of PcdDebugProperyMask is set.
152 @retval FALSE The DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED bit of PcdDebugProperyMask is clear.
165 Returns TRUE if DEBUG() macros are enabled.
167 This function returns TRUE if the DEBUG_PROPERTY_DEBUG_PRINT_ENABLED bit of
168 PcdDebugProperyMask is set. Otherwise FALSE is returned.
170 @retval TRUE The DEBUG_PROPERTY_DEBUG_PRINT_ENABLED bit of PcdDebugProperyMask is set.
171 @retval FALSE The DEBUG_PROPERTY_DEBUG_PRINT_ENABLED bit of PcdDebugProperyMask is clear.
184 Returns TRUE if DEBUG_CODE() macros are enabled.
186 This function returns TRUE if the DEBUG_PROPERTY_DEBUG_CODE_ENABLED bit of
187 PcdDebugProperyMask is set. Otherwise FALSE is returned.
189 @retval TRUE The DEBUG_PROPERTY_DEBUG_CODE_ENABLED bit of PcdDebugProperyMask is set.
190 @retval FALSE The DEBUG_PROPERTY_DEBUG_CODE_ENABLED bit of PcdDebugProperyMask is clear.
203 Returns TRUE if DEBUG_CLEAR_MEMORY() macro is enabled.
205 This function returns TRUE if the DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED bit of
206 PcdDebugProperyMask is set. Otherwise FALSE is returned.
208 @retval TRUE The DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED bit of PcdDebugProperyMask is set.
209 @retval FALSE The DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED bit of PcdDebugProperyMask is clear.
214 DebugClearMemoryEnabled (
222 Returns TRUE if any one of the bit is set both in ErrorLevel and PcdFixedDebugPrintErrorLevel.
224 This function compares the bit mask of ErrorLevel and PcdFixedDebugPrintErrorLevel.
226 @retval TRUE Current ErrorLevel is supported.
227 @retval FALSE Current ErrorLevel is not supported.
232 DebugPrintLevelEnabled (
233 IN CONST UINTN ErrorLevel