Commit | Line | Data |
---|---|---|
e1f414b6 | 1 | /** @file\r |
eceb3a4c | 2 | Null Base Debug Library instance with empty functions.\r |
e1f414b6 | 3 | \r |
700b41d4 HT |
4 | Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>\r |
5 | This program and the accompanying materials\r | |
e1f414b6 | 6 | are licensed and made available under the terms and conditions of the BSD License\r |
7 | which accompanies this distribution. The full text of the license may be found at\r | |
8 | http://opensource.org/licenses/bsd-license.php\r | |
9 | \r | |
10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
12 | \r | |
13 | **/\r | |
14 | \r | |
c7d265a9 | 15 | #include <Base.h>\r |
c7d265a9 | 16 | #include <Library/DebugLib.h>\r |
e1f414b6 | 17 | \r |
18 | /**\r | |
e1f414b6 | 19 | Prints a debug message to the debug output device if the specified error level is enabled.\r |
20 | \r | |
21 | If any bit in ErrorLevel is also set in PcdDebugPrintErrorLevel, then print \r | |
22 | the message specified by Format and the associated variable argument list to \r | |
23 | the debug output device.\r | |
24 | \r | |
3e5c3238 | 25 | If Format is NULL, then ASSERT().\r |
26 | \r | |
e1f414b6 | 27 | @param ErrorLevel The error level of the debug message.\r |
28 | @param Format Format string for the debug message to print.\r | |
285010e7 | 29 | @param ... Variable argument list whose contents are accessed \r |
30 | based on the format string specified by Format.\r | |
e1f414b6 | 31 | \r |
32 | **/\r | |
33 | VOID\r | |
34 | EFIAPI\r | |
35 | DebugPrint (\r | |
36 | IN UINTN ErrorLevel,\r | |
37 | IN CONST CHAR8 *Format,\r | |
38 | ...\r | |
39 | )\r | |
40 | {\r | |
41 | }\r | |
42 | \r | |
43 | \r | |
44 | /**\r | |
e1f414b6 | 45 | Prints an assert message containing a filename, line number, and description. \r |
46 | This may be followed by a breakpoint or a dead loop.\r | |
47 | \r | |
3e5c3238 | 48 | Print a message of the form "ASSERT <FileName>(<LineNumber>): <Description>\n"\r |
e1f414b6 | 49 | to the debug output device. If DEBUG_PROPERTY_ASSERT_BREAKPOINT_ENABLED bit of \r |
50 | PcdDebugProperyMask is set then CpuBreakpoint() is called. Otherwise, if \r | |
51 | DEBUG_PROPERTY_ASSERT_DEADLOOP_ENABLED bit of PcdDebugProperyMask is set then \r | |
52 | CpuDeadLoop() is called. If neither of these bits are set, then this function \r | |
53 | returns immediately after the message is printed to the debug output device.\r | |
3e5c3238 | 54 | DebugAssert() must actively prevent recursion. If DebugAssert() is called while\r |
e1f414b6 | 55 | processing another DebugAssert(), then DebugAssert() must return immediately.\r |
56 | \r | |
57 | If FileName is NULL, then a <FileName> string of "(NULL) Filename" is printed.\r | |
e1f414b6 | 58 | If Description is NULL, then a <Description> string of "(NULL) Description" is printed.\r |
59 | \r | |
60 | @param FileName Pointer to the name of the source file that generated the assert condition.\r | |
61 | @param LineNumber The line number in the source file that generated the assert condition\r | |
62 | @param Description Pointer to the description of the assert condition.\r | |
63 | \r | |
64 | **/\r | |
65 | VOID\r | |
66 | EFIAPI\r | |
67 | DebugAssert (\r | |
68 | IN CONST CHAR8 *FileName,\r | |
69 | IN UINTN LineNumber,\r | |
70 | IN CONST CHAR8 *Description\r | |
71 | )\r | |
72 | {\r | |
73 | }\r | |
74 | \r | |
75 | \r | |
76 | /**\r | |
e1f414b6 | 77 | Fills a target buffer with PcdDebugClearMemoryValue, and returns the target buffer.\r |
78 | \r | |
79 | This function fills Length bytes of Buffer with the value specified by \r | |
80 | PcdDebugClearMemoryValue, and returns Buffer.\r | |
81 | \r | |
82 | If Buffer is NULL, then ASSERT().\r | |
efb23117 | 83 | If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT(). \r |
e1f414b6 | 84 | \r |
3e5c3238 | 85 | @param Buffer Pointer to the target buffer to be filled with PcdDebugClearMemoryValue.\r |
e1f414b6 | 86 | @param Length Number of bytes in Buffer to fill with zeros PcdDebugClearMemoryValue. \r |
87 | \r | |
3e5c3238 | 88 | @return Buffer Pointer to the target buffer filled with PcdDebugClearMemoryValue.\r |
e1f414b6 | 89 | \r |
90 | **/\r | |
91 | VOID *\r | |
92 | EFIAPI\r | |
93 | DebugClearMemory (\r | |
94 | OUT VOID *Buffer,\r | |
95 | IN UINTN Length\r | |
96 | )\r | |
97 | {\r | |
98 | return Buffer;\r | |
99 | }\r | |
100 | \r | |
101 | \r | |
102 | /**\r | |
e1f414b6 | 103 | Returns TRUE if ASSERT() macros are enabled.\r |
104 | \r | |
105 | This function returns TRUE if the DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED bit of \r | |
106 | PcdDebugProperyMask is set. Otherwise FALSE is returned.\r | |
107 | \r | |
108 | @retval TRUE The DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED bit of PcdDebugProperyMask is set.\r | |
109 | @retval FALSE The DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED bit of PcdDebugProperyMask is clear.\r | |
110 | \r | |
111 | **/\r | |
112 | BOOLEAN\r | |
113 | EFIAPI\r | |
114 | DebugAssertEnabled (\r | |
115 | VOID\r | |
116 | )\r | |
117 | {\r | |
118 | return FALSE;\r | |
119 | }\r | |
120 | \r | |
121 | \r | |
3e5c3238 | 122 | /** \r |
123 | Returns TRUE if DEBUG() macros are enabled.\r | |
e1f414b6 | 124 | \r |
125 | This function returns TRUE if the DEBUG_PROPERTY_DEBUG_PRINT_ENABLED bit of \r | |
126 | PcdDebugProperyMask is set. Otherwise FALSE is returned.\r | |
127 | \r | |
128 | @retval TRUE The DEBUG_PROPERTY_DEBUG_PRINT_ENABLED bit of PcdDebugProperyMask is set.\r | |
129 | @retval FALSE The DEBUG_PROPERTY_DEBUG_PRINT_ENABLED bit of PcdDebugProperyMask is clear.\r | |
130 | \r | |
131 | **/\r | |
132 | BOOLEAN\r | |
133 | EFIAPI\r | |
134 | DebugPrintEnabled (\r | |
135 | VOID\r | |
136 | )\r | |
137 | {\r | |
138 | return FALSE;\r | |
139 | }\r | |
140 | \r | |
141 | \r | |
3e5c3238 | 142 | /** \r |
143 | Returns TRUE if DEBUG_CODE() macros are enabled.\r | |
e1f414b6 | 144 | \r |
145 | This function returns TRUE if the DEBUG_PROPERTY_DEBUG_CODE_ENABLED bit of \r | |
146 | PcdDebugProperyMask is set. Otherwise FALSE is returned.\r | |
147 | \r | |
148 | @retval TRUE The DEBUG_PROPERTY_DEBUG_CODE_ENABLED bit of PcdDebugProperyMask is set.\r | |
149 | @retval FALSE The DEBUG_PROPERTY_DEBUG_CODE_ENABLED bit of PcdDebugProperyMask is clear.\r | |
150 | \r | |
151 | **/\r | |
152 | BOOLEAN\r | |
153 | EFIAPI\r | |
154 | DebugCodeEnabled (\r | |
155 | VOID\r | |
156 | )\r | |
157 | {\r | |
158 | return FALSE;\r | |
159 | }\r | |
160 | \r | |
161 | \r | |
3e5c3238 | 162 | /** \r |
163 | Returns TRUE if DEBUG_CLEAR_MEMORY() macro is enabled.\r | |
e1f414b6 | 164 | \r |
eceb3a4c | 165 | This function returns TRUE if the DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED bit of \r |
e1f414b6 | 166 | PcdDebugProperyMask is set. Otherwise FALSE is returned.\r |
167 | \r | |
eceb3a4c LG |
168 | @retval TRUE The DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED bit of PcdDebugProperyMask is set.\r |
169 | @retval FALSE The DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED bit of PcdDebugProperyMask is clear.\r | |
e1f414b6 | 170 | \r |
171 | **/\r | |
172 | BOOLEAN\r | |
173 | EFIAPI\r | |
174 | DebugClearMemoryEnabled (\r | |
175 | VOID\r | |
176 | )\r | |
177 | {\r | |
178 | return FALSE;\r | |
179 | }\r |