]>
Commit | Line | Data |
---|---|---|
e1f414b6 | 1 | /** @file\r |
eceb3a4c | 2 | Null Base Debug Library instance with empty functions.\r |
e1f414b6 | 3 | \r |
eceb3a4c | 4 | Copyright (c) 2006 - 2008, Intel Corporation\r |
e1f414b6 | 5 | All rights reserved. This program and the accompanying materials\r |
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 | |
c892d846 | 15 | \r |
c7d265a9 | 16 | #include <Base.h>\r |
17 | \r | |
18 | //\r | |
19 | // The Library classes this module produced\r | |
20 | //\r | |
21 | #include <Library/DebugLib.h>\r | |
e1f414b6 | 22 | \r |
23 | /**\r | |
24 | \r | |
25 | Prints a debug message to the debug output device if the specified error level is enabled.\r | |
26 | \r | |
27 | If any bit in ErrorLevel is also set in PcdDebugPrintErrorLevel, then print \r | |
28 | the message specified by Format and the associated variable argument list to \r | |
29 | the debug output device.\r | |
30 | \r | |
e1f414b6 | 31 | @param ErrorLevel The error level of the debug message.\r |
32 | @param Format Format string for the debug message to print.\r | |
eceb3a4c | 33 | @param ... The variable argument list.\r |
e1f414b6 | 34 | \r |
35 | **/\r | |
36 | VOID\r | |
37 | EFIAPI\r | |
38 | DebugPrint (\r | |
39 | IN UINTN ErrorLevel,\r | |
40 | IN CONST CHAR8 *Format,\r | |
41 | ...\r | |
42 | )\r | |
43 | {\r | |
44 | }\r | |
45 | \r | |
46 | \r | |
47 | /**\r | |
48 | \r | |
49 | Prints an assert message containing a filename, line number, and description. \r | |
50 | This may be followed by a breakpoint or a dead loop.\r | |
51 | \r | |
52 | Print a message of the form "ASSERT <FileName>(<LineNumber>): <Description>\n" \r | |
53 | to the debug output device. If DEBUG_PROPERTY_ASSERT_BREAKPOINT_ENABLED bit of \r | |
54 | PcdDebugProperyMask is set then CpuBreakpoint() is called. Otherwise, if \r | |
55 | DEBUG_PROPERTY_ASSERT_DEADLOOP_ENABLED bit of PcdDebugProperyMask is set then \r | |
56 | CpuDeadLoop() is called. If neither of these bits are set, then this function \r | |
57 | returns immediately after the message is printed to the debug output device.\r | |
58 | DebugAssert() must actively prevent recusrsion. If DebugAssert() is called while\r | |
59 | processing another DebugAssert(), then DebugAssert() must return immediately.\r | |
60 | \r | |
61 | If FileName is NULL, then a <FileName> string of "(NULL) Filename" is printed.\r | |
62 | \r | |
63 | If Description is NULL, then a <Description> string of "(NULL) Description" is printed.\r | |
64 | \r | |
65 | @param FileName Pointer to the name of the source file that generated the assert condition.\r | |
66 | @param LineNumber The line number in the source file that generated the assert condition\r | |
67 | @param Description Pointer to the description of the assert condition.\r | |
68 | \r | |
69 | **/\r | |
70 | VOID\r | |
71 | EFIAPI\r | |
72 | DebugAssert (\r | |
73 | IN CONST CHAR8 *FileName,\r | |
74 | IN UINTN LineNumber,\r | |
75 | IN CONST CHAR8 *Description\r | |
76 | )\r | |
77 | {\r | |
78 | }\r | |
79 | \r | |
80 | \r | |
81 | /**\r | |
82 | \r | |
83 | Fills a target buffer with PcdDebugClearMemoryValue, and returns the target buffer.\r | |
84 | \r | |
85 | This function fills Length bytes of Buffer with the value specified by \r | |
86 | PcdDebugClearMemoryValue, and returns Buffer.\r | |
87 | \r | |
88 | If Buffer is NULL, then ASSERT().\r | |
89 | \r | |
90 | If Length is greater than (MAX_ADDRESS ? Buffer + 1), then ASSERT(). \r | |
91 | \r | |
92 | @param Buffer Pointer to the target buffer to fill with PcdDebugClearMemoryValue.\r | |
93 | @param Length Number of bytes in Buffer to fill with zeros PcdDebugClearMemoryValue. \r | |
94 | \r | |
38bbd3d9 | 95 | @return Buffer filled with PcdDebugClearMemoryValue.\r |
e1f414b6 | 96 | \r |
97 | **/\r | |
98 | VOID *\r | |
99 | EFIAPI\r | |
100 | DebugClearMemory (\r | |
101 | OUT VOID *Buffer,\r | |
102 | IN UINTN Length\r | |
103 | )\r | |
104 | {\r | |
105 | return Buffer;\r | |
106 | }\r | |
107 | \r | |
108 | \r | |
109 | /**\r | |
110 | \r | |
111 | Returns TRUE if ASSERT() macros are enabled.\r | |
112 | \r | |
113 | This function returns TRUE if the DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED bit of \r | |
114 | PcdDebugProperyMask is set. Otherwise FALSE is returned.\r | |
115 | \r | |
116 | @retval TRUE The DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED bit of PcdDebugProperyMask is set.\r | |
117 | @retval FALSE The DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED bit of PcdDebugProperyMask is clear.\r | |
38bbd3d9 | 118 | \r |
119 | @return Always return FALSE.\r | |
e1f414b6 | 120 | \r |
121 | **/\r | |
122 | BOOLEAN\r | |
123 | EFIAPI\r | |
124 | DebugAssertEnabled (\r | |
125 | VOID\r | |
126 | )\r | |
127 | {\r | |
128 | return FALSE;\r | |
129 | }\r | |
130 | \r | |
131 | \r | |
132 | /**\r | |
133 | \r | |
134 | Returns TRUE if DEBUG()macros are enabled.\r | |
135 | \r | |
136 | This function returns TRUE if the DEBUG_PROPERTY_DEBUG_PRINT_ENABLED bit of \r | |
137 | PcdDebugProperyMask is set. Otherwise FALSE is returned.\r | |
138 | \r | |
139 | @retval TRUE The DEBUG_PROPERTY_DEBUG_PRINT_ENABLED bit of PcdDebugProperyMask is set.\r | |
140 | @retval FALSE The DEBUG_PROPERTY_DEBUG_PRINT_ENABLED bit of PcdDebugProperyMask is clear.\r | |
38bbd3d9 | 141 | \r |
142 | @return Always return FALSE.\r | |
e1f414b6 | 143 | \r |
144 | **/\r | |
145 | BOOLEAN\r | |
146 | EFIAPI\r | |
147 | DebugPrintEnabled (\r | |
148 | VOID\r | |
149 | )\r | |
150 | {\r | |
151 | return FALSE;\r | |
152 | }\r | |
153 | \r | |
154 | \r | |
155 | /**\r | |
156 | \r | |
157 | Returns TRUE if DEBUG_CODE()macros are enabled.\r | |
158 | \r | |
159 | This function returns TRUE if the DEBUG_PROPERTY_DEBUG_CODE_ENABLED bit of \r | |
160 | PcdDebugProperyMask is set. Otherwise FALSE is returned.\r | |
161 | \r | |
162 | @retval TRUE The DEBUG_PROPERTY_DEBUG_CODE_ENABLED bit of PcdDebugProperyMask is set.\r | |
163 | @retval FALSE The DEBUG_PROPERTY_DEBUG_CODE_ENABLED bit of PcdDebugProperyMask is clear.\r | |
38bbd3d9 | 164 | \r |
165 | @return Always return FALSE.\r | |
e1f414b6 | 166 | \r |
167 | **/\r | |
168 | BOOLEAN\r | |
169 | EFIAPI\r | |
170 | DebugCodeEnabled (\r | |
171 | VOID\r | |
172 | )\r | |
173 | {\r | |
174 | return FALSE;\r | |
175 | }\r | |
176 | \r | |
177 | \r | |
178 | /**\r | |
179 | \r | |
180 | Returns TRUE if DEBUG_CLEAR_MEMORY()macro is enabled.\r | |
181 | \r | |
eceb3a4c | 182 | This function returns TRUE if the DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED bit of \r |
e1f414b6 | 183 | PcdDebugProperyMask is set. Otherwise FALSE is returned.\r |
184 | \r | |
eceb3a4c LG |
185 | @retval TRUE The DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED bit of PcdDebugProperyMask is set.\r |
186 | @retval FALSE The DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED bit of PcdDebugProperyMask is clear.\r | |
38bbd3d9 | 187 | \r |
188 | @return Always return FALSE.\r | |
e1f414b6 | 189 | \r |
190 | **/\r | |
191 | BOOLEAN\r | |
192 | EFIAPI\r | |
193 | DebugClearMemoryEnabled (\r | |
194 | VOID\r | |
195 | )\r | |
196 | {\r | |
197 | return FALSE;\r | |
198 | }\r |