Revision: 16810
          http://sourceforge.net/p/edk2/code/16810
Author:   vanjeff
Date:     2015-02-06 07:43:23 +0000 (Fri, 06 Feb 2015)
Log Message:
-----------
MdePkg: Update BaseDebugLibConOut library

Implement new API DebugPrintLevelEnabled() to base on PCD 
PcdFixedDebugPrintErrorLevel.

(Sync patch r16792 from main trunk.)

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <[email protected]>
Reviewed-by: Star Zeng <[email protected]>

Revision Links:
--------------
    http://sourceforge.net/p/edk2/code/16792

Modified Paths:
--------------
    branches/UDK2014.SP1/MdePkg/Library/UefiDebugLibConOut/DebugLib.c
    
branches/UDK2014.SP1/MdePkg/Library/UefiDebugLibConOut/UefiDebugLibConOut.inf

Modified: branches/UDK2014.SP1/MdePkg/Library/UefiDebugLibConOut/DebugLib.c
===================================================================
--- branches/UDK2014.SP1/MdePkg/Library/UefiDebugLibConOut/DebugLib.c   
2015-02-06 07:42:30 UTC (rev 16809)
+++ branches/UDK2014.SP1/MdePkg/Library/UefiDebugLibConOut/DebugLib.c   
2015-02-06 07:43:23 UTC (rev 16810)
@@ -1,7 +1,7 @@
 /** @file
   UEFI Debug Library that sends messages to the Console Output Device in the 
EFI System Table.
 
-  Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
+  Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
   This program and the accompanying materials                          
   are licensed and made available under the terms and conditions of the BSD 
License         
   which accompanies this distribution.  The full text of the license may be 
found at        
@@ -257,3 +257,21 @@
 {
   return (BOOLEAN) ((PcdGet8(PcdDebugPropertyMask) & 
DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED) != 0);
 }
+
+/**
+  Returns TRUE if any one of the bit is set both in ErrorLevel and 
PcdFixedDebugPrintErrorLevel.
+
+  This function compares the bit mask of ErrorLevel and 
PcdFixedDebugPrintErrorLevel.
+
+  @retval  TRUE    Current ErrorLevel is supported.
+  @retval  FALSE   Current ErrorLevel is not supported.
+
+**/
+BOOLEAN
+EFIAPI
+DebugPrintLevelEnabled (
+  IN  CONST UINTN        ErrorLevel
+  )
+{
+  return (BOOLEAN) ((ErrorLevel & PcdGet32(PcdFixedDebugPrintErrorLevel)) != 
0);
+}

Modified: 
branches/UDK2014.SP1/MdePkg/Library/UefiDebugLibConOut/UefiDebugLibConOut.inf
===================================================================
--- 
branches/UDK2014.SP1/MdePkg/Library/UefiDebugLibConOut/UefiDebugLibConOut.inf   
    2015-02-06 07:42:30 UTC (rev 16809)
+++ 
branches/UDK2014.SP1/MdePkg/Library/UefiDebugLibConOut/UefiDebugLibConOut.inf   
    2015-02-06 07:43:23 UTC (rev 16810)
@@ -3,7 +3,7 @@
 #
 #  Debug Lib that sends messages to the Console Output Device in the EFI 
System Table.
 #
-#  Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
+#  Copyright (c) 2007 - 2015, Intel Corporation. All rights reserved.<BR>
 #
 #  This program and the accompanying materials
 #  are licensed and made available under the terms and conditions of the BSD 
License
@@ -50,4 +50,5 @@
 [Pcd]
   gEfiMdePkgTokenSpaceGuid.PcdDebugClearMemoryValue        ## 
SOMETIMES_CONSUMES
   gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask            ## CONSUMES
+  gEfiMdePkgTokenSpaceGuid.PcdFixedDebugPrintErrorLevel    ## CONSUMES
 


------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to