SecurityPkg Tcg2: Rename internal API IsZeroBuffer to InternalIsZeroBuffer
authorHao Wu <hao.a.wu@intel.com>
Wed, 17 Aug 2016 13:12:57 +0000 (21:12 +0800)
committerHao Wu <hao.a.wu@intel.com>
Mon, 22 Aug 2016 10:54:29 +0000 (18:54 +0800)
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 <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>
SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.c
SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c
SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c

index db38bd45a32902d1b4493d241345acd3c154db74..7a97f6bdc7e67735163e996cf7d48eb252cc2219 100644 (file)
@@ -626,7 +626,7 @@ FillBufferWithTCG2EventLogFormat (
   @retval FALSE Buffer is not all zero.\r
 **/\r
 BOOLEAN\r
-IsZeroBuffer (\r
+InternalIsZeroBuffer (\r
   IN VOID  *Buffer,\r
   IN UINTN BufferSize\r
   )\r
@@ -735,7 +735,7 @@ InstallTcg2ConfigForm (
   } else {\r
     TempBuffer[0] = 0;\r
     for (Index = 0; Index < Pcrs.count; Index++) {\r
-      if (!IsZeroBuffer (Pcrs.pcrSelections[Index].pcrSelect, Pcrs.pcrSelections[Index].sizeofSelect)) {\r
+      if (!InternalIsZeroBuffer (Pcrs.pcrSelections[Index].pcrSelect, Pcrs.pcrSelections[Index].sizeofSelect)) {\r
         AppendBufferWithTpmAlgHash (TempBuffer, sizeof(TempBuffer), Pcrs.pcrSelections[Index].hash);\r
       }\r
     }\r
index 95219c0fca3877d454e0edc531cc8ffbd1177698..5d975561dec7dd2b6e60105bd03a605817e2dc18 100644 (file)
@@ -211,7 +211,7 @@ InternalDumpHex (
   @retval FALSE Buffer is not all zero.\r
 **/\r
 BOOLEAN\r
-IsZeroBuffer (\r
+InternalIsZeroBuffer (\r
   IN VOID  *Buffer,\r
   IN UINTN BufferSize\r
   )\r
@@ -2471,31 +2471,31 @@ DriverEntry (
       switch (Pcrs.pcrSelections[Index].hash) {\r
       case TPM_ALG_SHA1:\r
         TpmHashAlgorithmBitmap |= EFI_TCG2_BOOT_HASH_ALG_SHA1;\r
-        if (!IsZeroBuffer (Pcrs.pcrSelections[Index].pcrSelect, Pcrs.pcrSelections[Index].sizeofSelect)) {\r
+        if (!InternalIsZeroBuffer (Pcrs.pcrSelections[Index].pcrSelect, Pcrs.pcrSelections[Index].sizeofSelect)) {\r
           ActivePCRBanks |= EFI_TCG2_BOOT_HASH_ALG_SHA1;\r
         }        \r
         break;\r
       case TPM_ALG_SHA256:\r
         TpmHashAlgorithmBitmap |= EFI_TCG2_BOOT_HASH_ALG_SHA256;\r
-        if (!IsZeroBuffer (Pcrs.pcrSelections[Index].pcrSelect, Pcrs.pcrSelections[Index].sizeofSelect)) {\r
+        if (!InternalIsZeroBuffer (Pcrs.pcrSelections[Index].pcrSelect, Pcrs.pcrSelections[Index].sizeofSelect)) {\r
           ActivePCRBanks |= EFI_TCG2_BOOT_HASH_ALG_SHA256;\r
         }\r
         break;\r
       case TPM_ALG_SHA384:\r
         TpmHashAlgorithmBitmap |= EFI_TCG2_BOOT_HASH_ALG_SHA384;\r
-        if (!IsZeroBuffer (Pcrs.pcrSelections[Index].pcrSelect, Pcrs.pcrSelections[Index].sizeofSelect)) {\r
+        if (!InternalIsZeroBuffer (Pcrs.pcrSelections[Index].pcrSelect, Pcrs.pcrSelections[Index].sizeofSelect)) {\r
           ActivePCRBanks |= EFI_TCG2_BOOT_HASH_ALG_SHA384;\r
         }\r
         break;\r
       case TPM_ALG_SHA512:\r
         TpmHashAlgorithmBitmap |= EFI_TCG2_BOOT_HASH_ALG_SHA512;\r
-        if (!IsZeroBuffer (Pcrs.pcrSelections[Index].pcrSelect, Pcrs.pcrSelections[Index].sizeofSelect)) {\r
+        if (!InternalIsZeroBuffer (Pcrs.pcrSelections[Index].pcrSelect, Pcrs.pcrSelections[Index].sizeofSelect)) {\r
           ActivePCRBanks |= EFI_TCG2_BOOT_HASH_ALG_SHA512;\r
         }\r
         break;\r
       case TPM_ALG_SM3_256:\r
         TpmHashAlgorithmBitmap |= EFI_TCG2_BOOT_HASH_ALG_SM3_256;\r
-        if (!IsZeroBuffer (Pcrs.pcrSelections[Index].pcrSelect, Pcrs.pcrSelections[Index].sizeofSelect)) {\r
+        if (!InternalIsZeroBuffer (Pcrs.pcrSelections[Index].pcrSelect, Pcrs.pcrSelections[Index].sizeofSelect)) {\r
           ActivePCRBanks |= EFI_TCG2_BOOT_HASH_ALG_SM3_256;\r
         }\r
         break;\r
index a830ba812beebbaedfe4d6fd2b40721b831022c6..2cffed4464b82500eee8cbb4e71c8347121a7074 100644 (file)
@@ -234,7 +234,7 @@ EndofPeiSignalNotifyCallBack (
   @retval FALSE Buffer is not all zero.\r
 **/\r
 BOOLEAN\r
-IsZeroBuffer (\r
+InternalIsZeroBuffer (\r
   IN VOID  *Buffer,\r
   IN UINTN BufferSize\r
   )\r
@@ -383,27 +383,27 @@ SetTpm2HashMask (
       DEBUG ((EFI_D_INFO, "hash - %x\n", Pcrs.pcrSelections[Index].hash));\r
       switch (Pcrs.pcrSelections[Index].hash) {\r
       case TPM_ALG_SHA1:\r
-        if (!IsZeroBuffer (Pcrs.pcrSelections[Index].pcrSelect, Pcrs.pcrSelections[Index].sizeofSelect)) {\r
+        if (!InternalIsZeroBuffer (Pcrs.pcrSelections[Index].pcrSelect, Pcrs.pcrSelections[Index].sizeofSelect)) {\r
           ActivePcrBanks |= EFI_TCG2_BOOT_HASH_ALG_SHA1;\r
         }        \r
         break;\r
       case TPM_ALG_SHA256:\r
-        if (!IsZeroBuffer (Pcrs.pcrSelections[Index].pcrSelect, Pcrs.pcrSelections[Index].sizeofSelect)) {\r
+        if (!InternalIsZeroBuffer (Pcrs.pcrSelections[Index].pcrSelect, Pcrs.pcrSelections[Index].sizeofSelect)) {\r
           ActivePcrBanks |= EFI_TCG2_BOOT_HASH_ALG_SHA256;\r
         }\r
         break;\r
       case TPM_ALG_SHA384:\r
-        if (!IsZeroBuffer (Pcrs.pcrSelections[Index].pcrSelect, Pcrs.pcrSelections[Index].sizeofSelect)) {\r
+        if (!InternalIsZeroBuffer (Pcrs.pcrSelections[Index].pcrSelect, Pcrs.pcrSelections[Index].sizeofSelect)) {\r
           ActivePcrBanks |= EFI_TCG2_BOOT_HASH_ALG_SHA384;\r
         }\r
         break;\r
       case TPM_ALG_SHA512:\r
-        if (!IsZeroBuffer (Pcrs.pcrSelections[Index].pcrSelect, Pcrs.pcrSelections[Index].sizeofSelect)) {\r
+        if (!InternalIsZeroBuffer (Pcrs.pcrSelections[Index].pcrSelect, Pcrs.pcrSelections[Index].sizeofSelect)) {\r
           ActivePcrBanks |= EFI_TCG2_BOOT_HASH_ALG_SHA512;\r
         }\r
         break;\r
       case TPM_ALG_SM3_256:\r
-        if (!IsZeroBuffer (Pcrs.pcrSelections[Index].pcrSelect, Pcrs.pcrSelections[Index].sizeofSelect)) {\r
+        if (!InternalIsZeroBuffer (Pcrs.pcrSelections[Index].pcrSelect, Pcrs.pcrSelections[Index].sizeofSelect)) {\r
           ActivePcrBanks |= EFI_TCG2_BOOT_HASH_ALG_SM3_256;\r
         }\r
         break;\r