]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Library/UefiDebugLibConOut/DebugLib.c
MdePkg PeiMemoryAllocationLib: Update InternalAllocateAlignedPages
[mirror_edk2.git] / MdePkg / Library / UefiDebugLibConOut / DebugLib.c
index e0ac471f95bb1521510a5e97ff296ff05bf4543d..0bc112fd1b6f5ba17f37b1805459e93721acad6d 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   UEFI Debug Library that sends messages to the Console Output Device in the EFI System Table.\r
 \r
-  Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2006 - 2015, 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
@@ -121,7 +121,8 @@ DebugAssert (
   UnicodeSPrintAsciiFormat (\r
     Buffer, \r
     sizeof (Buffer), \r
-    "ASSERT %a(%d): %a\n", \r
+    "ASSERT [%a] %a(%d): %a\n",\r
+    gEfiCallerBaseName,\r
     FileName, \r
     LineNumber, \r
     Description\r
@@ -257,3 +258,21 @@ DebugClearMemoryEnabled (
 {\r
   return (BOOLEAN) ((PcdGet8(PcdDebugPropertyMask) & DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED) != 0);\r
 }\r
+\r
+/**\r
+  Returns TRUE if any one of the bit is set both in ErrorLevel and PcdFixedDebugPrintErrorLevel.\r
+\r
+  This function compares the bit mask of ErrorLevel and PcdFixedDebugPrintErrorLevel.\r
+\r
+  @retval  TRUE    Current ErrorLevel is supported.\r
+  @retval  FALSE   Current ErrorLevel is not supported.\r
+\r
+**/\r
+BOOLEAN\r
+EFIAPI\r
+DebugPrintLevelEnabled (\r
+  IN  CONST UINTN        ErrorLevel\r
+  )\r
+{\r
+  return (BOOLEAN) ((ErrorLevel & PcdGet32(PcdFixedDebugPrintErrorLevel)) != 0);\r
+}\r