From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by ml01.01.org (Postfix) with ESMTP id 4E1F91A1E27 for ; Wed, 3 Aug 2016 18:24:41 -0700 (PDT) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga103.jf.intel.com with ESMTP; 03 Aug 2016 18:24:41 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,468,1464678000"; d="scan'208";a="743902933" Received: from shwdeopenpsi014.ccr.corp.intel.com ([10.239.9.34]) by FMSMGA003.fm.intel.com with ESMTP; 03 Aug 2016 18:24:40 -0700 From: Hao Wu To: edk2-devel@lists.01.org Cc: Hao Wu , Jiewen Yao , Chao Zhang Date: Thu, 4 Aug 2016 09:24:30 +0800 Message-Id: <1470273870-14376-4-git-send-email-hao.a.wu@intel.com> X-Mailer: git-send-email 1.9.5.msysgit.0 In-Reply-To: <1470273870-14376-1-git-send-email-hao.a.wu@intel.com> References: <1470273870-14376-1-git-send-email-hao.a.wu@intel.com> Subject: [PATCH 3/3] SecurityPkg Tcg2: Remove internal implementation of IsZeroBuffer() 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, 04 Aug 2016 01:24:41 -0000 This commit removes the internal implementation of the function IsZeroBuffer(). Instead, it will use the one from BaseMemoryLib. Cc: Jiewen Yao Cc: Chao Zhang Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu --- SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.c | 27 --------------------------- SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c | 27 --------------------------- SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c | 27 --------------------------- 3 files changed, 81 deletions(-) diff --git a/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.c b/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.c index db38bd4..5f4420c 100644 --- a/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.c +++ b/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.c @@ -617,33 +617,6 @@ FillBufferWithTCG2EventLogFormat ( } /** - Check if buffer is all zero. - - @param[in] Buffer Buffer to be checked. - @param[in] BufferSize Size of buffer to be checked. - - @retval TRUE Buffer is all zero. - @retval FALSE Buffer is not all zero. -**/ -BOOLEAN -IsZeroBuffer ( - IN VOID *Buffer, - IN UINTN BufferSize - ) -{ - UINT8 *BufferData; - UINTN Index; - - BufferData = Buffer; - for (Index = 0; Index < BufferSize; Index++) { - if (BufferData[Index] != 0) { - return FALSE; - } - } - return TRUE; -} - -/** This function publish the TCG2 configuration Form for TPM device. @param[in, out] PrivateData Points to TCG2 configuration private data. diff --git a/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c b/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c index 95219c0..319f245 100644 --- a/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c +++ b/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c @@ -202,33 +202,6 @@ InternalDumpHex ( } /** - Check if buffer is all zero. - - @param[in] Buffer Buffer to be checked. - @param[in] BufferSize Size of buffer to be checked. - - @retval TRUE Buffer is all zero. - @retval FALSE Buffer is not all zero. -**/ -BOOLEAN -IsZeroBuffer ( - IN VOID *Buffer, - IN UINTN BufferSize - ) -{ - UINT8 *BufferData; - UINTN Index; - - BufferData = Buffer; - for (Index = 0; Index < BufferSize; Index++) { - if (BufferData[Index] != 0) { - return FALSE; - } - } - return TRUE; -} - -/** Get All processors EFI_CPU_LOCATION in system. LocationBuf is allocated inside the function Caller is responsible to free LocationBuf. diff --git a/SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c b/SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c index a830ba8..0d779f1 100644 --- a/SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c +++ b/SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c @@ -225,33 +225,6 @@ EndofPeiSignalNotifyCallBack ( } /** - Check if buffer is all zero. - - @param[in] Buffer Buffer to be checked. - @param[in] BufferSize Size of buffer to be checked. - - @retval TRUE Buffer is all zero. - @retval FALSE Buffer is not all zero. -**/ -BOOLEAN -IsZeroBuffer ( - IN VOID *Buffer, - IN UINTN BufferSize - ) -{ - UINT8 *BufferData; - UINTN Index; - - BufferData = Buffer; - for (Index = 0; Index < BufferSize; Index++) { - if (BufferData[Index] != 0) { - return FALSE; - } - } - return TRUE; -} - -/** Get TPML_DIGEST_VALUES data size. @param[in] DigestList TPML_DIGEST_VALUES data. -- 1.9.5.msysgit.0