Reviewed-by: Qiu Shumin <[email protected]> -----Original Message----- From: Bi, Dandan Sent: Monday, November 30, 2015 12:47 PM To: [email protected] Cc: Dong, Eric; Zeng, Star; Qiu, Shumin Subject: [patch] MdeModulePkg: Use PcdSet##S to replace PcdSet##
Cc: Eric Dong <[email protected]> Cc: Star Zeng <[email protected]> Cc: Qiu Shumin <[email protected]> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi <[email protected]> --- .../BootMaintenanceManagerLib/BootMaintenance.c | 18 ++++++++++++------ MdeModulePkg/Library/BootManagerLib/BootManager.c | 18 ++++++++++++------ 2 files changed, 24 insertions(+), 12 deletions(-) diff --git a/MdeModulePkg/Library/BootMaintenanceManagerLib/BootMaintenance.c b/MdeModulePkg/Library/BootMaintenanceManagerLib/BootMaintenance.c index 9b0653c..55c294d 100644 --- a/MdeModulePkg/Library/BootMaintenanceManagerLib/BootMaintenance.c +++ b/MdeModulePkg/Library/BootMaintenanceManagerLib/BootMaintenance.c @@ -235,12 +235,14 @@ BmmBdsSetConsoleMode ( Status = SimpleTextOut->SetMode (SimpleTextOut, Index); ASSERT_EFI_ERROR (Status); // // 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; } } } @@ -277,14 +279,18 @@ 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. // Reconnect graphics console driver and higher level driver. // Locate all the handles with GOP protocol and reconnect it. diff --git a/MdeModulePkg/Library/BootManagerLib/BootManager.c b/MdeModulePkg/Library/BootManagerLib/BootManager.c index 1409292..7823660 100644 --- a/MdeModulePkg/Library/BootManagerLib/BootManager.c +++ b/MdeModulePkg/Library/BootManagerLib/BootManager.c @@ -210,12 +210,14 @@ BmBdsSetConsoleMode ( Status = SimpleTextOut->SetMode (SimpleTextOut, Index); ASSERT_EFI_ERROR (Status); // // 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; } } } @@ -252,14 +254,18 @@ 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. // Reconnect graphics console driver and higher level driver. // Locate all the handles with GOP protocol and reconnect it. -- 1.9.5.msysgit.1 _______________________________________________ edk2-devel mailing list [email protected] https://lists.01.org/mailman/listinfo/edk2-devel

