]> git.proxmox.com Git - mirror_edk2.git/blame - EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseDebugLibNull/DebugLib.c
Update the copyright notice format
[mirror_edk2.git] / EdkCompatibilityPkg / Foundation / Library / EdkIIGlueLib / Library / BaseDebugLibNull / DebugLib.c
CommitLineData
3eb9473e 1/*++\r
2 \r
2c7e5c2f
HT
3Copyright (c) 2004 - 2006, Intel Corporation. All rights reserved.<BR>\r
4This program and the accompanying materials \r
3eb9473e 5are licensed and made available under the terms and conditions of the BSD License \r
6which accompanies this distribution. The full text of the license may be found at \r
7http://opensource.org/licenses/bsd-license.php \r
8 \r
9THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
10WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
11\r
12\r
13Module Name:\r
14\r
15 DebugLib.c\r
16 \r
17Abstract: \r
18\r
19 Base Debug Library that uses PrintLib to print messages to a memory buffer.\r
20\r
21--*/\r
22\r
23#include "EdkIIGlueBase.h"\r
24\r
25/**\r
26\r
27 Prints a debug message to the debug output device if the specified error level is enabled.\r
28\r
29 If any bit in ErrorLevel is also set in PcdDebugPrintErrorLevel, then print \r
30 the message specified by Format and the associated variable argument list to \r
31 the debug output device.\r
32\r
33 If Format is NULL, then ASSERT().\r
34\r
35 @param ErrorLevel The error level of the debug message.\r
36 @param Format Format string for the debug message to print.\r
37\r
38**/\r
39VOID\r
40EFIAPI\r
41DebugPrint (\r
42 IN UINTN ErrorLevel,\r
43 IN CONST CHAR8 *Format,\r
44 ...\r
45 )\r
46{\r
47}\r
48\r
49\r
50/**\r
51\r
52 Prints an assert message containing a filename, line number, and description. \r
53 This may be followed by a breakpoint or a dead loop.\r
54\r
55 Print a message of the form "ASSERT <FileName>(<LineNumber>): <Description>\n" \r
56 to the debug output device. If DEBUG_PROPERTY_ASSERT_BREAKPOINT_ENABLED bit of \r
57 PcdDebugProperyMask is set then CpuBreakpoint() is called. Otherwise, if \r
58 DEBUG_PROPERTY_ASSERT_DEADLOOP_ENABLED bit of PcdDebugProperyMask is set then \r
59 CpuDeadLoop() is called. If neither of these bits are set, then this function \r
60 returns immediately after the message is printed to the debug output device.\r
61 DebugAssert() must actively prevent recusrsion. If DebugAssert() is called while\r
62 processing another DebugAssert(), then DebugAssert() must return immediately.\r
63\r
64 If FileName is NULL, then a <FileName> string of "(NULL) Filename" is printed.\r
65\r
66 If Description is NULL, then a <Description> string of "(NULL) Description" is printed.\r
67\r
68 @param FileName Pointer to the name of the source file that generated the assert condition.\r
69 @param LineNumber The line number in the source file that generated the assert condition\r
70 @param Description Pointer to the description of the assert condition.\r
71\r
72**/\r
73VOID\r
74EFIAPI\r
75DebugAssert (\r
76 IN CONST CHAR8 *FileName,\r
77 IN UINTN LineNumber,\r
78 IN CONST CHAR8 *Description\r
79 )\r
80{\r
81}\r
82\r
83\r
84/**\r
85\r
86 Fills a target buffer with PcdDebugClearMemoryValue, and returns the target buffer.\r
87\r
88 This function fills Length bytes of Buffer with the value specified by \r
89 PcdDebugClearMemoryValue, and returns Buffer.\r
90\r
91 If Buffer is NULL, then ASSERT().\r
92\r
93 If Length is greater than (MAX_ADDRESS ? Buffer + 1), then ASSERT(). \r
94\r
95 @param Buffer Pointer to the target buffer to fill with PcdDebugClearMemoryValue.\r
96 @param Length Number of bytes in Buffer to fill with zeros PcdDebugClearMemoryValue. \r
97\r
98 @return Buffer\r
99\r
100**/\r
101VOID *\r
102EFIAPI\r
103DebugClearMemory (\r
104 OUT VOID *Buffer,\r
105 IN UINTN Length\r
106 )\r
107{\r
108 return Buffer;\r
109}\r
110\r