]> git.proxmox.com Git - mirror_edk2.git/commitdiff
IntelFspPkg: Update BaseFspDebugLibSerialPort library
authorLiming Gao <liming.gao@intel.com>
Fri, 6 Feb 2015 06:37:55 +0000 (06:37 +0000)
committerlgao4 <lgao4@Edk2>
Fri, 6 Feb 2015 06:37:55 +0000 (06:37 +0000)
Implement new API DebugPrintLevelEnabled() to base on PCD PcdFixedDebugPrintErrorLevel.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16795 6f19259b-4bc3-4df7-8a09-765794883524

IntelFspPkg/Library/BaseFspDebugLibSerialPort/BaseFspDebugLibSerialPort.inf
IntelFspPkg/Library/BaseFspDebugLibSerialPort/DebugLib.c

index 00d79705ae5de3ff69b25424c023e3c813781de5..e706c3cb9d9fa72ab9e9adc13dbcdd0813d66836 100644 (file)
@@ -47,4 +47,5 @@
 [Pcd]\r
   gEfiMdePkgTokenSpaceGuid.PcdDebugClearMemoryValue       ## CONSUMES\r
   gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask           ## CONSUMES\r
+  gEfiMdePkgTokenSpaceGuid.PcdFixedDebugPrintErrorLevel   ## CONSUMES\r
 \r
index 471659072cce174914a67308daed88f6c92c2c6f..8d90a1a598c3cc2720522a0285703fa370ab5ad8 100644 (file)
@@ -1,6 +1,6 @@
 /** @file\r
 \r
-  Copyright (c) 2014, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2014 - 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
@@ -303,3 +303,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