/**\r
Prints a debug message to the debug output device if the specified error level is enabled.\r
\r
- If any bit in ErrorLevel is also set in PcdDebugPrintErrorLevel, then print \r
- the message specified by Format and the associated variable argument list to \r
- the debug output device.\r
+ If any bit in ErrorLevel is also set in DebugPrintErrorLevelLib function \r
+ GetDebugPrintErrorLevel (), then print the message specified by Format and the \r
+ associated variable argument list to the debug output device.\r
\r
If Format is NULL, then ASSERT().\r
\r
--- /dev/null
+/** @file\r
+ Debug Print Error Level Library class\r
+\r
+ Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>\r
+ This program and the accompanying materials\r
+ are licensed and made available under the terms and conditions of the BSD License\r
+ which accompanies this distribution. The full text of the license may be found at\r
+ http://opensource.org/licenses/bsd-license.php.\r
+\r
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
+**/\r
+\r
+/**\r
+ Returns the debug print error level mask for the current module.\r
+\r
+ @return Debug print error level mask for the current module.\r
+\r
+**/\r
+UINT32\r
+EFIAPI\r
+GetDebugPrintErrorLevel (\r
+ VOID\r
+ );\r
+\r
+/**\r
+ Sets the global debug print error level mask fpr the entire platform.\r
+\r
+ @retval TRUE The debug print error level mask was sucessfully set.\r
+ @retval FALSE The debug print error level mask could not be set.\r
+\r
+**/\r
+BOOLEAN\r
+EFIAPI\r
+SetDebugPrintErrorLevel (\r
+ UINT32 ErrorLevel\r
+ );\r
/** @file\r
Null Base Debug Library instance with empty functions.\r
\r
- Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
/**\r
Prints a debug message to the debug output device if the specified error level is enabled.\r
\r
- If any bit in ErrorLevel is also set in PcdDebugPrintErrorLevel, then print \r
- the message specified by Format and the associated variable argument list to \r
- the debug output device.\r
+ If any bit in ErrorLevel is also set in DebugPrintErrorLevelLib function \r
+ GetDebugPrintErrorLevel (), then print the message specified by Format and the \r
+ associated variable argument list to the debug output device.\r
\r
If Format is NULL, then ASSERT().\r
\r
# Instance of Debug Library based on Serial Port Library.\r
# It uses Print Library to produce formatted output strings.\r
#\r
-# Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>\r
#\r
# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
PcdLib\r
PrintLib\r
BaseLib\r
+ DebugPrintErrorLevelLib\r
\r
[Pcd]\r
- gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel\r
gEfiMdePkgTokenSpaceGuid.PcdDebugClearMemoryValue\r
gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask\r
\r
being blocked. This may occur if a key(s) are pressed in a terminal emulator\r
used to monitor the DEBUG() and ASSERT() messages. \r
\r
- Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
#include <Library/PcdLib.h>\r
#include <Library/BaseMemoryLib.h>\r
#include <Library/SerialPortLib.h>\r
+#include <Library/DebugPrintErrorLevelLib.h>\r
\r
//\r
// Define the maximum debug and assert message length that this library supports \r
/**\r
Prints a debug message to the debug output device if the specified error level is enabled.\r
\r
- If any bit in ErrorLevel is also set in PcdDebugPrintErrorLevel, then print \r
- the message specified by Format and the associated variable argument list to \r
- the debug output device.\r
+ If any bit in ErrorLevel is also set in DebugPrintErrorLevelLib function \r
+ GetDebugPrintErrorLevel (), then print the message specified by Format and the \r
+ associated variable argument list to the debug output device.\r
\r
If Format is NULL, then ASSERT().\r
\r
//\r
// Check driver debug mask value and global mask\r
//\r
- if ((ErrorLevel & PcdGet32 (PcdDebugPrintErrorLevel)) == 0) {\r
+ if ((ErrorLevel & GetDebugPrintErrorLevel ()) == 0) {\r
return;\r
}\r
\r
--- /dev/null
+/** @file\r
+ Debug Print Error Level library instance that retrieves the current error \r
+ level from PcdDebugPrintErrorLevel. This generic library instance does not \r
+ support the setting of the global debug print error level mask for the platform.\r
+\r
+ Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>\r
+ This program and the accompanying materials\r
+ are licensed and made available under the terms and conditions of the BSD License\r
+ which accompanies this distribution. The full text of the license may be found at\r
+ http://opensource.org/licenses/bsd-license.php.\r
+\r
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
+**/\r
+\r
+#include <Base.h>\r
+#include <Library/DebugPrintErrorLevelLib.h>\r
+#include <Library/PcdLib.h>\r
+\r
+/**\r
+ Returns the debug print error level mask for the current module.\r
+\r
+ @return Debug print error level mask for the current module.\r
+\r
+**/\r
+UINT32\r
+EFIAPI\r
+GetDebugPrintErrorLevel (\r
+ VOID\r
+ )\r
+{\r
+ //\r
+ // Retrieve the current debug print error level mask from PcdDebugPrintErrorLevel.\r
+ //\r
+ return PcdGet32 (PcdDebugPrintErrorLevel);\r
+}\r
+\r
+/**\r
+ Sets the global debug print error level mask fpr the entire platform.\r
+\r
+ @retval TRUE The debug print error level mask was sucessfully set.\r
+ @retval FALSE The debug print error level mask could not be set.\r
+\r
+**/\r
+BOOLEAN\r
+EFIAPI\r
+SetDebugPrintErrorLevel (\r
+ UINT32 ErrorLevel\r
+ )\r
+{\r
+ //\r
+ // This library uinstance does not support setting the global debug print error\r
+ // level mask.\r
+ //\r
+ return FALSE;\r
+}\r
--- /dev/null
+## @file\r
+# Debug Print Error Level library instance that retrieves the current error \r
+# level from PcdDebugPrintErrorLevel. \r
+#\r
+# Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>\r
+#\r
+# This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php.\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+##\r
+\r
+[Defines]\r
+ INF_VERSION = 0x00010005\r
+ BASE_NAME = BaseDebugPrintErrorLevelLib\r
+ FILE_GUID = A2C09E18-E4D2-407e-AFCC-628B79113F72\r
+ MODULE_TYPE = BASE\r
+ VERSION_STRING = 1.0\r
+ LIBRARY_CLASS = DebugPrintErrorLevelLib\r
+\r
+#\r
+# VALID_ARCHITECTURES = IA32 X64 IPF EBC\r
+#\r
+\r
+[Sources]\r
+ BaseDebugPrintErrorLevelLib.c\r
+\r
+[Packages]\r
+ MdePkg/MdePkg.dec\r
+\r
+[LibraryClasses]\r
+ PcdLib\r
+ \r
+[Pcd]\r
+ gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel\r
/** @file\r
UEFI Debug Library that sends messages to the Console Output Device in the EFI System Table.\r
\r
- Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
#include <Library/PcdLib.h>\r
#include <Library/BaseLib.h>\r
#include <Library/BaseMemoryLib.h>\r
+#include <Library/DebugPrintErrorLevelLib.h>\r
\r
//\r
// Define the maximum debug and assert message length that this library supports \r
/**\r
Prints a debug message to the debug output device if the specified error level is enabled.\r
\r
- If any bit in ErrorLevel is also set in PcdDebugPrintErrorLevel, then print \r
- the message specified by Format and the associated variable argument list to \r
- the debug output device.\r
+ If any bit in ErrorLevel is also set in DebugPrintErrorLevelLib function \r
+ GetDebugPrintErrorLevel (), then print the message specified by Format and the \r
+ associated variable argument list to the debug output device.\r
\r
If Format is NULL, then ASSERT().\r
\r
//\r
// Check driver debug mask value and global mask\r
//\r
- if ((ErrorLevel & PcdGet32(PcdDebugPrintErrorLevel)) == 0) {\r
+ if ((ErrorLevel & GetDebugPrintErrorLevel ()) == 0) {\r
return;\r
}\r
\r
#\r
# Debug Lib that sends messages to the Console Output Device in the EFI System Table.\r
#\r
-# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2007 - 2011, Intel Corporation. All rights reserved.<BR>\r
#\r
# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
PcdLib\r
PrintLib\r
UefiBootServicesTableLib\r
+ DebugPrintErrorLevelLib\r
\r
[Pcd]\r
- gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel ## CONSUMES\r
gEfiMdePkgTokenSpaceGuid.PcdDebugClearMemoryValue ## CONSUMES\r
gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask ## CONSUMES\r
\r
/** @file\r
UEFI Debug Lib that sends messages to the Standard Error Device in the EFI System Table.\r
\r
- Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
#include <Library/PcdLib.h>\r
#include <Library/BaseLib.h>\r
#include <Library/BaseMemoryLib.h>\r
+#include <Library/DebugPrintErrorLevelLib.h>\r
\r
//\r
// Define the maximum debug and assert message length that this library supports \r
/**\r
Prints a debug message to the debug output device if the specified error level is enabled.\r
\r
- If any bit in ErrorLevel is also set in PcdDebugPrintErrorLevel, then print \r
- the message specified by Format and the associated variable argument list to \r
- the debug output device.\r
+ If any bit in ErrorLevel is also set in DebugPrintErrorLevelLib function \r
+ GetDebugPrintErrorLevel (), then print the message specified by Format and the \r
+ associated variable argument list to the debug output device.\r
\r
If Format is NULL, then ASSERT().\r
\r
//\r
// Check driver debug mask value and global mask\r
//\r
- if ((ErrorLevel & PcdGet32(PcdDebugPrintErrorLevel)) == 0) {\r
+ if ((ErrorLevel & GetDebugPrintErrorLevel ()) == 0) {\r
return;\r
}\r
\r
#\r
# Debug Lib that sends messages to the the Standard Error Device in the EFI System Table.\r
#\r
-# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2007 - 2011, Intel Corporation. All rights reserved.<BR>\r
#\r
# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
PcdLib\r
PrintLib\r
UefiBootServicesTableLib\r
+ DebugPrintErrorLevelLib\r
\r
[Pcd]\r
- gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel ## CONSUMES\r
gEfiMdePkgTokenSpaceGuid.PcdDebugClearMemoryValue ## CONSUMES\r
gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask ## CONSUMES\r
\r