]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Library/DxeDebugPrintErrorLevelLib/DxeDebugPrintErrorLevelLib.c
MdeModulePkg: Clean up source files
[mirror_edk2.git] / MdeModulePkg / Library / DxeDebugPrintErrorLevelLib / DxeDebugPrintErrorLevelLib.c
index 0ba88d8eeb683324a87ad00801dcb294c8a140a3..613850f5e918342d1c2a76632dddca8b4b3a6d54 100644 (file)
@@ -1,10 +1,10 @@
 /** @file\r
-  Debug Print Error Level library instance that provide compatibility with the \r
+  Debug Print Error Level library instance that provide compatibility with the\r
   "err" shell command.  This includes support for the Debug Mask Protocol\r
   supports for global debug print error level mask stored in an EFI Variable.\r
   This library instance only support DXE Phase modules.\r
 \r
-  Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2011 - 2018, 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
@@ -32,7 +32,7 @@
   it in CurrentDebugMask.\r
 \r
   @param  This              The protocol instance pointer.\r
-  @param  CurrentDebugMask  Pointer to the debug print error level mask that \r
+  @param  CurrentDebugMask  Pointer to the debug print error level mask that\r
                             is returned.\r
 \r
   @retval EFI_SUCCESS            The current debug print error level mask was\r
@@ -45,8 +45,8 @@
 EFI_STATUS\r
 EFIAPI\r
 GetDebugMask (\r
-  IN EFI_DEBUG_MASK_PROTOCOL  *This,             \r
-  IN OUT UINTN                *CurrentDebugMask  \r
+  IN EFI_DEBUG_MASK_PROTOCOL  *This,\r
+  IN OUT UINTN                *CurrentDebugMask\r
   );\r
 \r
 /**\r
@@ -79,7 +79,7 @@ EFI_DEBUG_MASK_PROTOCOL  mDebugMaskProtocol = {
 };\r
 \r
 ///\r
-/// Global variable that is set to TRUE after the first attempt is made to \r
+/// Global variable that is set to TRUE after the first attempt is made to\r
 /// retrieve the global error level mask through the EFI Varibale Services.\r
 /// This variable prevents the EFI Variable Services from being called fort\r
 /// every DEBUG() macro.\r
@@ -91,9 +91,9 @@ BOOLEAN           mGlobalErrorLevelInitialized = FALSE;
 /// module that is using this library instance.  This variable is initially\r
 /// set to the PcdDebugPrintErrorLevel value.  If the EFI Variable exists that\r
 /// contains the global debug print error level mask, then that overrides the\r
-/// PcdDebugPrintErrorLevel value. The EFI Variable can optionally be \r
+/// PcdDebugPrintErrorLevel value. The EFI Variable can optionally be\r
 /// discovered via a HOB so early DXE drivers can access the variable. If the\r
-/// Debug Mask Protocol SetDebugMask() service is called, then that overrides \r
+/// Debug Mask Protocol SetDebugMask() service is called, then that overrides\r
 /// the PcdDebugPrintErrorLevel and the EFI Variable setting.\r
 ///\r
 UINT32            mDebugPrintErrorLevel        = 0;\r
@@ -107,12 +107,12 @@ UINT32            mDebugPrintErrorLevel        = 0;
 EFI_SYSTEM_TABLE  *mSystemTable                         = NULL;\r
 \r
 /**\r
-  The constructor function caches the PCI Express Base Address and creates a \r
+  The constructor function caches the PCI Express Base Address and creates a\r
   Set Virtual Address Map event to convert physical address to virtual addresses.\r
-  \r
+\r
   @param  ImageHandle   The firmware allocated handle for the EFI image.\r
   @param  SystemTable   A pointer to the EFI System Table.\r
-  \r
+\r
   @retval EFI_SUCCESS   The constructor completed successfully.\r
   @retval Other value   The constructor did not complete successfully.\r
 \r
@@ -125,15 +125,15 @@ DxeDebugPrintErrorLevelLibConstructor (
   )\r
 {\r
   EFI_STATUS                  Status;\r
-  \r
+\r
   //\r
   // Initialize the error level mask from PCD setting.\r
   //\r
   mDebugPrintErrorLevel = PcdGet32 (PcdDebugPrintErrorLevel);\r
-    \r
+\r
   //\r
   // Install Debug Mask Protocol onto ImageHandle\r
-  //  \r
+  //\r
   mSystemTable = SystemTable;\r
   Status = SystemTable->BootServices->InstallMultipleProtocolInterfaces (\r
                                         &ImageHandle,\r
@@ -144,22 +144,22 @@ DxeDebugPrintErrorLevelLibConstructor (
   //\r
   // Attempt to retrieve the global debug print error level mask from the EFI Variable\r
   // If the EFI Variable can not be accessed when this module's library constructors are\r
-  // executed a HOB can be used to set the global debug print error level. If no value \r
+  // executed a HOB can be used to set the global debug print error level. If no value\r
   // was found then the EFI Variable access will be reattempted on every DEBUG() print\r
   // from this module until the EFI Variable services are available.\r
   //\r
   GetDebugPrintErrorLevel ();\r
-  \r
+\r
   return Status;\r
 }\r
 \r
 /**\r
-  The destructor function frees any allocated buffers and closes the Set Virtual \r
+  The destructor function frees any allocated buffers and closes the Set Virtual\r
   Address Map event.\r
-  \r
+\r
   @param  ImageHandle   The firmware allocated handle for the EFI image.\r
   @param  SystemTable   A pointer to the EFI System Table.\r
-  \r
+\r
   @retval EFI_SUCCESS   The destructor completed successfully.\r
   @retval Other value   The destructor did not complete successfully.\r
 \r
@@ -173,7 +173,7 @@ DxeDebugPrintErrorLevelLibDestructor (
 {\r
   //\r
   // Uninstall the Debug Mask Protocol from ImageHandle\r
-  //  \r
+  //\r
   return SystemTable->BootServices->UninstallMultipleProtocolInterfaces (\r
                                       ImageHandle,\r
                                       &gEfiDebugMaskProtocolGuid, &mDebugMaskProtocol,\r
@@ -207,13 +207,13 @@ GetDebugPrintErrorLevel (
   if (mSystemTable == NULL) {\r
     return PcdGet32 (PcdDebugPrintErrorLevel);\r
   }\r
-  \r
+\r
   //\r
-  // Check to see if an attempt has been made to retrieve the global debug print \r
+  // Check to see if an attempt has been made to retrieve the global debug print\r
   // error level mask.  Since this library instance stores the global debug print\r
   // error level mask in an EFI Variable, the EFI Variable should only be accessed\r
   // once to reduce the overhead of reading the EFI Variable on every debug print\r
-  //  \r
+  //\r
   if (!mGlobalErrorLevelInitialized) {\r
     //\r
     // Make sure the TPL Level is low enough for EFI Variable Services to be called\r
@@ -222,15 +222,15 @@ GetDebugPrintErrorLevel (
     mSystemTable->BootServices->RestoreTPL (CurrentTpl);\r
     if (CurrentTpl <= TPL_CALLBACK) {\r
       //\r
-      // Attempt to retrieve the global debug print error level mask from the \r
+      // Attempt to retrieve the global debug print error level mask from the\r
       // EFI Variable\r
       //\r
       Size = sizeof (GlobalErrorLevel);\r
       Status = mSystemTable->RuntimeServices->GetVariable (\r
-                                       DEBUG_MASK_VARIABLE_NAME, \r
-                                       &gEfiGenericVariableGuid, \r
-                                       NULL, \r
-                                       &Size, \r
+                                       DEBUG_MASK_VARIABLE_NAME,\r
+                                       &gEfiGenericVariableGuid,\r
+                                       NULL,\r
+                                       &Size,\r
                                        &GlobalErrorLevel\r
                                        );\r
       if (Status != EFI_NOT_AVAILABLE_YET) {\r
@@ -270,9 +270,9 @@ GetDebugPrintErrorLevel (
 \r
 /**\r
   Sets the global debug print error level mask fpr the entire platform.\r
-  \r
+\r
   @param   ErrorLevel     Global debug print error level\r
-  \r
+\r
   @retval  TRUE           The debug print error level mask was sucessfully set.\r
   @retval  FALSE          The debug print error level mask could not be set.\r
 \r
@@ -304,18 +304,18 @@ SetDebugPrintErrorLevel (
       GlobalErrorLevel = (UINTN)ErrorLevel;\r
       Size = sizeof (GlobalErrorLevel);\r
       Status = mSystemTable->RuntimeServices->SetVariable (\r
-                                       DEBUG_MASK_VARIABLE_NAME, \r
-                                       &gEfiGenericVariableGuid, \r
+                                       DEBUG_MASK_VARIABLE_NAME,\r
+                                       &gEfiGenericVariableGuid,\r
                                        (EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS),\r
                                        Size,\r
                                        &GlobalErrorLevel\r
                                        );\r
       if (!EFI_ERROR (Status)) {\r
         //\r
-        // If the EFI Variable was updated, then update the mask value for this \r
+        // If the EFI Variable was updated, then update the mask value for this\r
         // module and return TRUE.\r
         //\r
-        mGlobalErrorLevelInitialized = TRUE;    \r
+        mGlobalErrorLevelInitialized = TRUE;\r
         mDebugPrintErrorLevel = ErrorLevel;\r
         return TRUE;\r
       }\r
@@ -332,7 +332,7 @@ SetDebugPrintErrorLevel (
   it in CurrentDebugMask.\r
 \r
   @param  This              The protocol instance pointer.\r
-  @param  CurrentDebugMask  Pointer to the debug print error level mask that \r
+  @param  CurrentDebugMask  Pointer to the debug print error level mask that\r
                             is returned.\r
 \r
   @retval EFI_SUCCESS            The current debug print error level mask was\r
@@ -345,14 +345,14 @@ SetDebugPrintErrorLevel (
 EFI_STATUS\r
 EFIAPI\r
 GetDebugMask (\r
-  IN EFI_DEBUG_MASK_PROTOCOL  *This,             \r
-  IN OUT UINTN                *CurrentDebugMask  \r
+  IN EFI_DEBUG_MASK_PROTOCOL  *This,\r
+  IN OUT UINTN                *CurrentDebugMask\r
   )\r
 {\r
   if (CurrentDebugMask == NULL) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
-  \r
+\r
   //\r
   // Retrieve the current debug mask from mDebugPrintErrorLevel\r
   //\r