From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by ml01.01.org (Postfix) with ESMTP id 6ACFC1A1DFC for ; Wed, 17 Aug 2016 21:54:29 -0700 (PDT) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga101.fm.intel.com with ESMTP; 17 Aug 2016 21:54:29 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,537,1464678000"; d="scan'208";a="750256499" Received: from shwdeopenpsi014.ccr.corp.intel.com ([10.239.9.34]) by FMSMGA003.fm.intel.com with ESMTP; 17 Aug 2016 21:54:23 -0700 From: Hao Wu To: edk2-devel@lists.01.org, liming.gao@intel.com Cc: Hao Wu , Jiewen Yao , Chao Zhang Date: Thu, 18 Aug 2016 12:53:56 +0800 Message-Id: <1471496040-11796-3-git-send-email-hao.a.wu@intel.com> X-Mailer: git-send-email 1.9.5.msysgit.0 In-Reply-To: <1471496040-11796-1-git-send-email-hao.a.wu@intel.com> References: <1471496040-11796-1-git-send-email-hao.a.wu@intel.com> Subject: [PATCH v2 2/6] SecurityPkg Tcg2: Rename internal API IsZeroBuffer to InternalIsZeroBuffer X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Aug 2016 04:54:29 -0000 Before adding API IsZeroBuffer() in BaseMemoryLib at MdePkg, rename the internal implementations of IsZeroBuffer() within SecurityPkg/Tcg modules to avoid breaking bisection. Cc: Jiewen Yao Cc: Chao Zhang Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu --- SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.c | 4 ++-- SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c | 12 ++++++------ SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c | 12 ++++++------ 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.c b/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.c index db38bd4..7a97f6b 100644 --- a/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.c +++ b/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.c @@ -626,7 +626,7 @@ FillBufferWithTCG2EventLogFormat ( @retval FALSE Buffer is not all zero. **/ BOOLEAN -IsZeroBuffer ( +InternalIsZeroBuffer ( IN VOID *Buffer, IN UINTN BufferSize ) @@ -735,7 +735,7 @@ InstallTcg2ConfigForm ( } else { TempBuffer[0] = 0; for (Index = 0; Index < Pcrs.count; Index++) { - if (!IsZeroBuffer (Pcrs.pcrSelections[Index].pcrSelect, Pcrs.pcrSelections[Index].sizeofSelect)) { + if (!InternalIsZeroBuffer (Pcrs.pcrSelections[Index].pcrSelect, Pcrs.pcrSelections[Index].sizeofSelect)) { AppendBufferWithTpmAlgHash (TempBuffer, sizeof(TempBuffer), Pcrs.pcrSelections[Index].hash); } } diff --git a/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c b/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c index 95219c0..5d97556 100644 --- a/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c +++ b/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c @@ -211,7 +211,7 @@ InternalDumpHex ( @retval FALSE Buffer is not all zero. **/ BOOLEAN -IsZeroBuffer ( +InternalIsZeroBuffer ( IN VOID *Buffer, IN UINTN BufferSize ) @@ -2471,31 +2471,31 @@ DriverEntry ( switch (Pcrs.pcrSelections[Index].hash) { case TPM_ALG_SHA1: TpmHashAlgorithmBitmap |= EFI_TCG2_BOOT_HASH_ALG_SHA1; - if (!IsZeroBuffer (Pcrs.pcrSelections[Index].pcrSelect, Pcrs.pcrSelections[Index].sizeofSelect)) { + if (!InternalIsZeroBuffer (Pcrs.pcrSelections[Index].pcrSelect, Pcrs.pcrSelections[Index].sizeofSelect)) { ActivePCRBanks |= EFI_TCG2_BOOT_HASH_ALG_SHA1; } break; case TPM_ALG_SHA256: TpmHashAlgorithmBitmap |= EFI_TCG2_BOOT_HASH_ALG_SHA256; - if (!IsZeroBuffer (Pcrs.pcrSelections[Index].pcrSelect, Pcrs.pcrSelections[Index].sizeofSelect)) { + if (!InternalIsZeroBuffer (Pcrs.pcrSelections[Index].pcrSelect, Pcrs.pcrSelections[Index].sizeofSelect)) { ActivePCRBanks |= EFI_TCG2_BOOT_HASH_ALG_SHA256; } break; case TPM_ALG_SHA384: TpmHashAlgorithmBitmap |= EFI_TCG2_BOOT_HASH_ALG_SHA384; - if (!IsZeroBuffer (Pcrs.pcrSelections[Index].pcrSelect, Pcrs.pcrSelections[Index].sizeofSelect)) { + if (!InternalIsZeroBuffer (Pcrs.pcrSelections[Index].pcrSelect, Pcrs.pcrSelections[Index].sizeofSelect)) { ActivePCRBanks |= EFI_TCG2_BOOT_HASH_ALG_SHA384; } break; case TPM_ALG_SHA512: TpmHashAlgorithmBitmap |= EFI_TCG2_BOOT_HASH_ALG_SHA512; - if (!IsZeroBuffer (Pcrs.pcrSelections[Index].pcrSelect, Pcrs.pcrSelections[Index].sizeofSelect)) { + if (!InternalIsZeroBuffer (Pcrs.pcrSelections[Index].pcrSelect, Pcrs.pcrSelections[Index].sizeofSelect)) { ActivePCRBanks |= EFI_TCG2_BOOT_HASH_ALG_SHA512; } break; case TPM_ALG_SM3_256: TpmHashAlgorithmBitmap |= EFI_TCG2_BOOT_HASH_ALG_SM3_256; - if (!IsZeroBuffer (Pcrs.pcrSelections[Index].pcrSelect, Pcrs.pcrSelections[Index].sizeofSelect)) { + if (!InternalIsZeroBuffer (Pcrs.pcrSelections[Index].pcrSelect, Pcrs.pcrSelections[Index].sizeofSelect)) { ActivePCRBanks |= EFI_TCG2_BOOT_HASH_ALG_SM3_256; } break; diff --git a/SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c b/SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c index a830ba8..2cffed4 100644 --- a/SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c +++ b/SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c @@ -234,7 +234,7 @@ EndofPeiSignalNotifyCallBack ( @retval FALSE Buffer is not all zero. **/ BOOLEAN -IsZeroBuffer ( +InternalIsZeroBuffer ( IN VOID *Buffer, IN UINTN BufferSize ) @@ -383,27 +383,27 @@ SetTpm2HashMask ( DEBUG ((EFI_D_INFO, "hash - %x\n", Pcrs.pcrSelections[Index].hash)); switch (Pcrs.pcrSelections[Index].hash) { case TPM_ALG_SHA1: - if (!IsZeroBuffer (Pcrs.pcrSelections[Index].pcrSelect, Pcrs.pcrSelections[Index].sizeofSelect)) { + if (!InternalIsZeroBuffer (Pcrs.pcrSelections[Index].pcrSelect, Pcrs.pcrSelections[Index].sizeofSelect)) { ActivePcrBanks |= EFI_TCG2_BOOT_HASH_ALG_SHA1; } break; case TPM_ALG_SHA256: - if (!IsZeroBuffer (Pcrs.pcrSelections[Index].pcrSelect, Pcrs.pcrSelections[Index].sizeofSelect)) { + if (!InternalIsZeroBuffer (Pcrs.pcrSelections[Index].pcrSelect, Pcrs.pcrSelections[Index].sizeofSelect)) { ActivePcrBanks |= EFI_TCG2_BOOT_HASH_ALG_SHA256; } break; case TPM_ALG_SHA384: - if (!IsZeroBuffer (Pcrs.pcrSelections[Index].pcrSelect, Pcrs.pcrSelections[Index].sizeofSelect)) { + if (!InternalIsZeroBuffer (Pcrs.pcrSelections[Index].pcrSelect, Pcrs.pcrSelections[Index].sizeofSelect)) { ActivePcrBanks |= EFI_TCG2_BOOT_HASH_ALG_SHA384; } break; case TPM_ALG_SHA512: - if (!IsZeroBuffer (Pcrs.pcrSelections[Index].pcrSelect, Pcrs.pcrSelections[Index].sizeofSelect)) { + if (!InternalIsZeroBuffer (Pcrs.pcrSelections[Index].pcrSelect, Pcrs.pcrSelections[Index].sizeofSelect)) { ActivePcrBanks |= EFI_TCG2_BOOT_HASH_ALG_SHA512; } break; case TPM_ALG_SM3_256: - if (!IsZeroBuffer (Pcrs.pcrSelections[Index].pcrSelect, Pcrs.pcrSelections[Index].sizeofSelect)) { + if (!InternalIsZeroBuffer (Pcrs.pcrSelections[Index].pcrSelect, Pcrs.pcrSelections[Index].sizeofSelect)) { ActivePcrBanks |= EFI_TCG2_BOOT_HASH_ALG_SM3_256; } break; -- 1.9.5.msysgit.0