mirror of https://github.com/acidanthera/audk.git
Fix execution status & DEBUG message level mismatch. EFI_D_ERROR is used only when failure/case can’t be resolved by code.
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Chao Zhang <chao.b.zhang@intel.com> Reviewed-by: Dong Guo <guo.dong@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16320 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
6f6c3a1fb6
commit
33985e3b52
|
@ -1,7 +1,7 @@
|
||||||
/** @file
|
/** @file
|
||||||
Implement defer image load services for user identification in UEFI2.2.
|
Implement defer image load services for user identification in UEFI2.2.
|
||||||
|
|
||||||
Copyright (c) 2009 - 2013, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.<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
|
||||||
|
@ -853,7 +853,7 @@ DxeDeferImageLoadHandler (
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
DEBUG ((EFI_D_ERROR, "[Security] No user identified, the image is deferred to load!\n"));
|
DEBUG ((EFI_D_INFO, "[Security] No user identified, the image is deferred to load!\n"));
|
||||||
PutDefferedImageInfo (File, FileBuffer, FileSize);
|
PutDefferedImageInfo (File, FileBuffer, FileSize);
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/** @file
|
/** @file
|
||||||
Measure TrEE required variable.
|
Measure TrEE required variable.
|
||||||
|
|
||||||
Copyright (c) 2013, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<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
|
||||||
|
@ -312,7 +312,7 @@ SecureBootHook (
|
||||||
Data,
|
Data,
|
||||||
DataSize
|
DataSize
|
||||||
);
|
);
|
||||||
DEBUG ((EFI_D_ERROR, "MeasureBootPolicyVariable - %r\n", Status));
|
DEBUG ((EFI_D_INFO, "MeasureBootPolicyVariable - %r\n", Status));
|
||||||
|
|
||||||
if (!EFI_ERROR (Status)) {
|
if (!EFI_ERROR (Status)) {
|
||||||
AddDataMeasured (VariableName, VendorGuid, Data, DataSize);
|
AddDataMeasured (VariableName, VendorGuid, Data, DataSize);
|
||||||
|
|
|
@ -509,7 +509,7 @@ DxeTpm2MeasureBootHandler (
|
||||||
// Measure GPT disk.
|
// Measure GPT disk.
|
||||||
//
|
//
|
||||||
Status = TrEEMeasureGptTable (TreeProtocol, Handle);
|
Status = TrEEMeasureGptTable (TreeProtocol, Handle);
|
||||||
DEBUG ((EFI_D_ERROR, "DxeTpm2MeasureBootHandler - TrEEMeasureGptTable - %r\n", Status));
|
DEBUG ((EFI_D_INFO, "DxeTpm2MeasureBootHandler - TrEEMeasureGptTable - %r\n", Status));
|
||||||
if (!EFI_ERROR (Status)) {
|
if (!EFI_ERROR (Status)) {
|
||||||
//
|
//
|
||||||
// GPT disk check done.
|
// GPT disk check done.
|
||||||
|
@ -653,7 +653,7 @@ DxeTpm2MeasureBootHandler (
|
||||||
ImageContext.ImageType,
|
ImageContext.ImageType,
|
||||||
DevicePathNode
|
DevicePathNode
|
||||||
);
|
);
|
||||||
DEBUG ((EFI_D_ERROR, "DxeTpm2MeasureBootHandler - TrEEMeasurePeImage - %r\n", Status));
|
DEBUG ((EFI_D_INFO, "DxeTpm2MeasureBootHandler - TrEEMeasurePeImage - %r\n", Status));
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -664,7 +664,7 @@ Finish:
|
||||||
FreePool (OrigDevicePathNode);
|
FreePool (OrigDevicePathNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
DEBUG ((EFI_D_ERROR, "DxeTpm2MeasureBootHandler - %r\n", Status));
|
DEBUG ((EFI_D_INFO, "DxeTpm2MeasureBootHandler - %r\n", Status));
|
||||||
|
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
|
@ -91,15 +91,15 @@ TpmCommandClear (
|
||||||
CopyMem (LocalAuthSession.hmac.buffer, PlatformAuth->buffer, PlatformAuth->size);
|
CopyMem (LocalAuthSession.hmac.buffer, PlatformAuth->buffer, PlatformAuth->size);
|
||||||
}
|
}
|
||||||
|
|
||||||
DEBUG ((EFI_D_ERROR, "Tpm2ClearControl ... \n"));
|
DEBUG ((EFI_D_INFO, "Tpm2ClearControl ... \n"));
|
||||||
Status = Tpm2ClearControl (TPM_RH_PLATFORM, AuthSession, NO);
|
Status = Tpm2ClearControl (TPM_RH_PLATFORM, AuthSession, NO);
|
||||||
DEBUG ((EFI_D_ERROR, "Tpm2ClearControl - %r\n", Status));
|
DEBUG ((EFI_D_INFO, "Tpm2ClearControl - %r\n", Status));
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
goto Done;
|
goto Done;
|
||||||
}
|
}
|
||||||
DEBUG ((EFI_D_ERROR, "Tpm2Clear ... \n"));
|
DEBUG ((EFI_D_INFO, "Tpm2Clear ... \n"));
|
||||||
Status = Tpm2Clear (TPM_RH_PLATFORM, AuthSession);
|
Status = Tpm2Clear (TPM_RH_PLATFORM, AuthSession);
|
||||||
DEBUG ((EFI_D_ERROR, "Tpm2Clear - %r\n", Status));
|
DEBUG ((EFI_D_INFO, "Tpm2Clear - %r\n", Status));
|
||||||
|
|
||||||
Done:
|
Done:
|
||||||
ZeroMem (&LocalAuthSession.hmac, sizeof(LocalAuthSession.hmac));
|
ZeroMem (&LocalAuthSession.hmac, sizeof(LocalAuthSession.hmac));
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
hash handler registerd, such as SHA1, SHA256.
|
hash handler registerd, such as SHA1, SHA256.
|
||||||
Platform can use PcdTpm2HashMask to mask some hash engines.
|
Platform can use PcdTpm2HashMask to mask some hash engines.
|
||||||
|
|
||||||
Copyright (c) 2013, Intel Corporation. All rights reserved. <BR>
|
Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved. <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
|
||||||
|
@ -275,7 +275,7 @@ RegisterHashInterfaceLib (
|
||||||
//
|
//
|
||||||
// In PEI phase, there will be shadow driver dispatched again.
|
// In PEI phase, there will be shadow driver dispatched again.
|
||||||
//
|
//
|
||||||
DEBUG ((EFI_D_ERROR, "RegisterHashInterfaceLib - Override\n"));
|
DEBUG ((EFI_D_INFO, "RegisterHashInterfaceLib - Override\n"));
|
||||||
CopyMem (&HashInterfaceHob->HashInterface[Index], HashInterface, sizeof(*HashInterface));
|
CopyMem (&HashInterfaceHob->HashInterface[Index], HashInterface, sizeof(*HashInterface));
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
|
@ -129,7 +129,7 @@ Tpm2RegisterTpm2DeviceLib (
|
||||||
//
|
//
|
||||||
// In PEI phase, there will be shadow driver dispatched again.
|
// In PEI phase, there will be shadow driver dispatched again.
|
||||||
//
|
//
|
||||||
DEBUG ((EFI_D_ERROR, "Tpm2RegisterTpm2DeviceLib - Override\n"));
|
DEBUG ((EFI_D_INFO, "Tpm2RegisterTpm2DeviceLib - Override\n"));
|
||||||
CopyMem (Tpm2DeviceInterface, Tpm2Device, sizeof(*Tpm2Device));
|
CopyMem (Tpm2DeviceInterface, Tpm2Device, sizeof(*Tpm2Device));
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -46,7 +46,7 @@ IsDtpmPresent (
|
||||||
DEBUG ((EFI_D_ERROR, "DetectTpmDevice: Dtpm not present\n"));
|
DEBUG ((EFI_D_ERROR, "DetectTpmDevice: Dtpm not present\n"));
|
||||||
return FALSE;
|
return FALSE;
|
||||||
} else {
|
} else {
|
||||||
DEBUG ((EFI_D_ERROR, "DetectTpmDevice: Dtpm present\n"));
|
DEBUG ((EFI_D_INFO, "DetectTpmDevice: Dtpm present\n"));
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -76,7 +76,7 @@ DetectTpmDevice (
|
||||||
// In S3, we rely on normal boot Detection, because we save to ReadOnly Variable in normal boot.
|
// In S3, we rely on normal boot Detection, because we save to ReadOnly Variable in normal boot.
|
||||||
//
|
//
|
||||||
if (BootMode == BOOT_ON_S3_RESUME) {
|
if (BootMode == BOOT_ON_S3_RESUME) {
|
||||||
DEBUG ((EFI_D_ERROR, "DetectTpmDevice: S3 mode\n"));
|
DEBUG ((EFI_D_INFO, "DetectTpmDevice: S3 mode\n"));
|
||||||
|
|
||||||
Status = PeiServicesLocatePpi (&gEfiPeiReadOnlyVariable2PpiGuid, 0, NULL, (VOID **) &VariablePpi);
|
Status = PeiServicesLocatePpi (&gEfiPeiReadOnlyVariable2PpiGuid, 0, NULL, (VOID **) &VariablePpi);
|
||||||
ASSERT_EFI_ERROR (Status);
|
ASSERT_EFI_ERROR (Status);
|
||||||
|
@ -99,7 +99,7 @@ DetectTpmDevice (
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
DEBUG ((EFI_D_ERROR, "DetectTpmDevice:\n"));
|
DEBUG ((EFI_D_INFO, "DetectTpmDevice:\n"));
|
||||||
if (!IsDtpmPresent ()) {
|
if (!IsDtpmPresent ()) {
|
||||||
// dTPM not available
|
// dTPM not available
|
||||||
return TPM_DEVICE_NULL;
|
return TPM_DEVICE_NULL;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/** @file
|
/** @file
|
||||||
The module entry point for TrEE configuration module.
|
The module entry point for TrEE configuration module.
|
||||||
|
|
||||||
Copyright (c) 2013, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<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
|
||||||
|
@ -101,11 +101,11 @@ TrEEConfigPeimEntryPoint (
|
||||||
//
|
//
|
||||||
// Although we have SetupVariable info, we still need detect TPM device manually.
|
// Although we have SetupVariable info, we still need detect TPM device manually.
|
||||||
//
|
//
|
||||||
DEBUG ((EFI_D_ERROR, "TrEEConfiguration.TpmDevice from Setup: %x\n", TrEEConfiguration.TpmDevice));
|
DEBUG ((EFI_D_INFO, "TrEEConfiguration.TpmDevice from Setup: %x\n", TrEEConfiguration.TpmDevice));
|
||||||
|
|
||||||
if (PcdGetBool (PcdTpmAutoDetection)) {
|
if (PcdGetBool (PcdTpmAutoDetection)) {
|
||||||
TpmDevice = DetectTpmDevice (TrEEConfiguration.TpmDevice);
|
TpmDevice = DetectTpmDevice (TrEEConfiguration.TpmDevice);
|
||||||
DEBUG ((EFI_D_ERROR, "TpmDevice final: %x\n", TpmDevice));
|
DEBUG ((EFI_D_INFO, "TpmDevice final: %x\n", TpmDevice));
|
||||||
if (TpmDevice != TPM_DEVICE_NULL) {
|
if (TpmDevice != TPM_DEVICE_NULL) {
|
||||||
TrEEConfiguration.TpmDevice = TpmDevice;
|
TrEEConfiguration.TpmDevice = TpmDevice;
|
||||||
}
|
}
|
||||||
|
@ -125,7 +125,7 @@ TrEEConfigPeimEntryPoint (
|
||||||
if (TpmDevice == mTpmInstanceId[Index].TpmDevice) {
|
if (TpmDevice == mTpmInstanceId[Index].TpmDevice) {
|
||||||
Size = sizeof(mTpmInstanceId[Index].TpmInstanceGuid);
|
Size = sizeof(mTpmInstanceId[Index].TpmInstanceGuid);
|
||||||
PcdSetPtr (PcdTpmInstanceGuid, &Size, &mTpmInstanceId[Index].TpmInstanceGuid);
|
PcdSetPtr (PcdTpmInstanceGuid, &Size, &mTpmInstanceId[Index].TpmInstanceGuid);
|
||||||
DEBUG ((EFI_D_ERROR, "TpmDevice PCD: %g\n", &mTpmInstanceId[Index].TpmInstanceGuid));
|
DEBUG ((EFI_D_INFO, "TpmDevice PCD: %g\n", &mTpmInstanceId[Index].TpmInstanceGuid));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -364,7 +364,7 @@ TreeGetCapability (
|
||||||
IN OUT TREE_BOOT_SERVICE_CAPABILITY *ProtocolCapability
|
IN OUT TREE_BOOT_SERVICE_CAPABILITY *ProtocolCapability
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
DEBUG ((EFI_D_ERROR, "TreeGetCapability ...\n"));
|
DEBUG ((EFI_D_INFO, "TreeGetCapability ...\n"));
|
||||||
|
|
||||||
if ((This == NULL) || (ProtocolCapability == NULL)) {
|
if ((This == NULL) || (ProtocolCapability == NULL)) {
|
||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
|
@ -376,7 +376,7 @@ TreeGetCapability (
|
||||||
}
|
}
|
||||||
|
|
||||||
CopyMem (ProtocolCapability, &mTcgDxeData.BsCap, mTcgDxeData.BsCap.Size);
|
CopyMem (ProtocolCapability, &mTcgDxeData.BsCap, mTcgDxeData.BsCap.Size);
|
||||||
DEBUG ((EFI_D_ERROR, "TreeGetCapability - %r\n", EFI_SUCCESS));
|
DEBUG ((EFI_D_INFO, "TreeGetCapability - %r\n", EFI_SUCCESS));
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -451,7 +451,7 @@ TreeGetEventLog (
|
||||||
{
|
{
|
||||||
UINTN Index;
|
UINTN Index;
|
||||||
|
|
||||||
DEBUG ((EFI_D_ERROR, "TreeGetEventLog ...\n"));
|
DEBUG ((EFI_D_INFO, "TreeGetEventLog ...\n"));
|
||||||
|
|
||||||
if (This == NULL) {
|
if (This == NULL) {
|
||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
|
@ -482,7 +482,7 @@ TreeGetEventLog (
|
||||||
|
|
||||||
if (EventLogLocation != NULL) {
|
if (EventLogLocation != NULL) {
|
||||||
*EventLogLocation = mTcgDxeData.EventLogAreaStruct[Index].Lasa;
|
*EventLogLocation = mTcgDxeData.EventLogAreaStruct[Index].Lasa;
|
||||||
DEBUG ((EFI_D_ERROR, "TreeGetEventLog (EventLogLocation - %x)\n", *EventLogLocation));
|
DEBUG ((EFI_D_INFO, "TreeGetEventLog (EventLogLocation - %x)\n", *EventLogLocation));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (EventLogLastEntry != NULL) {
|
if (EventLogLastEntry != NULL) {
|
||||||
|
@ -491,15 +491,15 @@ TreeGetEventLog (
|
||||||
} else {
|
} else {
|
||||||
*EventLogLastEntry = (EFI_PHYSICAL_ADDRESS)(UINTN)mTcgDxeData.EventLogAreaStruct[Index].LastEvent;
|
*EventLogLastEntry = (EFI_PHYSICAL_ADDRESS)(UINTN)mTcgDxeData.EventLogAreaStruct[Index].LastEvent;
|
||||||
}
|
}
|
||||||
DEBUG ((EFI_D_ERROR, "TreeGetEventLog (EventLogLastEntry - %x)\n", *EventLogLastEntry));
|
DEBUG ((EFI_D_INFO, "TreeGetEventLog (EventLogLastEntry - %x)\n", *EventLogLastEntry));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (EventLogTruncated != NULL) {
|
if (EventLogTruncated != NULL) {
|
||||||
*EventLogTruncated = mTcgDxeData.EventLogAreaStruct[Index].EventLogTruncated;
|
*EventLogTruncated = mTcgDxeData.EventLogAreaStruct[Index].EventLogTruncated;
|
||||||
DEBUG ((EFI_D_ERROR, "TreeGetEventLog (EventLogTruncated - %x)\n", *EventLogTruncated));
|
DEBUG ((EFI_D_INFO, "TreeGetEventLog (EventLogTruncated - %x)\n", *EventLogTruncated));
|
||||||
}
|
}
|
||||||
|
|
||||||
DEBUG ((EFI_D_ERROR, "TreeGetEventLog - %r\n", EFI_SUCCESS));
|
DEBUG ((EFI_D_INFO, "TreeGetEventLog - %r\n", EFI_SUCCESS));
|
||||||
|
|
||||||
// Dump Event Log for debug purpose
|
// Dump Event Log for debug purpose
|
||||||
if ((EventLogLocation != NULL) && (EventLogLastEntry != NULL)) {
|
if ((EventLogLocation != NULL) && (EventLogLastEntry != NULL)) {
|
||||||
|
@ -860,7 +860,7 @@ TreeHashLogExtendEvent (
|
||||||
TCG_PCR_EVENT_HDR NewEventHdr;
|
TCG_PCR_EVENT_HDR NewEventHdr;
|
||||||
TPML_DIGEST_VALUES DigestList;
|
TPML_DIGEST_VALUES DigestList;
|
||||||
|
|
||||||
DEBUG ((EFI_D_ERROR, "TreeHashLogExtendEvent ...\n"));
|
DEBUG ((EFI_D_INFO, "TreeHashLogExtendEvent ...\n"));
|
||||||
|
|
||||||
if ((This == NULL) || (DataToHash == 0) || (Event == NULL)) {
|
if ((This == NULL) || (DataToHash == 0) || (Event == NULL)) {
|
||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
|
@ -902,7 +902,7 @@ TreeHashLogExtendEvent (
|
||||||
Event->Event
|
Event->Event
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
DEBUG ((EFI_D_ERROR, "TreeHashLogExtendEvent - %r\n", Status));
|
DEBUG ((EFI_D_INFO, "TreeHashLogExtendEvent - %r\n", Status));
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -932,7 +932,7 @@ TreeSubmitCommand (
|
||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
|
|
||||||
DEBUG ((EFI_D_ERROR, "TreeSubmitCommand ...\n"));
|
DEBUG ((EFI_D_INFO, "TreeSubmitCommand ...\n"));
|
||||||
|
|
||||||
if ((This == NULL) ||
|
if ((This == NULL) ||
|
||||||
(InputParameterBlockSize == 0) || (InputParameterBlock == NULL) ||
|
(InputParameterBlockSize == 0) || (InputParameterBlock == NULL) ||
|
||||||
|
@ -957,7 +957,7 @@ TreeSubmitCommand (
|
||||||
&OutputParameterBlockSize,
|
&OutputParameterBlockSize,
|
||||||
OutputParameterBlock
|
OutputParameterBlock
|
||||||
);
|
);
|
||||||
DEBUG ((EFI_D_ERROR, "TreeSubmitCommand - %r\n", Status));
|
DEBUG ((EFI_D_INFO, "TreeSubmitCommand - %r\n", Status));
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1178,7 +1178,7 @@ MeasureSeparatorEvent (
|
||||||
TCG_PCR_EVENT_HDR TcgEvent;
|
TCG_PCR_EVENT_HDR TcgEvent;
|
||||||
UINT32 EventData;
|
UINT32 EventData;
|
||||||
|
|
||||||
DEBUG ((EFI_D_ERROR, "MeasureSeparatorEvent Pcr - %x\n", PCRIndex));
|
DEBUG ((EFI_D_INFO, "MeasureSeparatorEvent Pcr - %x\n", PCRIndex));
|
||||||
|
|
||||||
EventData = 0;
|
EventData = 0;
|
||||||
TcgEvent.PCRIndex = PCRIndex;
|
TcgEvent.PCRIndex = PCRIndex;
|
||||||
|
@ -1223,8 +1223,8 @@ MeasureVariable (
|
||||||
UINTN VarNameLength;
|
UINTN VarNameLength;
|
||||||
EFI_VARIABLE_DATA_TREE *VarLog;
|
EFI_VARIABLE_DATA_TREE *VarLog;
|
||||||
|
|
||||||
DEBUG ((EFI_D_ERROR, "TrEEDxe: MeasureVariable (Pcr - %x, EventType - %x, ", (UINTN)PCRIndex, (UINTN)EventType));
|
DEBUG ((EFI_D_INFO, "TrEEDxe: MeasureVariable (Pcr - %x, EventType - %x, ", (UINTN)PCRIndex, (UINTN)EventType));
|
||||||
DEBUG ((EFI_D_ERROR, "VariableName - %s, VendorGuid - %g)\n", VarName, VendorGuid));
|
DEBUG ((EFI_D_INFO, "VariableName - %s, VendorGuid - %g)\n", VarName, VendorGuid));
|
||||||
|
|
||||||
VarNameLength = StrLen (VarName);
|
VarNameLength = StrLen (VarName);
|
||||||
TcgEvent.PCRIndex = PCRIndex;
|
TcgEvent.PCRIndex = PCRIndex;
|
||||||
|
@ -1553,11 +1553,11 @@ MeasureSecureBootPolicy (
|
||||||
|
|
||||||
if (PcdGetBool (PcdFirmwareDebuggerInitialized)) {
|
if (PcdGetBool (PcdFirmwareDebuggerInitialized)) {
|
||||||
Status = MeasureLaunchOfFirmwareDebugger ();
|
Status = MeasureLaunchOfFirmwareDebugger ();
|
||||||
DEBUG ((EFI_D_ERROR, "MeasureLaunchOfFirmwareDebugger - %r\n", Status));
|
DEBUG ((EFI_D_INFO, "MeasureLaunchOfFirmwareDebugger - %r\n", Status));
|
||||||
}
|
}
|
||||||
|
|
||||||
Status = MeasureAllSecureVariables ();
|
Status = MeasureAllSecureVariables ();
|
||||||
DEBUG ((EFI_D_ERROR, "MeasureAllSecureVariables - %r\n", Status));
|
DEBUG ((EFI_D_INFO, "MeasureAllSecureVariables - %r\n", Status));
|
||||||
|
|
||||||
//
|
//
|
||||||
// We need measure Separator(7) here, because this event must be between SecureBootPolicy (Configure)
|
// We need measure Separator(7) here, because this event must be between SecureBootPolicy (Configure)
|
||||||
|
@ -1566,7 +1566,7 @@ MeasureSecureBootPolicy (
|
||||||
// the Authority measurement happen before ReadToBoot event.
|
// the Authority measurement happen before ReadToBoot event.
|
||||||
//
|
//
|
||||||
Status = MeasureSeparatorEvent (7);
|
Status = MeasureSeparatorEvent (7);
|
||||||
DEBUG ((EFI_D_ERROR, "MeasureSeparatorEvent - %r\n", Status));
|
DEBUG ((EFI_D_INFO, "MeasureSeparatorEvent - %r\n", Status));
|
||||||
return ;
|
return ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1862,14 +1862,14 @@ DriverEntry (
|
||||||
//
|
//
|
||||||
// Fill information
|
// Fill information
|
||||||
//
|
//
|
||||||
DEBUG ((EFI_D_ERROR, "TrEE.ProtocolVersion - %02x.%02x\n", mTcgDxeData.BsCap.ProtocolVersion.Major, mTcgDxeData.BsCap.ProtocolVersion.Minor));
|
DEBUG ((EFI_D_INFO, "TrEE.ProtocolVersion - %02x.%02x\n", mTcgDxeData.BsCap.ProtocolVersion.Major, mTcgDxeData.BsCap.ProtocolVersion.Minor));
|
||||||
DEBUG ((EFI_D_ERROR, "TrEE.StructureVersion - %02x.%02x\n", mTcgDxeData.BsCap.StructureVersion.Major, mTcgDxeData.BsCap.StructureVersion.Minor));
|
DEBUG ((EFI_D_INFO, "TrEE.StructureVersion - %02x.%02x\n", mTcgDxeData.BsCap.StructureVersion.Major, mTcgDxeData.BsCap.StructureVersion.Minor));
|
||||||
|
|
||||||
Status = Tpm2GetCapabilityManufactureID (&mTcgDxeData.BsCap.ManufacturerID);
|
Status = Tpm2GetCapabilityManufactureID (&mTcgDxeData.BsCap.ManufacturerID);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
DEBUG ((EFI_D_ERROR, "Tpm2GetCapabilityManufactureID fail!\n"));
|
DEBUG ((EFI_D_ERROR, "Tpm2GetCapabilityManufactureID fail!\n"));
|
||||||
} else {
|
} else {
|
||||||
DEBUG ((EFI_D_ERROR, "Tpm2GetCapabilityManufactureID - %08x\n", mTcgDxeData.BsCap.ManufacturerID));
|
DEBUG ((EFI_D_INFO, "Tpm2GetCapabilityManufactureID - %08x\n", mTcgDxeData.BsCap.ManufacturerID));
|
||||||
}
|
}
|
||||||
|
|
||||||
DEBUG_CODE (
|
DEBUG_CODE (
|
||||||
|
@ -1880,7 +1880,7 @@ DriverEntry (
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
DEBUG ((EFI_D_ERROR, "Tpm2GetCapabilityFirmwareVersion fail!\n"));
|
DEBUG ((EFI_D_ERROR, "Tpm2GetCapabilityFirmwareVersion fail!\n"));
|
||||||
} else {
|
} else {
|
||||||
DEBUG ((EFI_D_ERROR, "Tpm2GetCapabilityFirmwareVersion - %08x %08x\n", FirmwareVersion1, FirmwareVersion2));
|
DEBUG ((EFI_D_INFO, "Tpm2GetCapabilityFirmwareVersion - %08x %08x\n", FirmwareVersion1, FirmwareVersion2));
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -1890,7 +1890,7 @@ DriverEntry (
|
||||||
} else {
|
} else {
|
||||||
mTcgDxeData.BsCap.MaxCommandSize = (UINT16)MaxCommandSize;
|
mTcgDxeData.BsCap.MaxCommandSize = (UINT16)MaxCommandSize;
|
||||||
mTcgDxeData.BsCap.MaxResponseSize = (UINT16)MaxResponseSize;
|
mTcgDxeData.BsCap.MaxResponseSize = (UINT16)MaxResponseSize;
|
||||||
DEBUG ((EFI_D_ERROR, "Tpm2GetCapabilityMaxCommandResponseSize - %08x, %08x\n", MaxCommandSize, MaxResponseSize));
|
DEBUG ((EFI_D_INFO, "Tpm2GetCapabilityMaxCommandResponseSize - %08x, %08x\n", MaxCommandSize, MaxResponseSize));
|
||||||
}
|
}
|
||||||
|
|
||||||
Status = Tpm2GetCapabilityPcrs (&Pcrs);
|
Status = Tpm2GetCapabilityPcrs (&Pcrs);
|
||||||
|
@ -1898,10 +1898,10 @@ DriverEntry (
|
||||||
DEBUG ((EFI_D_ERROR, "Tpm2GetCapabilityPcrs fail!\n"));
|
DEBUG ((EFI_D_ERROR, "Tpm2GetCapabilityPcrs fail!\n"));
|
||||||
TpmHashAlgorithmBitmap = TREE_BOOT_HASH_ALG_SHA1;
|
TpmHashAlgorithmBitmap = TREE_BOOT_HASH_ALG_SHA1;
|
||||||
} else {
|
} else {
|
||||||
DEBUG ((EFI_D_ERROR, "Tpm2GetCapabilityPcrs Count - %08x\n", Pcrs.count));
|
DEBUG ((EFI_D_INFO, "Tpm2GetCapabilityPcrs Count - %08x\n", Pcrs.count));
|
||||||
TpmHashAlgorithmBitmap = 0;
|
TpmHashAlgorithmBitmap = 0;
|
||||||
for (Index = 0; Index < Pcrs.count; Index++) {
|
for (Index = 0; Index < Pcrs.count; Index++) {
|
||||||
DEBUG ((EFI_D_ERROR, "hash - %x\n", Pcrs.pcrSelections[Index].hash));
|
DEBUG ((EFI_D_INFO, "hash - %x\n", Pcrs.pcrSelections[Index].hash));
|
||||||
switch (Pcrs.pcrSelections[Index].hash) {
|
switch (Pcrs.pcrSelections[Index].hash) {
|
||||||
case TPM_ALG_SHA1:
|
case TPM_ALG_SHA1:
|
||||||
TpmHashAlgorithmBitmap |= TREE_BOOT_HASH_ALG_SHA1;
|
TpmHashAlgorithmBitmap |= TREE_BOOT_HASH_ALG_SHA1;
|
||||||
|
@ -1921,11 +1921,11 @@ DriverEntry (
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
DEBUG ((EFI_D_ERROR, "TPM.HashAlgorithmBitmap - 0x%08x\n", TpmHashAlgorithmBitmap));
|
DEBUG ((EFI_D_INFO, "TPM.HashAlgorithmBitmap - 0x%08x\n", TpmHashAlgorithmBitmap));
|
||||||
|
|
||||||
DEBUG ((EFI_D_ERROR, "TrEE.SupportedEventLogs - 0x%08x\n", mTcgDxeData.BsCap.SupportedEventLogs));
|
DEBUG ((EFI_D_INFO, "TrEE.SupportedEventLogs - 0x%08x\n", mTcgDxeData.BsCap.SupportedEventLogs));
|
||||||
mTcgDxeData.BsCap.HashAlgorithmBitmap = TpmHashAlgorithmBitmap;
|
mTcgDxeData.BsCap.HashAlgorithmBitmap = TpmHashAlgorithmBitmap;
|
||||||
DEBUG ((EFI_D_ERROR, "TrEE.HashAlgorithmBitmap - 0x%08x\n", mTcgDxeData.BsCap.HashAlgorithmBitmap));
|
DEBUG ((EFI_D_INFO, "TrEE.HashAlgorithmBitmap - 0x%08x\n", mTcgDxeData.BsCap.HashAlgorithmBitmap));
|
||||||
|
|
||||||
if (mTcgDxeData.BsCap.TrEEPresentFlag) {
|
if (mTcgDxeData.BsCap.TrEEPresentFlag) {
|
||||||
//
|
//
|
||||||
|
@ -1982,7 +1982,7 @@ DriverEntry (
|
||||||
// Install TrEEProtocol
|
// Install TrEEProtocol
|
||||||
//
|
//
|
||||||
Status = InstallTrEE ();
|
Status = InstallTrEE ();
|
||||||
DEBUG ((EFI_D_ERROR, "InstallTrEE - %r\n", Status));
|
DEBUG ((EFI_D_INFO, "InstallTrEE - %r\n", Status));
|
||||||
|
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/** @file
|
/** @file
|
||||||
The implementation of Extended SAL variable services.
|
The implementation of Extended SAL variable services.
|
||||||
|
|
||||||
Copyright (c) 2009 - 2013, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.<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
|
||||||
|
@ -3244,7 +3244,7 @@ VariableCommonInitialize (
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
Status = EFI_VOLUME_CORRUPTED;
|
Status = EFI_VOLUME_CORRUPTED;
|
||||||
DEBUG((EFI_D_INFO, "Variable Store header is corrupted\n"));
|
DEBUG((EFI_D_ERROR, "Variable Store header is corrupted\n"));
|
||||||
}
|
}
|
||||||
|
|
||||||
Done:
|
Done:
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/** @file
|
/** @file
|
||||||
Measure TrEE required variable.
|
Measure TrEE required variable.
|
||||||
|
|
||||||
Copyright (c) 2013, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<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
|
||||||
|
@ -118,8 +118,8 @@ MeasureVariable (
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
DEBUG ((EFI_D_ERROR, "AuthVariableDxe: MeasureVariable (Pcr - %x, EventType - %x, ", (UINTN)7, (UINTN)EV_EFI_VARIABLE_AUTHORITY));
|
DEBUG ((EFI_D_INFO, "AuthVariableDxe: MeasureVariable (Pcr - %x, EventType - %x, ", (UINTN)7, (UINTN)EV_EFI_VARIABLE_AUTHORITY));
|
||||||
DEBUG ((EFI_D_ERROR, "VariableName - %s, VendorGuid - %g)\n", VarName, VendorGuid));
|
DEBUG ((EFI_D_INFO, "VariableName - %s, VendorGuid - %g)\n", VarName, VendorGuid));
|
||||||
|
|
||||||
Status = TpmMeasureAndLogData (
|
Status = TpmMeasureAndLogData (
|
||||||
7,
|
7,
|
||||||
|
@ -245,7 +245,7 @@ SecureBootHook (
|
||||||
VariableData,
|
VariableData,
|
||||||
VariableDataSize
|
VariableDataSize
|
||||||
);
|
);
|
||||||
DEBUG ((EFI_D_ERROR, "MeasureBootPolicyVariable - %r\n", Status));
|
DEBUG ((EFI_D_INFO, "MeasureBootPolicyVariable - %r\n", Status));
|
||||||
|
|
||||||
if (VariableData != NULL) {
|
if (VariableData != NULL) {
|
||||||
FreePool (VariableData);
|
FreePool (VariableData);
|
||||||
|
|
|
@ -1920,7 +1920,7 @@ DeleteKeyExchangeKey (
|
||||||
ZeroMem (OldData, KekDataSize);
|
ZeroMem (OldData, KekDataSize);
|
||||||
while ((KekDataSize > 0) && (KekDataSize >= CertList->SignatureListSize)) {
|
while ((KekDataSize > 0) && (KekDataSize >= CertList->SignatureListSize)) {
|
||||||
CertCount = (CertList->SignatureListSize - sizeof (EFI_SIGNATURE_LIST) - CertList->SignatureHeaderSize) / CertList->SignatureSize;
|
CertCount = (CertList->SignatureListSize - sizeof (EFI_SIGNATURE_LIST) - CertList->SignatureHeaderSize) / CertList->SignatureSize;
|
||||||
DEBUG ((DEBUG_ERROR, " CertCount = %x\n", CertCount));
|
DEBUG ((DEBUG_INFO, " CertCount = %x\n", CertCount));
|
||||||
if (CertCount != 0) {
|
if (CertCount != 0) {
|
||||||
CopyMem (OldData + Offset, CertList, CertList->SignatureListSize);
|
CopyMem (OldData + Offset, CertList, CertList->SignatureListSize);
|
||||||
Offset += CertList->SignatureListSize;
|
Offset += CertList->SignatureListSize;
|
||||||
|
@ -2118,7 +2118,7 @@ DeleteSignature (
|
||||||
ZeroMem (OldData, ItemDataSize);
|
ZeroMem (OldData, ItemDataSize);
|
||||||
while ((ItemDataSize > 0) && (ItemDataSize >= CertList->SignatureListSize)) {
|
while ((ItemDataSize > 0) && (ItemDataSize >= CertList->SignatureListSize)) {
|
||||||
CertCount = (CertList->SignatureListSize - sizeof (EFI_SIGNATURE_LIST) - CertList->SignatureHeaderSize) / CertList->SignatureSize;
|
CertCount = (CertList->SignatureListSize - sizeof (EFI_SIGNATURE_LIST) - CertList->SignatureHeaderSize) / CertList->SignatureSize;
|
||||||
DEBUG ((DEBUG_ERROR, " CertCount = %x\n", CertCount));
|
DEBUG ((DEBUG_INFO, " CertCount = %x\n", CertCount));
|
||||||
if (CertCount != 0) {
|
if (CertCount != 0) {
|
||||||
CopyMem (OldData + Offset, (UINT8*)(CertList), CertList->SignatureListSize);
|
CopyMem (OldData + Offset, (UINT8*)(CertList), CertList->SignatureListSize);
|
||||||
Offset += CertList->SignatureListSize;
|
Offset += CertList->SignatureListSize;
|
||||||
|
|
Loading…
Reference in New Issue