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