• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /** @file
2   Debug Print Error Level library instance that retrieves the current error
3   level from PcdDebugPrintErrorLevel.  This generic library instance does not
4   support the setting of the global debug print error level mask for the platform.
5 
6   Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>
7   This program and the accompanying materials
8   are licensed and made available under the terms and conditions of the BSD License
9   which accompanies this distribution.  The full text of the license may be found at
10   http://opensource.org/licenses/bsd-license.php.
11 
12   THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
13   WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
14 
15 **/
16 
17 #include <Base.h>
18 #include <Library/DebugPrintErrorLevelLib.h>
19 #include <Library/PcdLib.h>
20 
21 /**
22   Returns the debug print error level mask for the current module.
23 
24   @return  Debug print error level mask for the current module.
25 
26 **/
27 UINT32
28 EFIAPI
GetDebugPrintErrorLevel(VOID)29 GetDebugPrintErrorLevel (
30   VOID
31   )
32 {
33   //
34   // Retrieve the current debug print error level mask from PcdDebugPrintErrorLevel.
35   //
36   return PcdGet32 (PcdDebugPrintErrorLevel);
37 }
38 
39 /**
40   Sets the global debug print error level mask fpr the entire platform.
41 
42   @param   ErrorLevel     Global debug print error level.
43 
44   @retval  TRUE           The debug print error level mask was sucessfully set.
45   @retval  FALSE          The debug print error level mask could not be set.
46 
47 **/
48 BOOLEAN
49 EFIAPI
SetDebugPrintErrorLevel(UINT32 ErrorLevel)50 SetDebugPrintErrorLevel (
51   UINT32  ErrorLevel
52   )
53 {
54   //
55   // This library uinstance does not support setting the global debug print error
56   // level mask.
57   //
58   return FALSE;
59 }
60