]> git.proxmox.com Git - mirror_edk2.git/commitdiff
UefiCpuPkg: PiSmmCpuDxeSmm: Replace PcdSet## with PcdSet##S
authorMichael Kinney <michael.d.kinney@intel.com>
Tue, 27 Oct 2015 16:15:03 +0000 (16:15 +0000)
committermdkinney <mdkinney@Edk2>
Tue, 27 Oct 2015 16:15:03 +0000 (16:15 +0000)
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.

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/trunk/edk2@18686 6f19259b-4bc3-4df7-8a09-765794883524

UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c

index 0e39173cbbe89864d9a03655b8502bece0332b2e..e210c8d44659357e02e6989021148e57842e287c 100644 (file)
@@ -1140,7 +1140,8 @@ PiCpuSmmEntry (
   // Expose address of CPU Hot Plug Data structure if CPU hot plug is supported.\r
   //\r
   if (FeaturePcdGet (PcdCpuHotPlugSupport)) {\r
-    PcdSet64 (PcdCpuHotPlugDataAddress, (UINT64)(UINTN)&mCpuHotPlugData);\r
+    Status = PcdSet64S (PcdCpuHotPlugDataAddress, (UINT64)(UINTN)&mCpuHotPlugData);\r
+    ASSERT_EFI_ERROR (Status);\r
   }\r
 \r
   //\r