IntelFrameworkModulePkg: Update PeiDxeDebugLibReportStatusCode library
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@16786 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
		@@ -4,7 +4,7 @@
 | 
				
			|||||||
  Note that if the debug message length is larger than the maximum allowable
 | 
					  Note that if the debug message length is larger than the maximum allowable
 | 
				
			||||||
  record length, then the debug message will be ignored directly.
 | 
					  record length, then the debug message will be ignored directly.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  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
 | 
					  This program and the accompanying materials
 | 
				
			||||||
  are licensed and made available under the terms and conditions of the BSD License
 | 
					  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
 | 
					  which accompanies this distribution.  The full text of the license may be found at
 | 
				
			||||||
@@ -441,3 +441,21 @@ DebugClearMemoryEnabled (
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
  return (BOOLEAN) ((PcdGet8 (PcdDebugPropertyMask) & DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED) != 0);
 | 
					  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);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -2,7 +2,7 @@
 | 
				
			|||||||
#  Debug Library based on report status code library
 | 
					#  Debug Library based on report status code library
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
#  Debug Library for PEIMs and DXE drivers that sends debug messages to ReportStatusCode
 | 
					#  Debug Library for PEIMs and DXE drivers that sends debug messages to ReportStatusCode
 | 
				
			||||||
#  Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
 | 
					#  Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
#  This program and the accompanying materials
 | 
					#  This program and the accompanying materials
 | 
				
			||||||
#  are licensed and made available under the terms and conditions of the BSD License
 | 
					#  are licensed and made available under the terms and conditions of the BSD License
 | 
				
			||||||
@@ -49,6 +49,7 @@
 | 
				
			|||||||
[Pcd]
 | 
					[Pcd]
 | 
				
			||||||
  gEfiMdePkgTokenSpaceGuid.PcdDebugClearMemoryValue  ## SOMETIMES_CONSUMES
 | 
					  gEfiMdePkgTokenSpaceGuid.PcdDebugClearMemoryValue  ## SOMETIMES_CONSUMES
 | 
				
			||||||
  gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask      ## CONSUMES
 | 
					  gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask      ## CONSUMES
 | 
				
			||||||
 | 
					  gEfiMdePkgTokenSpaceGuid.PcdFixedDebugPrintErrorLevel ## CONSUMES
 | 
				
			||||||
 | 
					
 | 
				
			||||||
[Guids]
 | 
					[Guids]
 | 
				
			||||||
  gEfiStatusCodeDataTypeDebugGuid    ## SOMETIMES_CONSUMES ## GUID
 | 
					  gEfiStatusCodeDataTypeDebugGuid    ## SOMETIMES_CONSUMES ## GUID
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user