diff options
author | Michael Kinney <michael.d.kinney@intel.com> | 2015-11-17 05:10:07 +0000 |
---|---|---|
committer | vanjeff <vanjeff@Edk2> | 2015-11-17 05:10:07 +0000 |
commit | e5240a6e42757b8637c8c56589f3978c6d4a7e41 (patch) | |
tree | 8097e36730d7e25bfd92c061ed2d14d0ae5ead6d | |
parent | 86e35c4168b5407b61f9fd53e2092dcb59926d01 (diff) | |
download | edk2-platforms-e5240a6e42757b8637c8c56589f3978c6d4a7e41.tar.xz |
UefiCpuPkg: PiSmmCpuDxeSmm: Replace PcdSet## with PcdSet##S
PcdSet## has no error status returned, then the caller has no idea about
whether the set operation is successful or not. PcdSet##S were added to
return error status and PcdSet## APIs were put in ifndef
DISABLE_NEW_DEPRECATED_INTERFACES condition. To adopt PcdSet##S and
further code development with DISABLE_NEW_DEPRECATED_INTERFACES defined,
we need to Replace PcdSet## usage with PcdSet##S.
Normally, DynamicDefault PCD set is expected to be success, but DynamicHii
PCD set failure is a legal case. So for DynamicDefault, we add assert
when set failure. For DynamicHii, we add logic to handle it.
(Sync patch r18686 from main trunk.)
Cc: "Yao, Jiewen" <jiewen.yao@intel.com>
Cc: Jeff Fan <jeff.fan@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Michael Kinney <michael.d.kinney@intel.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/branches/UDK2015@18845 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r-- | UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c b/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c index 0e39173cbb..e210c8d446 100644 --- a/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c +++ b/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c @@ -1140,7 +1140,8 @@ PiCpuSmmEntry ( // Expose address of CPU Hot Plug Data structure if CPU hot plug is supported.
//
if (FeaturePcdGet (PcdCpuHotPlugSupport)) {
- PcdSet64 (PcdCpuHotPlugDataAddress, (UINT64)(UINTN)&mCpuHotPlugData);
+ Status = PcdSet64S (PcdCpuHotPlugDataAddress, (UINT64)(UINTN)&mCpuHotPlugData);
+ ASSERT_EFI_ERROR (Status);
}
//
|