Revision: 16797
          http://sourceforge.net/p/edk2/code/16797
Author:   lgao4
Date:     2015-02-06 06:38:37 +0000 (Fri, 06 Feb 2015)
Log Message:
-----------
OvmfPkg: Update PlatformBaseDebugLibIoPort library

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

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

Modified Paths:
--------------
    trunk/edk2/OvmfPkg/Library/PlatformDebugLibIoPort/DebugLib.c
    trunk/edk2/OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.inf

Modified: trunk/edk2/OvmfPkg/Library/PlatformDebugLibIoPort/DebugLib.c
===================================================================
--- trunk/edk2/OvmfPkg/Library/PlatformDebugLibIoPort/DebugLib.c        
2015-02-06 06:37:59 UTC (rev 16796)
+++ trunk/edk2/OvmfPkg/Library/PlatformDebugLibIoPort/DebugLib.c        
2015-02-06 06:38:37 UTC (rev 16797)
@@ -2,7 +2,7 @@
   Base Debug library instance for QEMU debug port.
   It uses PrintLib to send debug messages to a fixed I/O port.
 
-  Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
+  Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
   Copyright (c) 2012, Red Hat, Inc.<BR>
   This program and the accompanying materials
   are licensed and made available under the terms and conditions of the BSD 
License
@@ -267,3 +267,20 @@
   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: 
trunk/edk2/OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.inf
===================================================================
--- 
trunk/edk2/OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.inf    
    2015-02-06 06:37:59 UTC (rev 16796)
+++ 
trunk/edk2/OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.inf    
    2015-02-06 06:38:37 UTC (rev 16797)
@@ -2,7 +2,7 @@
 #  Instance of Debug Library for the QEMU debug console port.
 #  It uses Print Library to produce formatted output strings.
 #
-#  Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
+#  Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
 #  Copyright (c) 2012, Red Hat, Inc.<BR>
 #
 #  This program and the accompanying materials
@@ -47,4 +47,5 @@
   gUefiOvmfPkgTokenSpaceGuid.PcdDebugIoPort                ## CONSUMES
   gEfiMdePkgTokenSpaceGuid.PcdDebugClearMemoryValue        ## 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