mirror of https://github.com/acidanthera/audk.git
SecurityPkg Tcg2: Rename internal API IsZeroBuffer to InternalIsZeroBuffer
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>
This commit is contained in:
parent
313831d933
commit
bce0133b7f
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue