/** @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
//\r
return EFI_UNSUPPORTED;\r
}\r
- \r
+\r
gCallbackKey = QuestionId;\r
\r
if (Action == EFI_BROWSER_ACTION_CHANGED) {\r
// 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
}\r
}\r
\r
- return EFI_SUCCESS; \r
+ return EFI_SUCCESS;\r
}\r
\r
/**\r
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
SMBIOS_TABLE_TYPE19 *Type19Record;\r
EFI_SMBIOS_TABLE_HEADER *Record;\r
UINT64 InstalledMemory;\r
- \r
+\r
InstalledMemory = 0;\r
\r
//\r
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
PlatformBdsShowProgress (Foreground, Background, TmpStr, Color, 0, 0);\r
}\r
}\r
- \r
+\r
\r
TimeoutRemain = TimeoutDefault;\r
while (TimeoutRemain != 0) {\r
break;\r
}\r
TimeoutRemain--;\r
- \r
+\r
if (!FeaturePcdGet(PcdBootlogoOnlyEnable)) {\r
//\r
// Show progress\r
}\r
}\r
}\r
- \r
+\r
if (TmpStr != NULL) {\r
gBS->FreePool (TmpStr);\r
}\r
)\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
\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
if (EFI_ERROR (Status)) {\r
GraphicsOutput = NULL;\r
}\r
- \r
+\r
Status = gBS->HandleProtocol (\r
gST->ConsoleOutHandle,\r
&gEfiSimpleTextOutProtocolGuid,\r
);\r
if (EFI_ERROR (Status)) {\r
SimpleTextOut = NULL;\r
- } \r
+ }\r
\r
if (GraphicsOutput != NULL) {\r
//\r
\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
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
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
}\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
// Set proper video resolution and text mode for setup\r
//\r
BdsSetConsoleMode (TRUE);\r
- \r
+\r
InitializeFrontPage (FALSE);\r
\r
//\r
\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
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
);\r
if (EFI_ERROR (Status)) {\r
SimpleTextOut = NULL;\r
- } \r
+ }\r
\r
if ((GraphicsOutput == NULL) || (SimpleTextOut == NULL)) {\r
return EFI_UNSUPPORTED;\r
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
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