]> git.proxmox.com Git - mirror_edk2.git/blobdiff - IntelFrameworkModulePkg/Universal/BdsDxe/FrontPage.c
IntelFrameworkModulePkg: Clean up source files
[mirror_edk2.git] / IntelFrameworkModulePkg / Universal / BdsDxe / FrontPage.c
index 2163710cc9666bb875b326dcfcf60514ff640738..bdf63eabbf3ec3315b9d1eb6af64a4d59d7bea90 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   FrontPage routines to handle the callbacks and browser calls\r
 \r
-Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2004 - 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
@@ -189,7 +189,7 @@ FrontPageCallback (
     //\r
     return EFI_UNSUPPORTED;\r
   }\r
-  \r
+\r
   gCallbackKey = QuestionId;\r
 \r
   if (Action == EFI_BROWSER_ACTION_CHANGED) {\r
@@ -210,7 +210,7 @@ FrontPageCallback (
       // Allocate working buffer for RFC 4646 language in supported LanguageString.\r
       //\r
       Lang = AllocatePool (AsciiStrSize (mLanguageString));\r
-      ASSERT (Lang != NULL);  \r
+      ASSERT (Lang != NULL);\r
 \r
       Index = 0;\r
       LangCode = mLanguageString;\r
@@ -279,7 +279,7 @@ FrontPageCallback (
     }\r
   }\r
 \r
-  return EFI_SUCCESS;  \r
+  return EFI_SUCCESS;\r
 }\r
 \r
 /**\r
@@ -415,7 +415,7 @@ InitializeFrontPage (
   if (gFrontPagePrivate.LanguageToken == NULL) {\r
     //\r
     // Count the language list number.\r
-    //  \r
+    //\r
     LangCode      = mLanguageString;\r
     Lang          = AllocatePool (AsciiStrSize (mLanguageString));\r
     ASSERT (Lang != NULL);\r
@@ -739,7 +739,7 @@ UpdateFrontPageStrings (
   SMBIOS_TABLE_TYPE19               *Type19Record;\r
   EFI_SMBIOS_TABLE_HEADER           *Record;\r
   UINT64                            InstalledMemory;\r
-  \r
+\r
   InstalledMemory = 0;\r
 \r
   //\r
@@ -906,7 +906,7 @@ ShowProgress (
     SetMem (&Foreground, sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL), 0xff);\r
     SetMem (&Background, sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL), 0x0);\r
     SetMem (&Color, sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL), 0xff);\r
-    \r
+\r
     TmpStr = GetStringById (STRING_TOKEN (STR_START_BOOT_OPTION));\r
 \r
     if (!FeaturePcdGet(PcdBootlogoOnlyEnable)) {\r
@@ -917,7 +917,7 @@ ShowProgress (
         PlatformBdsShowProgress (Foreground, Background, TmpStr, Color, 0, 0);\r
       }\r
     }\r
-    \r
+\r
 \r
     TimeoutRemain = TimeoutDefault;\r
     while (TimeoutRemain != 0) {\r
@@ -928,7 +928,7 @@ ShowProgress (
         break;\r
       }\r
       TimeoutRemain--;\r
-      \r
+\r
       if (!FeaturePcdGet(PcdBootlogoOnlyEnable)) {\r
         //\r
         // Show progress\r
@@ -945,7 +945,7 @@ ShowProgress (
         }\r
       }\r
     }\r
-    \r
+\r
     if (TmpStr != NULL) {\r
       gBS->FreePool (TmpStr);\r
     }\r
@@ -997,7 +997,7 @@ PlatformBdsEnterFrontPage (
   )\r
 {\r
   EFI_STATUS                         Status;\r
-  EFI_STATUS                         StatusHotkey; \r
+  EFI_STATUS                         StatusHotkey;\r
   EFI_BOOT_LOGO_PROTOCOL             *BootLogo;\r
   EFI_GRAPHICS_OUTPUT_PROTOCOL       *GraphicsOutput;\r
   EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL    *SimpleTextOut;\r
@@ -1020,7 +1020,7 @@ PlatformBdsEnterFrontPage (
 \r
   if (!mModeInitialized) {\r
     //\r
-    // After the console is ready, get current video resolution \r
+    // After the console is ready, get current video resolution\r
     // and text mode before launching setup at first time.\r
     //\r
     Status = gBS->HandleProtocol (\r
@@ -1031,7 +1031,7 @@ PlatformBdsEnterFrontPage (
     if (EFI_ERROR (Status)) {\r
       GraphicsOutput = NULL;\r
     }\r
-    \r
+\r
     Status = gBS->HandleProtocol (\r
                     gST->ConsoleOutHandle,\r
                     &gEfiSimpleTextOutProtocolGuid,\r
@@ -1039,7 +1039,7 @@ PlatformBdsEnterFrontPage (
                     );\r
     if (EFI_ERROR (Status)) {\r
       SimpleTextOut = NULL;\r
-    }  \r
+    }\r
 \r
     if (GraphicsOutput != NULL) {\r
       //\r
@@ -1062,9 +1062,9 @@ PlatformBdsEnterFrontPage (
 \r
     //\r
     // Get user defined text mode for setup.\r
-    //  \r
+    //\r
     mSetupHorizontalResolution = PcdGet32 (PcdSetupVideoHorizontalResolution);\r
-    mSetupVerticalResolution   = PcdGet32 (PcdSetupVideoVerticalResolution);      \r
+    mSetupVerticalResolution   = PcdGet32 (PcdSetupVideoVerticalResolution);\r
     mSetupTextModeColumn       = PcdGet32 (PcdSetupConOutColumn);\r
     mSetupTextModeRow          = PcdGet32 (PcdSetupConOutRow);\r
 \r
@@ -1091,7 +1091,7 @@ PlatformBdsEnterFrontPage (
   if (!EFI_ERROR(Status) && ((OsIndication & EFI_OS_INDICATIONS_BOOT_TO_FW_UI) != 0)) {\r
     //\r
     // Clear EFI_OS_INDICATIONS_BOOT_TO_FW_UI to acknowledge OS\r
-    // \r
+    //\r
     OsIndication &= ~((UINT64)EFI_OS_INDICATIONS_BOOT_TO_FW_UI);\r
     Status = gRT->SetVariable (\r
                     L"OsIndications",\r
@@ -1128,7 +1128,7 @@ PlatformBdsEnterFrontPage (
       if (!FeaturePcdGet(PcdBootlogoOnlyEnable) || !EFI_ERROR(Status) || !EFI_ERROR(StatusHotkey)){\r
         //\r
         // Ensure screen is clear when switch Console from Graphics mode to Text mode\r
-        // Skip it in normal boot \r
+        // Skip it in normal boot\r
         //\r
         gST->ConOut->EnableCursor (gST->ConOut, TRUE);\r
         gST->ConOut->ClearScreen (gST->ConOut);\r
@@ -1152,8 +1152,8 @@ PlatformBdsEnterFrontPage (
   }\r
 \r
   //\r
-  // Install BM HiiPackages. \r
-  // Keep BootMaint HiiPackage, so that it can be covered by global setting. \r
+  // Install BM HiiPackages.\r
+  // Keep BootMaint HiiPackage, so that it can be covered by global setting.\r
   //\r
   InitBMPackage ();\r
 \r
@@ -1163,7 +1163,7 @@ PlatformBdsEnterFrontPage (
     // Set proper video resolution and text mode for setup\r
     //\r
     BdsSetConsoleMode (TRUE);\r
-    \r
+\r
     InitializeFrontPage (FALSE);\r
 \r
     //\r
@@ -1272,9 +1272,9 @@ Exit:
 \r
 /**\r
   This function will change video resolution and text mode\r
-  according to defined setup mode or defined boot mode  \r
+  according to defined setup mode or defined boot mode\r
 \r
-  @param  IsSetupMode   Indicate mode is changed to setup mode or boot mode. \r
+  @param  IsSetupMode   Indicate mode is changed to setup mode or boot mode.\r
 \r
   @retval  EFI_SUCCESS  Mode is changed successfully.\r
   @retval  Others             Mode failed to be changed.\r
@@ -1302,13 +1302,13 @@ BdsSetConsoleMode (
   EFI_STATUS                            Status;\r
   UINTN                                 Index;\r
   UINTN                                 CurrentColumn;\r
-  UINTN                                 CurrentRow;  \r
+  UINTN                                 CurrentRow;\r
 \r
   MaxGopMode  = 0;\r
   MaxTextMode = 0;\r
 \r
   //\r
-  // Get current video resolution and text mode \r
+  // Get current video resolution and text mode\r
   //\r
   Status = gBS->HandleProtocol (\r
                   gST->ConsoleOutHandle,\r
@@ -1326,7 +1326,7 @@ BdsSetConsoleMode (
                   );\r
   if (EFI_ERROR (Status)) {\r
     SimpleTextOut = NULL;\r
-  }  \r
+  }\r
 \r
   if ((GraphicsOutput == NULL) || (SimpleTextOut == NULL)) {\r
     return EFI_UNSUPPORTED;\r
@@ -1347,12 +1347,12 @@ BdsSetConsoleMode (
     NewHorizontalResolution = mBootHorizontalResolution;\r
     NewVerticalResolution   = mBootVerticalResolution;\r
     NewColumns              = mBootTextModeColumn;\r
-    NewRows                 = mBootTextModeRow;   \r
+    NewRows                 = mBootTextModeRow;\r
   }\r
-  \r
+\r
   if (GraphicsOutput != NULL) {\r
     MaxGopMode  = GraphicsOutput->Mode->MaxMode;\r
-  } \r
+  }\r
 \r
   if (SimpleTextOut != NULL) {\r
     MaxTextMode = SimpleTextOut->Mode->MaxMode;\r
@@ -1456,8 +1456,8 @@ BdsSetConsoleMode (
   ASSERT_EFI_ERROR (Status);\r
   Status = PcdSet32S (PcdConOutRow, NewRows);\r
   ASSERT_EFI_ERROR (Status);\r
-  \r
-  \r
+\r
+\r
   //\r
   // Video mode is changed, so restart graphics console driver and higher level driver.\r
   // Reconnect graphics console driver and higher level driver.\r