diff --git a/SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRouterDxe.c b/SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRouterDxe.c index 89673373c4..4f3c8dfa7c 100644 --- a/SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRouterDxe.c +++ b/SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRouterDxe.c @@ -205,6 +205,7 @@ RegisterHashInterfaceLib ( UINTN Index; UINT32 HashMask; UINT32 BiosSupportedHashMask; + EFI_STATUS Status; // // Check allow @@ -218,7 +219,8 @@ RegisterHashInterfaceLib ( return EFI_OUT_OF_RESOURCES; } BiosSupportedHashMask = PcdGet32 (PcdTcg2HashAlgorithmBitmap); - PcdSet32 (PcdTcg2HashAlgorithmBitmap, BiosSupportedHashMask | HashMask); + Status = PcdSet32S (PcdTcg2HashAlgorithmBitmap, BiosSupportedHashMask | HashMask); + ASSERT_EFI_ERROR (Status); // // Check duplication diff --git a/SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRouterPei.c b/SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRouterPei.c index 98c07933d8..c3d487958b 100644 --- a/SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRouterPei.c +++ b/SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRouterPei.c @@ -258,6 +258,7 @@ RegisterHashInterfaceLib ( HASH_INTERFACE_HOB LocalHashInterfaceHob; UINT32 HashMask; UINT32 BiosSupportedHashMask; + EFI_STATUS Status; // // Check allow @@ -280,7 +281,8 @@ RegisterHashInterfaceLib ( return EFI_OUT_OF_RESOURCES; } BiosSupportedHashMask = PcdGet32 (PcdTcg2HashAlgorithmBitmap); - PcdSet32 (PcdTcg2HashAlgorithmBitmap, BiosSupportedHashMask | HashMask); + Status = PcdSet32S (PcdTcg2HashAlgorithmBitmap, BiosSupportedHashMask | HashMask); + ASSERT_EFI_ERROR (Status); // // Check duplication diff --git a/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigPeim.c b/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigPeim.c index 34767c0f49..004c7efe70 100644 --- a/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigPeim.c +++ b/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigPeim.c @@ -132,7 +132,8 @@ Tcg2ConfigPeimEntryPoint ( for (Index = 0; Index < sizeof(mTpmInstanceId)/sizeof(mTpmInstanceId[0]); Index++) { if (TpmDevice == mTpmInstanceId[Index].TpmDevice) { Size = sizeof(mTpmInstanceId[Index].TpmInstanceGuid); - PcdSetPtr (PcdTpmInstanceGuid, &Size, &mTpmInstanceId[Index].TpmInstanceGuid); + Status = PcdSetPtrS (PcdTpmInstanceGuid, &Size, &mTpmInstanceId[Index].TpmInstanceGuid); + ASSERT_EFI_ERROR (Status); DEBUG ((EFI_D_INFO, "TpmDevice PCD: %g\n", &mTpmInstanceId[Index].TpmInstanceGuid)); break; } diff --git a/SecurityPkg/Tcg/Tcg2Config/TpmDetection.c b/SecurityPkg/Tcg/Tcg2Config/TpmDetection.c index 9e93e9c2d9..33f3a21d87 100644 --- a/SecurityPkg/Tcg/Tcg2Config/TpmDetection.c +++ b/SecurityPkg/Tcg/Tcg2Config/TpmDetection.c @@ -124,6 +124,7 @@ DetectTpmDevice ( } // NO initialization needed again. - PcdSet8 (PcdTpmInitializationPolicy, 0); + Status = PcdSet8S (PcdTpmInitializationPolicy, 0); + ASSERT_EFI_ERROR (Status); return TPM_DEVICE_1_2; } diff --git a/SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c b/SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c index ec94c24e4c..4ecfbe3b84 100644 --- a/SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c +++ b/SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c @@ -410,7 +410,8 @@ SetTpm2HashMask ( } } } - PcdSet32 (PcdTpm2HashMask, ActivePcrBanks); + Status = PcdSet32S (PcdTpm2HashMask, ActivePcrBanks); + ASSERT_EFI_ERROR (Status); } /** diff --git a/SecurityPkg/Tcg/TrEEConfig/TpmDetection.c b/SecurityPkg/Tcg/TrEEConfig/TpmDetection.c index 3706c2c967..54b1ff1128 100644 --- a/SecurityPkg/Tcg/TrEEConfig/TpmDetection.c +++ b/SecurityPkg/Tcg/TrEEConfig/TpmDetection.c @@ -1,7 +1,7 @@ /** @file TPM1.2/dTPM2.0 auto detection. -Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
+Copyright (c) 2013 - 2015, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -124,6 +124,7 @@ DetectTpmDevice ( } // NO initialization needed again. - PcdSet8 (PcdTpmInitializationPolicy, 0); + Status = PcdSet8S (PcdTpmInitializationPolicy, 0); + ASSERT_EFI_ERROR (Status); return TPM_DEVICE_1_2; } diff --git a/SecurityPkg/Tcg/TrEEConfig/TrEEConfigPeim.c b/SecurityPkg/Tcg/TrEEConfig/TrEEConfigPeim.c index efe40bc3ce..b4a3d52347 100644 --- a/SecurityPkg/Tcg/TrEEConfig/TrEEConfigPeim.c +++ b/SecurityPkg/Tcg/TrEEConfig/TrEEConfigPeim.c @@ -132,7 +132,8 @@ TrEEConfigPeimEntryPoint ( for (Index = 0; Index < sizeof(mTpmInstanceId)/sizeof(mTpmInstanceId[0]); Index++) { if (TpmDevice == mTpmInstanceId[Index].TpmDevice) { Size = sizeof(mTpmInstanceId[Index].TpmInstanceGuid); - PcdSetPtr (PcdTpmInstanceGuid, &Size, &mTpmInstanceId[Index].TpmInstanceGuid); + Status = PcdSetPtrS (PcdTpmInstanceGuid, &Size, &mTpmInstanceId[Index].TpmInstanceGuid); + ASSERT_EFI_ERROR (Status); DEBUG ((EFI_D_INFO, "TpmDevice PCD: %g\n", &mTpmInstanceId[Index].TpmInstanceGuid)); break; }