mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-27 07:34:06 +02:00
SecurityPkg: Reduce verbosity of TPM DEBUG messages
Some of the TPM/TPM2 DEBUG messages are at EFI_D_INFO level, even though they are simply tracing functions that run on every boot even if there is no TPM installed. Changed verbosity to EFI_D_VERBOSE. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: "Samer El-Haj-Mahmoud" <samer.el-haj-mahmoud@hpe.com> Reviewed-by: "Jiewen Yao" <Jiewen.Yao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18476 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
7d9340a3f0
commit
6aaac3838e
@ -16,6 +16,7 @@
|
|||||||
partition data carefully.
|
partition data carefully.
|
||||||
|
|
||||||
Copyright (c) 2013 - 2015, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2013 - 2015, Intel Corporation. All rights reserved.<BR>
|
||||||
|
(C) Copyright 2015 Hewlett Packard Enterprise Development LP<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
which accompanies this distribution. The full text of the license may be found at
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -447,7 +448,7 @@ DxeTpm2MeasureBootHandler (
|
|||||||
// Tcg2 protocol is not installed. So, TPM2 is not present.
|
// Tcg2 protocol is not installed. So, TPM2 is not present.
|
||||||
// Don't do any measurement, and directly return EFI_SUCCESS.
|
// Don't do any measurement, and directly return EFI_SUCCESS.
|
||||||
//
|
//
|
||||||
DEBUG ((EFI_D_INFO, "DxeTpm2MeasureBootHandler - Tcg2 - %r\n", Status));
|
DEBUG ((EFI_D_VERBOSE, "DxeTpm2MeasureBootHandler - Tcg2 - %r\n", Status));
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
Ihis library uses TPM2 device to calculation hash.
|
Ihis library uses TPM2 device to calculation hash.
|
||||||
|
|
||||||
Copyright (c) 2013 - 2015, Intel Corporation. All rights reserved. <BR>
|
Copyright (c) 2013 - 2015, Intel Corporation. All rights reserved. <BR>
|
||||||
|
(C) Copyright 2015 Hewlett Packard Enterprise Development LP<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
which accompanies this distribution. The full text of the license may be found at
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -242,7 +243,7 @@ HashAndExtend (
|
|||||||
TPM2B_EVENT EventData;
|
TPM2B_EVENT EventData;
|
||||||
TPM2B_DIGEST Result;
|
TPM2B_DIGEST Result;
|
||||||
|
|
||||||
DEBUG((EFI_D_INFO, "\n HashAndExtend Entry \n"));
|
DEBUG((EFI_D_VERBOSE, "\n HashAndExtend Entry \n"));
|
||||||
|
|
||||||
SequenceHandle = 0xFFFFFFFF; // Know bad value
|
SequenceHandle = 0xFFFFFFFF; // Know bad value
|
||||||
|
|
||||||
@ -262,7 +263,7 @@ HashAndExtend (
|
|||||||
if (EFI_ERROR(Status)) {
|
if (EFI_ERROR(Status)) {
|
||||||
return EFI_DEVICE_ERROR;
|
return EFI_DEVICE_ERROR;
|
||||||
}
|
}
|
||||||
DEBUG((EFI_D_INFO, "\n Tpm2HashSequenceStart Success \n"));
|
DEBUG((EFI_D_VERBOSE, "\n Tpm2HashSequenceStart Success \n"));
|
||||||
|
|
||||||
Buffer = (UINT8 *)(UINTN)DataToHash;
|
Buffer = (UINT8 *)(UINTN)DataToHash;
|
||||||
for (HashLen = DataToHashLen; HashLen > sizeof(HashBuffer.buffer); HashLen -= sizeof(HashBuffer.buffer)) {
|
for (HashLen = DataToHashLen; HashLen > sizeof(HashBuffer.buffer); HashLen -= sizeof(HashBuffer.buffer)) {
|
||||||
@ -276,7 +277,7 @@ HashAndExtend (
|
|||||||
return EFI_DEVICE_ERROR;
|
return EFI_DEVICE_ERROR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
DEBUG((EFI_D_INFO, "\n Tpm2SequenceUpdate Success \n"));
|
DEBUG((EFI_D_VERBOSE, "\n Tpm2SequenceUpdate Success \n"));
|
||||||
|
|
||||||
HashBuffer.size = (UINT16)HashLen;
|
HashBuffer.size = (UINT16)HashLen;
|
||||||
CopyMem(HashBuffer.buffer, Buffer, (UINTN)HashLen);
|
CopyMem(HashBuffer.buffer, Buffer, (UINTN)HashLen);
|
||||||
@ -294,7 +295,7 @@ HashAndExtend (
|
|||||||
if (EFI_ERROR(Status)) {
|
if (EFI_ERROR(Status)) {
|
||||||
return EFI_DEVICE_ERROR;
|
return EFI_DEVICE_ERROR;
|
||||||
}
|
}
|
||||||
DEBUG((EFI_D_INFO, "\n Tpm2EventSequenceComplete Success \n"));
|
DEBUG((EFI_D_VERBOSE, "\n Tpm2EventSequenceComplete Success \n"));
|
||||||
} else {
|
} else {
|
||||||
Status = Tpm2SequenceComplete (
|
Status = Tpm2SequenceComplete (
|
||||||
SequenceHandle,
|
SequenceHandle,
|
||||||
@ -304,7 +305,7 @@ HashAndExtend (
|
|||||||
if (EFI_ERROR(Status)) {
|
if (EFI_ERROR(Status)) {
|
||||||
return EFI_DEVICE_ERROR;
|
return EFI_DEVICE_ERROR;
|
||||||
}
|
}
|
||||||
DEBUG((EFI_D_INFO, "\n Tpm2SequenceComplete Success \n"));
|
DEBUG((EFI_D_VERBOSE, "\n Tpm2SequenceComplete Success \n"));
|
||||||
|
|
||||||
DigestList->count = 1;
|
DigestList->count = 1;
|
||||||
DigestList->digests[0].hashAlg = AlgoId;
|
DigestList->digests[0].hashAlg = AlgoId;
|
||||||
@ -316,7 +317,7 @@ HashAndExtend (
|
|||||||
if (EFI_ERROR(Status)) {
|
if (EFI_ERROR(Status)) {
|
||||||
return EFI_DEVICE_ERROR;
|
return EFI_DEVICE_ERROR;
|
||||||
}
|
}
|
||||||
DEBUG((EFI_D_INFO, "\n Tpm2PcrExtend Success \n"));
|
DEBUG((EFI_D_VERBOSE, "\n Tpm2PcrExtend Success \n"));
|
||||||
}
|
}
|
||||||
|
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
TIS (TPM Interface Specification) functions used by TPM1.2.
|
TIS (TPM Interface Specification) functions used by TPM1.2.
|
||||||
|
|
||||||
Copyright (c) 2013 - 2015, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2013 - 2015, Intel Corporation. All rights reserved.<BR>
|
||||||
|
(C) Copyright 2015 Hewlett Packard Enterprise Development LP<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
which accompanies this distribution. The full text of the license may be found at
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -381,22 +382,22 @@ Tpm12TisTpmCommand (
|
|||||||
DEBUG_CODE (
|
DEBUG_CODE (
|
||||||
UINTN DebugSize;
|
UINTN DebugSize;
|
||||||
|
|
||||||
DEBUG ((EFI_D_INFO, "Tpm12TisTpmCommand Send - "));
|
DEBUG ((EFI_D_VERBOSE, "Tpm12TisTpmCommand Send - "));
|
||||||
if (SizeIn > 0x100) {
|
if (SizeIn > 0x100) {
|
||||||
DebugSize = 0x40;
|
DebugSize = 0x40;
|
||||||
} else {
|
} else {
|
||||||
DebugSize = SizeIn;
|
DebugSize = SizeIn;
|
||||||
}
|
}
|
||||||
for (Index = 0; Index < DebugSize; Index++) {
|
for (Index = 0; Index < DebugSize; Index++) {
|
||||||
DEBUG ((EFI_D_INFO, "%02x ", BufferIn[Index]));
|
DEBUG ((EFI_D_VERBOSE, "%02x ", BufferIn[Index]));
|
||||||
}
|
}
|
||||||
if (DebugSize != SizeIn) {
|
if (DebugSize != SizeIn) {
|
||||||
DEBUG ((EFI_D_INFO, "...... "));
|
DEBUG ((EFI_D_VERBOSE, "...... "));
|
||||||
for (Index = SizeIn - 0x20; Index < SizeIn; Index++) {
|
for (Index = SizeIn - 0x20; Index < SizeIn; Index++) {
|
||||||
DEBUG ((EFI_D_INFO, "%02x ", BufferIn[Index]));
|
DEBUG ((EFI_D_VERBOSE, "%02x ", BufferIn[Index]));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
DEBUG ((EFI_D_INFO, "\n"));
|
DEBUG ((EFI_D_VERBOSE, "\n"));
|
||||||
);
|
);
|
||||||
TpmOutSize = 0;
|
TpmOutSize = 0;
|
||||||
|
|
||||||
@ -467,11 +468,11 @@ Tpm12TisTpmCommand (
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
DEBUG_CODE (
|
DEBUG_CODE (
|
||||||
DEBUG ((EFI_D_INFO, "Tpm12TisTpmCommand ReceiveHeader - "));
|
DEBUG ((EFI_D_VERBOSE, "Tpm12TisTpmCommand ReceiveHeader - "));
|
||||||
for (Index = 0; Index < sizeof (TPM_RSP_COMMAND_HDR); Index++) {
|
for (Index = 0; Index < sizeof (TPM_RSP_COMMAND_HDR); Index++) {
|
||||||
DEBUG ((EFI_D_INFO, "%02x ", BufferOut[Index]));
|
DEBUG ((EFI_D_VERBOSE, "%02x ", BufferOut[Index]));
|
||||||
}
|
}
|
||||||
DEBUG ((EFI_D_INFO, "\n"));
|
DEBUG ((EFI_D_VERBOSE, "\n"));
|
||||||
);
|
);
|
||||||
//
|
//
|
||||||
// Check the reponse data header (tag,parasize and returncode )
|
// Check the reponse data header (tag,parasize and returncode )
|
||||||
@ -510,11 +511,11 @@ Tpm12TisTpmCommand (
|
|||||||
}
|
}
|
||||||
Exit:
|
Exit:
|
||||||
DEBUG_CODE (
|
DEBUG_CODE (
|
||||||
DEBUG ((EFI_D_INFO, "Tpm12TisTpmCommand Receive - "));
|
DEBUG ((EFI_D_VERBOSE, "Tpm12TisTpmCommand Receive - "));
|
||||||
for (Index = 0; Index < TpmOutSize; Index++) {
|
for (Index = 0; Index < TpmOutSize; Index++) {
|
||||||
DEBUG ((EFI_D_INFO, "%02x ", BufferOut[Index]));
|
DEBUG ((EFI_D_VERBOSE, "%02x ", BufferOut[Index]));
|
||||||
}
|
}
|
||||||
DEBUG ((EFI_D_INFO, "\n"));
|
DEBUG ((EFI_D_VERBOSE, "\n"));
|
||||||
);
|
);
|
||||||
MmioWrite8((UINTN)&TisReg->Status, TIS_PC_STS_READY);
|
MmioWrite8((UINTN)&TisReg->Status, TIS_PC_STS_READY);
|
||||||
return Status;
|
return Status;
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
TIS (TPM Interface Specification) functions used by dTPM2.0 library.
|
TIS (TPM Interface Specification) functions used by dTPM2.0 library.
|
||||||
|
|
||||||
Copyright (c) 2013 - 2015, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2013 - 2015, Intel Corporation. All rights reserved.<BR>
|
||||||
|
(C) Copyright 2015 Hewlett Packard Enterprise Development LP<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
which accompanies this distribution. The full text of the license may be found at
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -387,22 +388,22 @@ TisTpmCommand (
|
|||||||
DEBUG_CODE (
|
DEBUG_CODE (
|
||||||
UINTN DebugSize;
|
UINTN DebugSize;
|
||||||
|
|
||||||
DEBUG ((EFI_D_INFO, "Tpm2TisTpmCommand Send - "));
|
DEBUG ((EFI_D_VERBOSE, "Tpm2TisTpmCommand Send - "));
|
||||||
if (SizeIn > 0x100) {
|
if (SizeIn > 0x100) {
|
||||||
DebugSize = 0x40;
|
DebugSize = 0x40;
|
||||||
} else {
|
} else {
|
||||||
DebugSize = SizeIn;
|
DebugSize = SizeIn;
|
||||||
}
|
}
|
||||||
for (Index = 0; Index < DebugSize; Index++) {
|
for (Index = 0; Index < DebugSize; Index++) {
|
||||||
DEBUG ((EFI_D_INFO, "%02x ", BufferIn[Index]));
|
DEBUG ((EFI_D_VERBOSE, "%02x ", BufferIn[Index]));
|
||||||
}
|
}
|
||||||
if (DebugSize != SizeIn) {
|
if (DebugSize != SizeIn) {
|
||||||
DEBUG ((EFI_D_INFO, "...... "));
|
DEBUG ((EFI_D_VERBOSE, "...... "));
|
||||||
for (Index = SizeIn - 0x20; Index < SizeIn; Index++) {
|
for (Index = SizeIn - 0x20; Index < SizeIn; Index++) {
|
||||||
DEBUG ((EFI_D_INFO, "%02x ", BufferIn[Index]));
|
DEBUG ((EFI_D_VERBOSE, "%02x ", BufferIn[Index]));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
DEBUG ((EFI_D_INFO, "\n"));
|
DEBUG ((EFI_D_VERBOSE, "\n"));
|
||||||
);
|
);
|
||||||
TpmOutSize = 0;
|
TpmOutSize = 0;
|
||||||
|
|
||||||
@ -477,11 +478,11 @@ TisTpmCommand (
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
DEBUG_CODE (
|
DEBUG_CODE (
|
||||||
DEBUG ((EFI_D_INFO, "TisTpmCommand ReceiveHeader - "));
|
DEBUG ((EFI_D_VERBOSE, "TisTpmCommand ReceiveHeader - "));
|
||||||
for (Index = 0; Index < sizeof (TPM2_RESPONSE_HEADER); Index++) {
|
for (Index = 0; Index < sizeof (TPM2_RESPONSE_HEADER); Index++) {
|
||||||
DEBUG ((EFI_D_INFO, "%02x ", BufferOut[Index]));
|
DEBUG ((EFI_D_VERBOSE, "%02x ", BufferOut[Index]));
|
||||||
}
|
}
|
||||||
DEBUG ((EFI_D_INFO, "\n"));
|
DEBUG ((EFI_D_VERBOSE, "\n"));
|
||||||
);
|
);
|
||||||
//
|
//
|
||||||
// Check the reponse data header (tag,parasize and returncode )
|
// Check the reponse data header (tag,parasize and returncode )
|
||||||
@ -521,11 +522,11 @@ TisTpmCommand (
|
|||||||
}
|
}
|
||||||
Exit:
|
Exit:
|
||||||
DEBUG_CODE (
|
DEBUG_CODE (
|
||||||
DEBUG ((EFI_D_INFO, "Tpm2TisTpmCommand Receive - "));
|
DEBUG ((EFI_D_VERBOSE, "Tpm2TisTpmCommand Receive - "));
|
||||||
for (Index = 0; Index < TpmOutSize; Index++) {
|
for (Index = 0; Index < TpmOutSize; Index++) {
|
||||||
DEBUG ((EFI_D_INFO, "%02x ", BufferOut[Index]));
|
DEBUG ((EFI_D_VERBOSE, "%02x ", BufferOut[Index]));
|
||||||
}
|
}
|
||||||
DEBUG ((EFI_D_INFO, "\n"));
|
DEBUG ((EFI_D_VERBOSE, "\n"));
|
||||||
);
|
);
|
||||||
MmioWrite8((UINTN)&TisReg->Status, TIS_PC_STS_READY);
|
MmioWrite8((UINTN)&TisReg->Status, TIS_PC_STS_READY);
|
||||||
return Status;
|
return Status;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user