]>
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 |
c7d265a9 | 17 | #include <Library/DebugLib.h>\r |
e1f414b6 | 18 | \r |
19 | /**\r | |
e1f414b6 | 20 | Prints a debug message to the debug output device if the specified error level is enabled.\r |
21 | \r | |
22 | If any bit in ErrorLevel is also set in PcdDebugPrintErrorLevel, then print \r | |
23 | the message specified by Format and the associated variable argument list to \r | |
24 | the debug output device.\r | |
25 | \r | |
e1f414b6 | 26 | @param ErrorLevel The error level of the debug message.\r |
27 | @param Format Format string for the debug message to print.\r | |
285010e7 | 28 | @param ... Variable argument list whose contents are accessed \r |
29 | based on the format string specified by Format.\r | |
e1f414b6 | 30 | \r |
31 | **/\r | |
32 | VOID\r | |
33 | EFIAPI\r | |
34 | DebugPrint (\r | |
35 | IN UINTN ErrorLevel,\r | |
36 | IN CONST CHAR8 *Format,\r | |
37 | ...\r | |
38 | )\r | |
39 | {\r | |
40 | }\r | |
41 | \r | |
42 | \r | |
43 | /**\r | |
e1f414b6 | 44 | Prints an assert message containing a filename, line number, and description. \r |
45 | This may be followed by a breakpoint or a dead loop.\r | |
46 | \r | |
47 | Print a message of the form "ASSERT <FileName>(<LineNumber>): <Description>\n" \r | |
48 | to the debug output device. If DEBUG_PROPERTY_ASSERT_BREAKPOINT_ENABLED bit of \r | |
49 | PcdDebugProperyMask is set then CpuBreakpoint() is called. Otherwise, if \r | |
50 | DEBUG_PROPERTY_ASSERT_DEADLOOP_ENABLED bit of PcdDebugProperyMask is set then \r | |
51 | CpuDeadLoop() is called. If neither of these bits are set, then this function \r | |
52 | returns immediately after the message is printed to the debug output device.\r | |
53 | DebugAssert() must actively prevent recusrsion. If DebugAssert() is called while\r | |
54 | processing another DebugAssert(), then DebugAssert() must return immediately.\r | |
55 | \r | |
56 | If FileName is NULL, then a <FileName> string of "(NULL) Filename" is printed.\r | |
57 | \r | |
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 | |
83 | \r | |
cc4e0485 | 84 | If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT(). \r |
e1f414b6 | 85 | \r |
86 | @param Buffer Pointer to the target buffer to fill with PcdDebugClearMemoryValue.\r | |
87 | @param Length Number of bytes in Buffer to fill with zeros PcdDebugClearMemoryValue. \r | |
88 | \r | |
38bbd3d9 | 89 | @return Buffer filled with PcdDebugClearMemoryValue.\r |
e1f414b6 | 90 | \r |
91 | **/\r | |
92 | VOID *\r | |
93 | EFIAPI\r | |
94 | DebugClearMemory (\r | |
95 | OUT VOID *Buffer,\r | |
96 | IN UINTN Length\r | |
97 | )\r | |
98 | {\r | |
99 | return Buffer;\r | |
100 | }\r | |
101 | \r | |
102 | \r | |
103 | /**\r | |
e1f414b6 | 104 | Returns TRUE if ASSERT() macros are enabled.\r |
105 | \r | |
106 | This function returns TRUE if the DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED bit of \r | |
107 | PcdDebugProperyMask is set. Otherwise FALSE is returned.\r | |
108 | \r | |
109 | @retval TRUE The DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED bit of PcdDebugProperyMask is set.\r | |
110 | @retval FALSE The DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED bit of PcdDebugProperyMask is clear.\r | |
38bbd3d9 | 111 | \r |
112 | @return Always return FALSE.\r | |
e1f414b6 | 113 | \r |
114 | **/\r | |
115 | BOOLEAN\r | |
116 | EFIAPI\r | |
117 | DebugAssertEnabled (\r | |
118 | VOID\r | |
119 | )\r | |
120 | {\r | |
121 | return FALSE;\r | |
122 | }\r | |
123 | \r | |
124 | \r | |
125 | /**\r | |
ad400b07 | 126 | Returns TRUE if the DEBUG() macro is enabled.\r |
e1f414b6 | 127 | \r |
128 | This function returns TRUE if the DEBUG_PROPERTY_DEBUG_PRINT_ENABLED bit of \r | |
129 | PcdDebugProperyMask is set. Otherwise FALSE is returned.\r | |
130 | \r | |
131 | @retval TRUE The DEBUG_PROPERTY_DEBUG_PRINT_ENABLED bit of PcdDebugProperyMask is set.\r | |
132 | @retval FALSE The DEBUG_PROPERTY_DEBUG_PRINT_ENABLED bit of PcdDebugProperyMask is clear.\r | |
38bbd3d9 | 133 | \r |
134 | @return Always return FALSE.\r | |
e1f414b6 | 135 | \r |
136 | **/\r | |
137 | BOOLEAN\r | |
138 | EFIAPI\r | |
139 | DebugPrintEnabled (\r | |
140 | VOID\r | |
141 | )\r | |
142 | {\r | |
143 | return FALSE;\r | |
144 | }\r | |
145 | \r | |
146 | \r | |
147 | /**\r | |
ad400b07 | 148 | Returns TRUE if the DEBUG_CODE() macros are enabled.\r |
e1f414b6 | 149 | \r |
150 | This function returns TRUE if the DEBUG_PROPERTY_DEBUG_CODE_ENABLED bit of \r | |
151 | PcdDebugProperyMask is set. Otherwise FALSE is returned.\r | |
152 | \r | |
153 | @retval TRUE The DEBUG_PROPERTY_DEBUG_CODE_ENABLED bit of PcdDebugProperyMask is set.\r | |
154 | @retval FALSE The DEBUG_PROPERTY_DEBUG_CODE_ENABLED bit of PcdDebugProperyMask is clear.\r | |
38bbd3d9 | 155 | \r |
156 | @return Always return FALSE.\r | |
e1f414b6 | 157 | \r |
158 | **/\r | |
159 | BOOLEAN\r | |
160 | EFIAPI\r | |
161 | DebugCodeEnabled (\r | |
162 | VOID\r | |
163 | )\r | |
164 | {\r | |
165 | return FALSE;\r | |
166 | }\r | |
167 | \r | |
168 | \r | |
169 | /**\r | |
ad400b07 | 170 | Returns TRUE if the DEBUG_CLEAR_MEMORY() macro is enabled.\r |
e1f414b6 | 171 | \r |
eceb3a4c | 172 | This function returns TRUE if the DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED bit of \r |
e1f414b6 | 173 | PcdDebugProperyMask is set. Otherwise FALSE is returned.\r |
174 | \r | |
eceb3a4c LG |
175 | @retval TRUE The DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED bit of PcdDebugProperyMask is set.\r |
176 | @retval FALSE The DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED bit of PcdDebugProperyMask is clear.\r | |
38bbd3d9 | 177 | \r |
178 | @return Always return FALSE.\r | |
e1f414b6 | 179 | \r |
180 | **/\r | |
181 | BOOLEAN\r | |
182 | EFIAPI\r | |
183 | DebugClearMemoryEnabled (\r | |
184 | VOID\r | |
185 | )\r | |
186 | {\r | |
187 | return FALSE;\r | |
188 | }\r |