]>
Commit | Line | Data |
---|---|---|
e1f414b6 | 1 | /** @file\r |
eceb3a4c | 2 | Null Base Debug Library instance with empty functions.\r |
e1f414b6 | 3 | \r |
b04bdd15 | 4 | Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.<BR>\r |
9344f092 | 5 | SPDX-License-Identifier: BSD-2-Clause-Patent\r |
e1f414b6 | 6 | \r |
7 | **/\r | |
8 | \r | |
c7d265a9 | 9 | #include <Base.h>\r |
c7d265a9 | 10 | #include <Library/DebugLib.h>\r |
e1f414b6 | 11 | \r |
12 | /**\r | |
e1f414b6 | 13 | Prints a debug message to the debug output device if the specified error level is enabled.\r |
14 | \r | |
9095d37b LG |
15 | If any bit in ErrorLevel is also set in DebugPrintErrorLevelLib function\r |
16 | GetDebugPrintErrorLevel (), then print the message specified by Format and the\r | |
2891fc8b | 17 | associated variable argument list to the debug output device.\r |
e1f414b6 | 18 | \r |
3e5c3238 | 19 | If Format is NULL, then ASSERT().\r |
20 | \r | |
e1f414b6 | 21 | @param ErrorLevel The error level of the debug message.\r |
22 | @param Format Format string for the debug message to print.\r | |
9095d37b | 23 | @param ... Variable argument list whose contents are accessed\r |
285010e7 | 24 | based on the format string specified by Format.\r |
e1f414b6 | 25 | \r |
26 | **/\r | |
27 | VOID\r | |
28 | EFIAPI\r | |
29 | DebugPrint (\r | |
30 | IN UINTN ErrorLevel,\r | |
31 | IN CONST CHAR8 *Format,\r | |
32 | ...\r | |
33 | )\r | |
34 | {\r | |
35 | }\r | |
36 | \r | |
37 | \r | |
b04bdd15 BB |
38 | /**\r |
39 | Prints a debug message to the debug output device if the specified\r | |
40 | error level is enabled.\r | |
41 | \r | |
42 | If any bit in ErrorLevel is also set in DebugPrintErrorLevelLib function\r | |
43 | GetDebugPrintErrorLevel (), then print the message specified by Format and\r | |
44 | the associated variable argument list to the debug output device.\r | |
45 | \r | |
46 | If Format is NULL, then ASSERT().\r | |
47 | \r | |
48 | @param ErrorLevel The error level of the debug message.\r | |
49 | @param Format Format string for the debug message to print.\r | |
50 | @param VaListMarker VA_LIST marker for the variable argument list.\r | |
51 | \r | |
52 | **/\r | |
53 | VOID\r | |
54 | EFIAPI\r | |
55 | DebugVPrint (\r | |
56 | IN UINTN ErrorLevel,\r | |
57 | IN CONST CHAR8 *Format,\r | |
58 | IN VA_LIST VaListMarker\r | |
59 | )\r | |
60 | {\r | |
61 | }\r | |
62 | \r | |
63 | \r | |
64 | /**\r | |
65 | Prints a debug message to the debug output device if the specified\r | |
66 | error level is enabled.\r | |
67 | This function use BASE_LIST which would provide a more compatible\r | |
68 | service than VA_LIST.\r | |
69 | \r | |
70 | If any bit in ErrorLevel is also set in DebugPrintErrorLevelLib function\r | |
71 | GetDebugPrintErrorLevel (), then print the message specified by Format and\r | |
72 | the associated variable argument list to the debug output device.\r | |
73 | \r | |
74 | If Format is NULL, then ASSERT().\r | |
75 | \r | |
76 | @param ErrorLevel The error level of the debug message.\r | |
77 | @param Format Format string for the debug message to print.\r | |
78 | @param BaseListMarker BASE_LIST marker for the variable argument list.\r | |
79 | \r | |
80 | **/\r | |
81 | VOID\r | |
82 | EFIAPI\r | |
83 | DebugBPrint (\r | |
84 | IN UINTN ErrorLevel,\r | |
85 | IN CONST CHAR8 *Format,\r | |
86 | IN BASE_LIST BaseListMarker\r | |
87 | )\r | |
88 | {\r | |
89 | }\r | |
90 | \r | |
91 | \r | |
e1f414b6 | 92 | /**\r |
9095d37b | 93 | Prints an assert message containing a filename, line number, and description.\r |
e1f414b6 | 94 | This may be followed by a breakpoint or a dead loop.\r |
95 | \r | |
3e5c3238 | 96 | Print a message of the form "ASSERT <FileName>(<LineNumber>): <Description>\n"\r |
9095d37b LG |
97 | to the debug output device. If DEBUG_PROPERTY_ASSERT_BREAKPOINT_ENABLED bit of\r |
98 | PcdDebugProperyMask is set then CpuBreakpoint() is called. Otherwise, if\r | |
99 | DEBUG_PROPERTY_ASSERT_DEADLOOP_ENABLED bit of PcdDebugProperyMask is set then\r | |
100 | CpuDeadLoop() is called. If neither of these bits are set, then this function\r | |
e1f414b6 | 101 | returns immediately after the message is printed to the debug output device.\r |
3e5c3238 | 102 | DebugAssert() must actively prevent recursion. If DebugAssert() is called while\r |
e1f414b6 | 103 | processing another DebugAssert(), then DebugAssert() must return immediately.\r |
104 | \r | |
105 | If FileName is NULL, then a <FileName> string of "(NULL) Filename" is printed.\r | |
e1f414b6 | 106 | If Description is NULL, then a <Description> string of "(NULL) Description" is printed.\r |
107 | \r | |
2fc59a00 | 108 | @param FileName The pointer to the name of the source file that generated the assert condition.\r |
e1f414b6 | 109 | @param LineNumber The line number in the source file that generated the assert condition\r |
2fc59a00 | 110 | @param Description The pointer to the description of the assert condition.\r |
e1f414b6 | 111 | \r |
112 | **/\r | |
113 | VOID\r | |
114 | EFIAPI\r | |
115 | DebugAssert (\r | |
116 | IN CONST CHAR8 *FileName,\r | |
117 | IN UINTN LineNumber,\r | |
118 | IN CONST CHAR8 *Description\r | |
119 | )\r | |
120 | {\r | |
121 | }\r | |
122 | \r | |
123 | \r | |
124 | /**\r | |
e1f414b6 | 125 | Fills a target buffer with PcdDebugClearMemoryValue, and returns the target buffer.\r |
126 | \r | |
9095d37b | 127 | This function fills Length bytes of Buffer with the value specified by\r |
e1f414b6 | 128 | PcdDebugClearMemoryValue, and returns Buffer.\r |
129 | \r | |
130 | If Buffer is NULL, then ASSERT().\r | |
9095d37b | 131 | If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().\r |
e1f414b6 | 132 | \r |
2fc59a00 | 133 | @param Buffer The pointer to the target buffer to be filled with PcdDebugClearMemoryValue.\r |
9095d37b | 134 | @param Length The number of bytes in Buffer to fill with zeros PcdDebugClearMemoryValue.\r |
e1f414b6 | 135 | \r |
2fc59a00 | 136 | @return Buffer The pointer to the target buffer filled with PcdDebugClearMemoryValue.\r |
e1f414b6 | 137 | \r |
138 | **/\r | |
139 | VOID *\r | |
140 | EFIAPI\r | |
141 | DebugClearMemory (\r | |
142 | OUT VOID *Buffer,\r | |
143 | IN UINTN Length\r | |
144 | )\r | |
145 | {\r | |
146 | return Buffer;\r | |
147 | }\r | |
148 | \r | |
149 | \r | |
150 | /**\r | |
e1f414b6 | 151 | Returns TRUE if ASSERT() macros are enabled.\r |
152 | \r | |
9095d37b | 153 | This function returns TRUE if the DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED bit of\r |
e1f414b6 | 154 | PcdDebugProperyMask is set. Otherwise FALSE is returned.\r |
155 | \r | |
156 | @retval TRUE The DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED bit of PcdDebugProperyMask is set.\r | |
157 | @retval FALSE The DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED bit of PcdDebugProperyMask is clear.\r | |
158 | \r | |
159 | **/\r | |
160 | BOOLEAN\r | |
161 | EFIAPI\r | |
162 | DebugAssertEnabled (\r | |
163 | VOID\r | |
164 | )\r | |
165 | {\r | |
166 | return FALSE;\r | |
167 | }\r | |
168 | \r | |
169 | \r | |
9095d37b | 170 | /**\r |
3e5c3238 | 171 | Returns TRUE if DEBUG() macros are enabled.\r |
e1f414b6 | 172 | \r |
9095d37b | 173 | This function returns TRUE if the DEBUG_PROPERTY_DEBUG_PRINT_ENABLED bit of\r |
e1f414b6 | 174 | PcdDebugProperyMask is set. Otherwise FALSE is returned.\r |
175 | \r | |
176 | @retval TRUE The DEBUG_PROPERTY_DEBUG_PRINT_ENABLED bit of PcdDebugProperyMask is set.\r | |
177 | @retval FALSE The DEBUG_PROPERTY_DEBUG_PRINT_ENABLED bit of PcdDebugProperyMask is clear.\r | |
178 | \r | |
179 | **/\r | |
180 | BOOLEAN\r | |
181 | EFIAPI\r | |
182 | DebugPrintEnabled (\r | |
183 | VOID\r | |
184 | )\r | |
185 | {\r | |
186 | return FALSE;\r | |
187 | }\r | |
188 | \r | |
189 | \r | |
9095d37b | 190 | /**\r |
3e5c3238 | 191 | Returns TRUE if DEBUG_CODE() macros are enabled.\r |
e1f414b6 | 192 | \r |
9095d37b | 193 | This function returns TRUE if the DEBUG_PROPERTY_DEBUG_CODE_ENABLED bit of\r |
e1f414b6 | 194 | PcdDebugProperyMask is set. Otherwise FALSE is returned.\r |
195 | \r | |
196 | @retval TRUE The DEBUG_PROPERTY_DEBUG_CODE_ENABLED bit of PcdDebugProperyMask is set.\r | |
197 | @retval FALSE The DEBUG_PROPERTY_DEBUG_CODE_ENABLED bit of PcdDebugProperyMask is clear.\r | |
198 | \r | |
199 | **/\r | |
200 | BOOLEAN\r | |
201 | EFIAPI\r | |
202 | DebugCodeEnabled (\r | |
203 | VOID\r | |
204 | )\r | |
205 | {\r | |
206 | return FALSE;\r | |
207 | }\r | |
208 | \r | |
209 | \r | |
9095d37b | 210 | /**\r |
3e5c3238 | 211 | Returns TRUE if DEBUG_CLEAR_MEMORY() macro is enabled.\r |
e1f414b6 | 212 | \r |
9095d37b | 213 | This function returns TRUE if the DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED bit of\r |
e1f414b6 | 214 | PcdDebugProperyMask is set. Otherwise FALSE is returned.\r |
215 | \r | |
eceb3a4c LG |
216 | @retval TRUE The DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED bit of PcdDebugProperyMask is set.\r |
217 | @retval FALSE The DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED bit of PcdDebugProperyMask is clear.\r | |
e1f414b6 | 218 | \r |
219 | **/\r | |
220 | BOOLEAN\r | |
221 | EFIAPI\r | |
222 | DebugClearMemoryEnabled (\r | |
223 | VOID\r | |
224 | )\r | |
225 | {\r | |
226 | return FALSE;\r | |
227 | }\r | |
7c6c450a LG |
228 | \r |
229 | /**\r | |
230 | Returns TRUE if any one of the bit is set both in ErrorLevel and PcdFixedDebugPrintErrorLevel.\r | |
231 | \r | |
232 | This function compares the bit mask of ErrorLevel and PcdFixedDebugPrintErrorLevel.\r | |
233 | \r | |
234 | @retval TRUE Current ErrorLevel is supported.\r | |
235 | @retval FALSE Current ErrorLevel is not supported.\r | |
236 | \r | |
237 | **/\r | |
238 | BOOLEAN\r | |
239 | EFIAPI\r | |
240 | DebugPrintLevelEnabled (\r | |
241 | IN CONST UINTN ErrorLevel\r | |
242 | )\r | |
243 | {\r | |
244 | return FALSE;\r | |
245 | }\r | |
246 | \r |