]> git.proxmox.com Git - mirror_edk2.git/blame_incremental - MdePkg/Library/BaseDebugLibNull/DebugLib.c
Minor grammatical work--mostly adding periods. Sending separately a list of files...
[mirror_edk2.git] / MdePkg / Library / BaseDebugLibNull / DebugLib.c
... / ...
CommitLineData
1/** @file\r
2 Null Base Debug Library instance with empty functions.\r
3\r
4 Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>\r
5 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
15#include <Base.h>\r
16#include <Library/DebugLib.h>\r
17\r
18/**\r
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
25 If Format is NULL, then ASSERT().\r
26\r
27 @param ErrorLevel The error level of the debug message.\r
28 @param Format Format string for the debug message to print.\r
29 @param ... Variable argument list whose contents are accessed \r
30 based on the format string specified by Format.\r
31\r
32**/\r
33VOID\r
34EFIAPI\r
35DebugPrint (\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
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
48 Print a message of the form "ASSERT <FileName>(<LineNumber>): <Description>\n"\r
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
54 DebugAssert() must actively prevent recursion. If DebugAssert() is called while\r
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
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
65VOID\r
66EFIAPI\r
67DebugAssert (\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
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 If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT(). \r
84\r
85 @param Buffer Pointer to the target buffer to be filled with PcdDebugClearMemoryValue.\r
86 @param Length Number of bytes in Buffer to fill with zeros PcdDebugClearMemoryValue. \r
87\r
88 @return Buffer Pointer to the target buffer filled with PcdDebugClearMemoryValue.\r
89\r
90**/\r
91VOID *\r
92EFIAPI\r
93DebugClearMemory (\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
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
112BOOLEAN\r
113EFIAPI\r
114DebugAssertEnabled (\r
115 VOID\r
116 )\r
117{\r
118 return FALSE;\r
119}\r
120\r
121\r
122/** \r
123 Returns TRUE if DEBUG() macros are enabled.\r
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
132BOOLEAN\r
133EFIAPI\r
134DebugPrintEnabled (\r
135 VOID\r
136 )\r
137{\r
138 return FALSE;\r
139}\r
140\r
141\r
142/** \r
143 Returns TRUE if DEBUG_CODE() macros are enabled.\r
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
152BOOLEAN\r
153EFIAPI\r
154DebugCodeEnabled (\r
155 VOID\r
156 )\r
157{\r
158 return FALSE;\r
159}\r
160\r
161\r
162/** \r
163 Returns TRUE if DEBUG_CLEAR_MEMORY() macro is enabled.\r
164\r
165 This function returns TRUE if the DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED bit of \r
166 PcdDebugProperyMask is set. Otherwise FALSE is returned.\r
167\r
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
170\r
171**/\r
172BOOLEAN\r
173EFIAPI\r
174DebugClearMemoryEnabled (\r
175 VOID\r
176 )\r
177{\r
178 return FALSE;\r
179}\r