summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDandan Bi <dandan.bi@intel.com>2015-12-08 08:03:42 +0000
committershenshushi <shenshushi@Edk2>2015-12-08 08:03:42 +0000
commite750958bbc66bbc6e3d00bd853599058709f4604 (patch)
tree0a2d778b9269fd663f6e1ef318ff2f2f1fe1e519
parent5ac96e3a28dd26eabee421919f67fa7c443a47f1 (diff)
downloadedk2-e750958bbc66bbc6e3d00bd853599058709f4604.tar.gz
edk2-e750958bbc66bbc6e3d00bd853599058709f4604.tar.bz2
edk2-e750958bbc66bbc6e3d00bd853599058709f4604.zip
MdeModulePkg: Use PcdSet##S to replace PcdSet##
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Qiu Shumin <shumin.qiu@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19166 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r--MdeModulePkg/Library/BootMaintenanceManagerLib/BootMaintenance.c18
-rw-r--r--MdeModulePkg/Library/BootManagerLib/BootManager.c18
2 files changed, 24 insertions, 12 deletions
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.