diff --git a/MdeModulePkg/Application/BootManagerMenuApp/BootManagerMenu.c b/MdeModulePkg/Application/BootManagerMenuApp/BootManagerMenu.c index c5a35c070f..d43c12f34a 100644 --- a/MdeModulePkg/Application/BootManagerMenuApp/BootManagerMenu.c +++ b/MdeModulePkg/Application/BootManagerMenuApp/BootManagerMenu.c @@ -775,8 +775,10 @@ BdsSetConsoleMode ( // // Update text mode PCD. // - PcdSet32 (PcdConOutColumn, mSetupTextModeColumn); - PcdSet32 (PcdConOutRow, mSetupTextModeRow); + Status = PcdSet32S (PcdConOutColumn, mSetupTextModeColumn); + ASSERT_EFI_ERROR (Status); + Status = PcdSet32S (PcdConOutRow, mSetupTextModeRow); + ASSERT_EFI_ERROR (Status); FreePool (Info); return EFI_SUCCESS; } @@ -817,11 +819,14 @@ BdsSetConsoleMode ( // Set PCD to Inform GraphicsConsole to change video resolution. // Set PCD to Inform Consplitter to change text mode. // - PcdSet32 (PcdVideoHorizontalResolution, NewHorizontalResolution); - PcdSet32 (PcdVideoVerticalResolution, NewVerticalResolution); - PcdSet32 (PcdConOutColumn, NewColumns); - PcdSet32 (PcdConOutRow, NewRows); - + Status = PcdSet32S (PcdVideoHorizontalResolution, NewHorizontalResolution); + ASSERT_EFI_ERROR (Status); + Status = PcdSet32S (PcdVideoVerticalResolution, NewVerticalResolution); + ASSERT_EFI_ERROR (Status); + Status = PcdSet32S (PcdConOutColumn, NewColumns); + ASSERT_EFI_ERROR (Status); + Status = PcdSet32S (PcdConOutRow, NewRows); + ASSERT_EFI_ERROR (Status); // // Video mode is changed, so restart graphics console driver and higher level driver. diff --git a/MdeModulePkg/Application/UiApp/BootMaint/Variable.c b/MdeModulePkg/Application/UiApp/BootMaint/Variable.c index 76dbd3a4a9..a8d9cd5efb 100644 --- a/MdeModulePkg/Application/UiApp/BootMaint/Variable.c +++ b/MdeModulePkg/Application/UiApp/BootMaint/Variable.c @@ -1064,9 +1064,11 @@ Var_UpdateConMode ( Status = gST->ConOut->QueryMode (gST->ConOut, Mode, &(ModeInfo.Column), &(ModeInfo.Row)); if (!EFI_ERROR(Status)) { - PcdSet32 (PcdSetupConOutColumn, (UINT32) ModeInfo.Column); - PcdSet32 (PcdSetupConOutRow, (UINT32) ModeInfo.Row); + Status = PcdSet32S (PcdSetupConOutColumn, (UINT32) ModeInfo.Column); + if (!EFI_ERROR (Status)) { + Status = PcdSet32S (PcdSetupConOutRow, (UINT32) ModeInfo.Row); + } } - return EFI_SUCCESS; + return Status; } diff --git a/MdeModulePkg/Application/UiApp/FrontPage.c b/MdeModulePkg/Application/UiApp/FrontPage.c index d1b4f5cb6a..245c3497c8 100644 --- a/MdeModulePkg/Application/UiApp/FrontPage.c +++ b/MdeModulePkg/Application/UiApp/FrontPage.c @@ -989,8 +989,10 @@ BdsSetConsoleMode ( // // Update text mode PCD. // - PcdSet32 (PcdConOutColumn, mSetupTextModeColumn); - PcdSet32 (PcdConOutRow, mSetupTextModeRow); + Status = PcdSet32S (PcdConOutColumn, mSetupTextModeColumn); + ASSERT_EFI_ERROR (Status); + Status = PcdSet32S (PcdConOutRow, mSetupTextModeRow); + ASSERT_EFI_ERROR (Status); FreePool (Info); return EFI_SUCCESS; } @@ -1031,10 +1033,14 @@ BdsSetConsoleMode ( // Set PCD to Inform GraphicsConsole to change video resolution. // Set PCD to Inform Consplitter to change text mode. // - PcdSet32 (PcdVideoHorizontalResolution, NewHorizontalResolution); - PcdSet32 (PcdVideoVerticalResolution, NewVerticalResolution); - PcdSet32 (PcdConOutColumn, NewColumns); - PcdSet32 (PcdConOutRow, NewRows); + Status = PcdSet32S (PcdVideoHorizontalResolution, NewHorizontalResolution); + ASSERT_EFI_ERROR (Status); + Status = PcdSet32S (PcdVideoVerticalResolution, NewVerticalResolution); + ASSERT_EFI_ERROR (Status); + Status = PcdSet32S (PcdConOutColumn, NewColumns); + ASSERT_EFI_ERROR (Status); + Status = PcdSet32S (PcdConOutRow, NewRows); + ASSERT_EFI_ERROR (Status); // diff --git a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c index bea206d35b..dae97b09a2 100644 --- a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c +++ b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c @@ -16,7 +16,7 @@ never removed. Such design ensures sytem function well during none console device situation. -Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.
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 @@ -2946,8 +2946,10 @@ ConsplitterSetConsoleOutMode ( Status = TextOut->SetMode (TextOut, BaseMode); ASSERT(!EFI_ERROR(Status)); - PcdSet32 (PcdConOutColumn, 80); - PcdSet32 (PcdConOutRow, 25); + Status = PcdSet32S (PcdConOutColumn, 80); + ASSERT(!EFI_ERROR(Status)); + Status = PcdSet32S (PcdConOutRow, 25); + ASSERT(!EFI_ERROR(Status)); } return ;