public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Zhang, Chao B" <chao.b.zhang@intel.com>
To: "Wu, Hao A" <hao.a.wu@intel.com>,
	"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Cc: "Yao, Jiewen" <jiewen.yao@intel.com>
Subject: Re: [PATCH 3/3] SecurityPkg Tcg2: Remove internal implementation of IsZeroBuffer()
Date: Thu, 4 Aug 2016 13:28:22 +0000	[thread overview]
Message-ID: <FF72C7E4248F3C4E9BDF19D4918E90F21140E9B8@shsmsx102.ccr.corp.intel.com> (raw)
In-Reply-To: <1470273870-14376-4-git-send-email-hao.a.wu@intel.com>

Reviewed-by: Chao Zhang<chao.b.zhang@intel.com>





Thanks & Best regards
Chao Zhang


-----Original Message-----
From: Wu, Hao A 
Sent: Thursday, August 04, 2016 9:24 AM
To: edk2-devel@lists.01.org
Cc: Wu, Hao A; Yao, Jiewen; Zhang, Chao B
Subject: [PATCH 3/3] SecurityPkg Tcg2: Remove internal implementation of IsZeroBuffer()

This commit removes the internal implementation of the function
IsZeroBuffer(). Instead, it will use the one from BaseMemoryLib.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Chao Zhang <chao.b.zhang@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
---
 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



  reply	other threads:[~2016-08-04 13:28 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-04  1:24 [PATCH 0/3] Add APIs IsZeroBuffer and IsZeroGuid in BaseMemoryLib Hao Wu
2016-08-04  1:24 ` [PATCH 1/3] MdePkg BaseMemoryLib: Add implementation of API IsZeroGuid() Hao Wu
2016-08-04  1:24 ` [PATCH 2/3] MdePkg BaseMemoryLib: Add implementation of API IsZeroBuffer() Hao Wu
2016-08-04  1:24 ` [PATCH 3/3] SecurityPkg Tcg2: Remove internal implementation of IsZeroBuffer() Hao Wu
2016-08-04 13:28   ` Zhang, Chao B [this message]
2016-08-04  8:07 ` [PATCH 0/3] Add APIs IsZeroBuffer and IsZeroGuid in BaseMemoryLib Laszlo Ersek
2016-08-04  8:44   ` Wu, Hao A

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=FF72C7E4248F3C4E9BDF19D4918E90F21140E9B8@shsmsx102.ccr.corp.intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox