mirror of https://github.com/acidanthera/audk.git
SecurityPkg: Change complex DEBUG_CODE() to DEBUG_CODE_BEGIN/END()
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3767 Update use of DEBUG_CODE(Expression) if Expression is a complex code block with if/while/for/case statements that use {}. Cc: Andrew Fish <afish@apple.com> Cc: Leif Lindholm <leif@nuviainc.com> Cc: Michael Kubacki <michael.kubacki@microsoft.com> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
This commit is contained in:
parent
deba54761a
commit
f9f4fb2329
|
@ -263,7 +263,7 @@ Tpm12TisTpmCommand (
|
|||
UINT32 Data32;
|
||||
UINT16 RspTag;
|
||||
|
||||
DEBUG_CODE (
|
||||
DEBUG_CODE_BEGIN ();
|
||||
UINTN DebugSize;
|
||||
|
||||
DEBUG ((DEBUG_VERBOSE, "Tpm12TisTpmCommand Send - "));
|
||||
|
@ -282,7 +282,7 @@ Tpm12TisTpmCommand (
|
|||
}
|
||||
}
|
||||
DEBUG ((DEBUG_VERBOSE, "\n"));
|
||||
);
|
||||
DEBUG_CODE_END ();
|
||||
TpmOutSize = 0;
|
||||
|
||||
Status = Tpm12TisPcPrepareCommand (TisReg);
|
||||
|
@ -351,13 +351,13 @@ Tpm12TisTpmCommand (
|
|||
if (Index == sizeof (TPM_RSP_COMMAND_HDR)) break;
|
||||
}
|
||||
}
|
||||
DEBUG_CODE (
|
||||
DEBUG_CODE_BEGIN ();
|
||||
DEBUG ((DEBUG_VERBOSE, "Tpm12TisTpmCommand ReceiveHeader - "));
|
||||
for (Index = 0; Index < sizeof (TPM_RSP_COMMAND_HDR); Index++) {
|
||||
DEBUG ((DEBUG_VERBOSE, "%02x ", BufferOut[Index]));
|
||||
}
|
||||
DEBUG ((DEBUG_VERBOSE, "\n"));
|
||||
);
|
||||
DEBUG_CODE_END ();
|
||||
//
|
||||
// Check the response data header (tag, parasize and returncode)
|
||||
//
|
||||
|
@ -395,13 +395,13 @@ Tpm12TisTpmCommand (
|
|||
}
|
||||
}
|
||||
Exit:
|
||||
DEBUG_CODE (
|
||||
DEBUG_CODE_BEGIN ();
|
||||
DEBUG ((DEBUG_VERBOSE, "Tpm12TisTpmCommand Receive - "));
|
||||
for (Index = 0; Index < TpmOutSize; Index++) {
|
||||
DEBUG ((DEBUG_VERBOSE, "%02x ", BufferOut[Index]));
|
||||
}
|
||||
DEBUG ((DEBUG_VERBOSE, "\n"));
|
||||
);
|
||||
DEBUG_CODE_END ();
|
||||
MmioWrite8((UINTN)&TisReg->Status, TIS_PC_STS_READY);
|
||||
return Status;
|
||||
}
|
||||
|
|
|
@ -151,7 +151,7 @@ PtpCrbTpmCommand (
|
|||
UINT16 Data16;
|
||||
UINT32 Data32;
|
||||
|
||||
DEBUG_CODE (
|
||||
DEBUG_CODE_BEGIN ();
|
||||
UINTN DebugSize;
|
||||
|
||||
DEBUG ((DEBUG_VERBOSE, "PtpCrbTpmCommand Send - "));
|
||||
|
@ -170,7 +170,7 @@ PtpCrbTpmCommand (
|
|||
}
|
||||
}
|
||||
DEBUG ((DEBUG_VERBOSE, "\n"));
|
||||
);
|
||||
DEBUG_CODE_END ();
|
||||
TpmOutSize = 0;
|
||||
|
||||
//
|
||||
|
@ -285,13 +285,13 @@ PtpCrbTpmCommand (
|
|||
for (Index = 0; Index < sizeof (TPM2_RESPONSE_HEADER); Index++) {
|
||||
BufferOut[Index] = MmioRead8 ((UINTN)&CrbReg->CrbDataBuffer[Index]);
|
||||
}
|
||||
DEBUG_CODE (
|
||||
DEBUG_CODE_BEGIN ();
|
||||
DEBUG ((DEBUG_VERBOSE, "PtpCrbTpmCommand ReceiveHeader - "));
|
||||
for (Index = 0; Index < sizeof (TPM2_RESPONSE_HEADER); Index++) {
|
||||
DEBUG ((DEBUG_VERBOSE, "%02x ", BufferOut[Index]));
|
||||
}
|
||||
DEBUG ((DEBUG_VERBOSE, "\n"));
|
||||
);
|
||||
DEBUG_CODE_END ();
|
||||
//
|
||||
// Check the response data header (tag, parasize and returncode)
|
||||
//
|
||||
|
@ -320,13 +320,13 @@ PtpCrbTpmCommand (
|
|||
BufferOut[Index] = MmioRead8 ((UINTN)&CrbReg->CrbDataBuffer[Index]);
|
||||
}
|
||||
|
||||
DEBUG_CODE (
|
||||
DEBUG_CODE_BEGIN ();
|
||||
DEBUG ((DEBUG_VERBOSE, "PtpCrbTpmCommand Receive - "));
|
||||
for (Index = 0; Index < TpmOutSize; Index++) {
|
||||
DEBUG ((DEBUG_VERBOSE, "%02x ", BufferOut[Index]));
|
||||
}
|
||||
DEBUG ((DEBUG_VERBOSE, "\n"));
|
||||
);
|
||||
DEBUG_CODE_END ();
|
||||
|
||||
GoReady_Exit:
|
||||
//
|
||||
|
|
|
@ -218,7 +218,7 @@ Tpm2TisTpmCommand (
|
|||
UINT16 Data16;
|
||||
UINT32 Data32;
|
||||
|
||||
DEBUG_CODE (
|
||||
DEBUG_CODE_BEGIN ();
|
||||
UINTN DebugSize;
|
||||
|
||||
DEBUG ((DEBUG_VERBOSE, "Tpm2TisTpmCommand Send - "));
|
||||
|
@ -237,7 +237,7 @@ Tpm2TisTpmCommand (
|
|||
}
|
||||
}
|
||||
DEBUG ((DEBUG_VERBOSE, "\n"));
|
||||
);
|
||||
DEBUG_CODE_END ();
|
||||
TpmOutSize = 0;
|
||||
|
||||
Status = TisPcPrepareCommand (TisReg);
|
||||
|
@ -332,13 +332,13 @@ Tpm2TisTpmCommand (
|
|||
if (Index == sizeof (TPM2_RESPONSE_HEADER)) break;
|
||||
}
|
||||
}
|
||||
DEBUG_CODE (
|
||||
DEBUG_CODE_BEGIN ();
|
||||
DEBUG ((DEBUG_VERBOSE, "Tpm2TisTpmCommand ReceiveHeader - "));
|
||||
for (Index = 0; Index < sizeof (TPM2_RESPONSE_HEADER); Index++) {
|
||||
DEBUG ((DEBUG_VERBOSE, "%02x ", BufferOut[Index]));
|
||||
}
|
||||
DEBUG ((DEBUG_VERBOSE, "\n"));
|
||||
);
|
||||
DEBUG_CODE_END ();
|
||||
//
|
||||
// Check the response data header (tag,parasize and returncode )
|
||||
//
|
||||
|
@ -376,13 +376,13 @@ Tpm2TisTpmCommand (
|
|||
}
|
||||
}
|
||||
Exit:
|
||||
DEBUG_CODE (
|
||||
DEBUG_CODE_BEGIN ();
|
||||
DEBUG ((DEBUG_VERBOSE, "Tpm2TisTpmCommand Receive - "));
|
||||
for (Index = 0; Index < TpmOutSize; Index++) {
|
||||
DEBUG ((DEBUG_VERBOSE, "%02x ", BufferOut[Index]));
|
||||
}
|
||||
DEBUG ((DEBUG_VERBOSE, "\n"));
|
||||
);
|
||||
DEBUG_CODE_END ();
|
||||
MmioWrite8((UINTN)&TisReg->Status, TIS_PC_STS_READY);
|
||||
return Status;
|
||||
}
|
||||
|
|
|
@ -2677,7 +2677,7 @@ DriverEntry (
|
|||
DEBUG ((DEBUG_INFO, "Tpm2GetCapabilityManufactureID - %08x\n", mTcgDxeData.BsCap.ManufacturerID));
|
||||
}
|
||||
|
||||
DEBUG_CODE (
|
||||
DEBUG_CODE_BEGIN ();
|
||||
UINT32 FirmwareVersion1;
|
||||
UINT32 FirmwareVersion2;
|
||||
|
||||
|
@ -2687,7 +2687,7 @@ DriverEntry (
|
|||
} else {
|
||||
DEBUG ((DEBUG_INFO, "Tpm2GetCapabilityFirmwareVersion - %08x %08x\n", FirmwareVersion1, FirmwareVersion2));
|
||||
}
|
||||
);
|
||||
DEBUG_CODE_END ();
|
||||
|
||||
Status = Tpm2GetCapabilityMaxCommandResponseSize (&MaxCommandSize, &MaxResponseSize);
|
||||
if (EFI_ERROR (Status)) {
|
||||
|
|
Loading…
Reference in New Issue