summaryrefslogtreecommitdiffstats
path: root/SecurityPkg/Tcg/Tcg2Config
diff options
context:
space:
mode:
authorHao Wu <hao.a.wu@intel.com>2016-08-17 21:28:39 +0800
committerHao Wu <hao.a.wu@intel.com>2016-08-22 18:54:32 +0800
commit72388f9c10126a718a7ac381dc6879d3337ccb8b (patch)
treec5e87deb47541fdf585a63801b32f666024be175 /SecurityPkg/Tcg/Tcg2Config
parent102b4c7cdd11172d5b7fde35a0c472ecd7fa49e7 (diff)
downloadedk2-72388f9c10126a718a7ac381dc6879d3337ccb8b.tar.gz
edk2-72388f9c10126a718a7ac381dc6879d3337ccb8b.tar.bz2
edk2-72388f9c10126a718a7ac381dc6879d3337ccb8b.zip
SecurityPkg Tcg2: Remove use of module internal API InternalIsZeroBuffer()
This commit removes the internal implementation of the function InternalIsZeroBuffer(). Instead, it will use the API IsZeroBuffer() from BaseMemoryLib in MdePkg. Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Chao Zhang <chao.b.zhang@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Chao Zhang <chao.b.zhang@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
Diffstat (limited to 'SecurityPkg/Tcg/Tcg2Config')
-rw-r--r--SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.c29
1 files changed, 1 insertions, 28 deletions
diff --git a/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.c b/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.c
index 7a97f6bdc7..5f4420ca86 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
-InternalIsZeroBuffer (
- 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.
@@ -735,7 +708,7 @@ InstallTcg2ConfigForm (
} else {
TempBuffer[0] = 0;
for (Index = 0; Index < Pcrs.count; Index++) {
- if (!InternalIsZeroBuffer (Pcrs.pcrSelections[Index].pcrSelect, Pcrs.pcrSelections[Index].sizeofSelect)) {
+ if (!IsZeroBuffer (Pcrs.pcrSelections[Index].pcrSelect, Pcrs.pcrSelections[Index].sizeofSelect)) {
AppendBufferWithTpmAlgHash (TempBuffer, sizeof(TempBuffer), Pcrs.pcrSelections[Index].hash);
}
}