From: Dandan Bi Date: Tue, 8 Dec 2015 08:03:42 +0000 (+0000) Subject: MdeModulePkg: Use PcdSet##S to replace PcdSet## X-Git-Tag: edk2-stable201903~8339 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=e750958bbc66bbc6e3d00bd853599058709f4604 MdeModulePkg: Use PcdSet##S to replace PcdSet## Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi Reviewed-by: Qiu Shumin git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19166 6f19259b-4bc3-4df7-8a09-765794883524 --- diff --git a/MdeModulePkg/Library/BootMaintenanceManagerLib/BootMaintenance.c b/MdeModulePkg/Library/BootMaintenanceManagerLib/BootMaintenance.c index 9b0653c4a9..55c294dd73 100644 --- a/MdeModulePkg/Library/BootMaintenanceManagerLib/BootMaintenance.c +++ b/MdeModulePkg/Library/BootMaintenanceManagerLib/BootMaintenance.c @@ -237,8 +237,10 @@ BmmBdsSetConsoleMode ( // // Update text mode PCD. // - PcdSet32 (PcdConOutColumn, mBmmSetupTextModeColumn); - PcdSet32 (PcdConOutRow, mBmmSetupTextModeRow); + Status = PcdSet32S (PcdConOutColumn, mBmmSetupTextModeColumn); + ASSERT_EFI_ERROR (Status); + Status = PcdSet32S (PcdConOutRow, mBmmSetupTextModeRow); + ASSERT_EFI_ERROR (Status); FreePool (Info); return EFI_SUCCESS; } @@ -279,10 +281,14 @@ BmmBdsSetConsoleMode ( // 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/Library/BootManagerLib/BootManager.c b/MdeModulePkg/Library/BootManagerLib/BootManager.c index 140929298c..7823660a9c 100644 --- a/MdeModulePkg/Library/BootManagerLib/BootManager.c +++ b/MdeModulePkg/Library/BootManagerLib/BootManager.c @@ -212,8 +212,10 @@ BmBdsSetConsoleMode ( // // Update text mode PCD. // - PcdSet32 (PcdConOutColumn, mBmSetupTextModeColumn); - PcdSet32 (PcdConOutRow, mBmSetupTextModeRow); + Status = PcdSet32S (PcdConOutColumn, mBmSetupTextModeColumn); + ASSERT_EFI_ERROR (Status); + Status = PcdSet32S (PcdConOutRow, mBmSetupTextModeRow); + ASSERT_EFI_ERROR (Status); FreePool (Info); return EFI_SUCCESS; } @@ -254,10 +256,14 @@ BmBdsSetConsoleMode ( // 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.