mirror of https://github.com/acidanthera/audk.git
Update DebugLib to provide support for "err" command in the EFI Shell to adjust the filter mask for DEBUG() messages. The "err" command provide the ability to adjust this filter mask at a global level through an EFI Variable and at the module level through a the Debug Mask Protocol. In order to support the degree of flexibility, the DebugLib needs to use library to abstract the get/set operations to the filter mask.
1) Update PeiDxeDebugLibReportStatusCode to use DebugPrintErrorLevelLib instead of the PcdDebugPrintErrorLevel PCD. 2) Add default mappings for the DebugPrintErrorLevelLib to the DSC file for this package. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11368 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
48fff860a9
commit
c77b88d627
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
# This file is used to build all modules in IntelFrameworkModulePkg.
|
||||
#
|
||||
#Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
|
||||
#Copyright (c) 2007 - 2011, 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 that accompanies this distribution.
|
||||
#The full text of the license may be found at
|
||||
|
@ -40,6 +40,7 @@
|
|||
|
||||
[LibraryClasses]
|
||||
DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf
|
||||
DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseDebugPrintErrorLevelLib.inf
|
||||
BaseLib|MdePkg/Library/BaseLib/BaseLib.inf
|
||||
SynchronizationLib|MdePkg/Library/BaseSynchronizationLib/BaseSynchronizationLib.inf
|
||||
BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
Note that if the debug message length is larger than the maximum allowable
|
||||
record length, then the debug message will be ignored directly.
|
||||
|
||||
Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2011, 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
|
||||
|
@ -25,13 +25,14 @@
|
|||
#include <Library/BaseMemoryLib.h>
|
||||
#include <Library/ReportStatusCodeLib.h>
|
||||
#include <Library/PcdLib.h>
|
||||
#include <Library/DebugPrintErrorLevelLib.h>
|
||||
|
||||
/**
|
||||
Prints a debug message to the debug output device if the specified error level is enabled.
|
||||
|
||||
If any bit in ErrorLevel is also set in PcdDebugPrintErrorLevel, then print
|
||||
the message specified by Format and the associated variable argument list to
|
||||
the debug output device.
|
||||
If any bit in ErrorLevel is also set in DebugPrintErrorLevelLib function
|
||||
GetDebugPrintErrorLevel (), then print the message specified by Format and the
|
||||
associated variable argument list to the debug output device.
|
||||
|
||||
If Format is NULL, then ASSERT().
|
||||
|
||||
|
@ -68,7 +69,7 @@ DebugPrint (
|
|||
//
|
||||
// Check driver Debug Level value and global debug level
|
||||
//
|
||||
if ((ErrorLevel & PcdGet32 (PcdDebugPrintErrorLevel)) == 0) {
|
||||
if ((ErrorLevel & GetDebugPrintErrorLevel ()) == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
# Debug Library based on report status code library
|
||||
#
|
||||
# Debug Library for PEIMs and DXE drivers that sends debug messages to ReportStatusCode
|
||||
# Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
|
||||
# Copyright (c) 2006 - 2011, 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
|
||||
|
@ -43,9 +43,9 @@
|
|||
ReportStatusCodeLib
|
||||
BaseMemoryLib
|
||||
BaseLib
|
||||
DebugPrintErrorLevelLib
|
||||
|
||||
[Pcd]
|
||||
gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel
|
||||
gEfiMdePkgTokenSpaceGuid.PcdDebugClearMemoryValue
|
||||
gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask
|
||||
|
||||
|
|
Loading…
Reference in New Issue