MdeModulePkg: Change use of EFI_D_* to DEBUG_*
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3739 Update all use of EFI_D_* defines in DEBUG() macros to DEBUG_* defines. 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: Liming Gao <gaoliming@byosoft.com.cn>
This commit is contained in:
committed by
mergify[bot]
parent
917e98f3e5
commit
87000d7708
@@ -1048,9 +1048,9 @@ FindPath (
|
||||
}
|
||||
|
||||
DEBUG_CODE_BEGIN ();
|
||||
DEBUG ((EFI_D_ERROR, "AcpiSdt: FindPath - "));
|
||||
DEBUG ((DEBUG_ERROR, "AcpiSdt: FindPath - "));
|
||||
AmlPrintNameString (AmlPath);
|
||||
DEBUG ((EFI_D_ERROR, "\n"));
|
||||
DEBUG ((DEBUG_ERROR, "\n"));
|
||||
DEBUG_CODE_END ();
|
||||
|
||||
if (AmlHandle->Signature == EFI_AML_ROOT_HANDLE_SIGNATURE) {
|
||||
|
@@ -263,9 +263,9 @@ AmlInsertNodeToTree (
|
||||
//
|
||||
// Oops!!!, There must be something wrong.
|
||||
//
|
||||
DEBUG ((EFI_D_ERROR, "AML: Override Happen - %a!\n", NameString));
|
||||
DEBUG ((EFI_D_ERROR, "AML: Existing Node - %x\n", AmlNodeList->Buffer));
|
||||
DEBUG ((EFI_D_ERROR, "AML: New Buffer - %x\n", Buffer));
|
||||
DEBUG ((DEBUG_ERROR, "AML: Override Happen - %a!\n", NameString));
|
||||
DEBUG ((DEBUG_ERROR, "AML: Existing Node - %x\n", AmlNodeList->Buffer));
|
||||
DEBUG ((DEBUG_ERROR, "AML: New Buffer - %x\n", Buffer));
|
||||
|
||||
return NULL;
|
||||
}
|
||||
@@ -476,14 +476,14 @@ AmlDumpNodeInfo (
|
||||
CurrentLink = AmlParentNodeList->Children.ForwardLink;
|
||||
|
||||
if (Level == 0) {
|
||||
DEBUG ((EFI_D_ERROR, "\\"));
|
||||
DEBUG ((DEBUG_ERROR, "\\"));
|
||||
} else {
|
||||
for (Index = 0; Index < Level; Index++) {
|
||||
DEBUG ((EFI_D_ERROR, " "));
|
||||
DEBUG ((DEBUG_ERROR, " "));
|
||||
}
|
||||
AmlPrintNameSeg (AmlParentNodeList->Name);
|
||||
}
|
||||
DEBUG ((EFI_D_ERROR, "\n"));
|
||||
DEBUG ((DEBUG_ERROR, "\n"));
|
||||
|
||||
while (CurrentLink != &AmlParentNodeList->Children) {
|
||||
CurrentAmlNodeList = EFI_AML_NODE_LIST_FROM_LINK (CurrentLink);
|
||||
@@ -543,7 +543,7 @@ AmlFindPath (
|
||||
}
|
||||
|
||||
DEBUG_CODE_BEGIN ();
|
||||
DEBUG ((EFI_D_ERROR, "AcpiSdt: NameSpace:\n"));
|
||||
DEBUG ((DEBUG_ERROR, "AcpiSdt: NameSpace:\n"));
|
||||
AmlDumpNodeInfo (AmlRootNodeList, 0);
|
||||
DEBUG_CODE_END ();
|
||||
|
||||
@@ -579,9 +579,9 @@ AmlFindPath (
|
||||
//
|
||||
if (CurrentAmlNodeList != NULL) {
|
||||
DEBUG_CODE_BEGIN ();
|
||||
DEBUG ((EFI_D_ERROR, "AcpiSdt: Search from: \\"));
|
||||
DEBUG ((DEBUG_ERROR, "AcpiSdt: Search from: \\"));
|
||||
AmlPrintNameSeg (CurrentAmlNodeList->Name);
|
||||
DEBUG ((EFI_D_ERROR, "\n"));
|
||||
DEBUG ((DEBUG_ERROR, "\n"));
|
||||
DEBUG_CODE_END ();
|
||||
AmlNodeList = AmlFindNodeInTheTree (
|
||||
AmlPath,
|
||||
|
@@ -457,19 +457,19 @@ AmlPrintNameSeg (
|
||||
IN UINT8 *Buffer
|
||||
)
|
||||
{
|
||||
DEBUG ((EFI_D_ERROR, "%c", Buffer[0]));
|
||||
DEBUG ((DEBUG_ERROR, "%c", Buffer[0]));
|
||||
if ((Buffer[1] == '_') && (Buffer[2] == '_') && (Buffer[3] == '_')) {
|
||||
return ;
|
||||
}
|
||||
DEBUG ((EFI_D_ERROR, "%c", Buffer[1]));
|
||||
DEBUG ((DEBUG_ERROR, "%c", Buffer[1]));
|
||||
if ((Buffer[2] == '_') && (Buffer[3] == '_')) {
|
||||
return ;
|
||||
}
|
||||
DEBUG ((EFI_D_ERROR, "%c", Buffer[2]));
|
||||
DEBUG ((DEBUG_ERROR, "%c", Buffer[2]));
|
||||
if (Buffer[3] == '_') {
|
||||
return ;
|
||||
}
|
||||
DEBUG ((EFI_D_ERROR, "%c", Buffer[3]));
|
||||
DEBUG ((DEBUG_ERROR, "%c", Buffer[3]));
|
||||
return ;
|
||||
}
|
||||
|
||||
@@ -491,14 +491,14 @@ AmlPrintNameString (
|
||||
// RootChar
|
||||
//
|
||||
Buffer ++;
|
||||
DEBUG ((EFI_D_ERROR, "\\"));
|
||||
DEBUG ((DEBUG_ERROR, "\\"));
|
||||
} else if (*Buffer == AML_PARENT_PREFIX_CHAR) {
|
||||
//
|
||||
// ParentPrefixChar
|
||||
//
|
||||
do {
|
||||
Buffer ++;
|
||||
DEBUG ((EFI_D_ERROR, "^"));
|
||||
DEBUG ((DEBUG_ERROR, "^"));
|
||||
} while (*Buffer == AML_PARENT_PREFIX_CHAR);
|
||||
}
|
||||
|
||||
@@ -530,7 +530,7 @@ AmlPrintNameString (
|
||||
AmlPrintNameSeg (Buffer);
|
||||
Buffer += AML_NAME_SEG_SIZE;
|
||||
for (Index = 0; Index < SegCount - 1; Index++) {
|
||||
DEBUG ((EFI_D_ERROR, "."));
|
||||
DEBUG ((DEBUG_ERROR, "."));
|
||||
AmlPrintNameSeg (Buffer);
|
||||
Buffer += AML_NAME_SEG_SIZE;
|
||||
}
|
||||
|
@@ -164,7 +164,7 @@ S3BootScriptExecutorEntryFunction (
|
||||
);
|
||||
} else {
|
||||
// Unsupported for 32bit DXE, 64bit OS vector
|
||||
DEBUG (( EFI_D_ERROR, "Unsupported for 32bit DXE transfer to 64bit OS waking vector!\r\n"));
|
||||
DEBUG (( DEBUG_ERROR, "Unsupported for 32bit DXE transfer to 64bit OS waking vector!\r\n"));
|
||||
ASSERT (FALSE);
|
||||
}
|
||||
} else {
|
||||
@@ -494,4 +494,3 @@ BootScriptExecutorEntryPoint (
|
||||
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
|
@@ -248,7 +248,7 @@ FpdtAllocateS3PerformanceTableMemory (
|
||||
EFI_SIZE_TO_PAGES (sizeof (S3_PERFORMANCE_TABLE))
|
||||
);
|
||||
}
|
||||
DEBUG ((EFI_D_INFO, "FPDT: ACPI S3 Performance Table address = 0x%x\n", mAcpiS3PerformanceTable));
|
||||
DEBUG ((DEBUG_INFO, "FPDT: ACPI S3 Performance Table address = 0x%x\n", mAcpiS3PerformanceTable));
|
||||
if (mAcpiS3PerformanceTable != NULL) {
|
||||
CopyMem (mAcpiS3PerformanceTable, &mS3PerformanceTableTemplate, sizeof (mS3PerformanceTableTemplate));
|
||||
}
|
||||
@@ -526,11 +526,11 @@ FpdtStatusCodeListenerDxe (
|
||||
//
|
||||
// Dump FPDT Boot Performance record.
|
||||
//
|
||||
DEBUG ((EFI_D_INFO, "FPDT: Boot Performance - ResetEnd = %ld\n", mAcpiBootPerformanceTable->BasicBoot.ResetEnd));
|
||||
DEBUG ((EFI_D_INFO, "FPDT: Boot Performance - OsLoaderLoadImageStart = 0\n"));
|
||||
DEBUG ((EFI_D_INFO, "FPDT: Boot Performance - OsLoaderStartImageStart = %ld\n", mAcpiBootPerformanceTable->BasicBoot.OsLoaderStartImageStart));
|
||||
DEBUG ((EFI_D_INFO, "FPDT: Boot Performance - ExitBootServicesEntry = 0\n"));
|
||||
DEBUG ((EFI_D_INFO, "FPDT: Boot Performance - ExitBootServicesExit = 0\n"));
|
||||
DEBUG ((DEBUG_INFO, "FPDT: Boot Performance - ResetEnd = %ld\n", mAcpiBootPerformanceTable->BasicBoot.ResetEnd));
|
||||
DEBUG ((DEBUG_INFO, "FPDT: Boot Performance - OsLoaderLoadImageStart = 0\n"));
|
||||
DEBUG ((DEBUG_INFO, "FPDT: Boot Performance - OsLoaderStartImageStart = %ld\n", mAcpiBootPerformanceTable->BasicBoot.OsLoaderStartImageStart));
|
||||
DEBUG ((DEBUG_INFO, "FPDT: Boot Performance - ExitBootServicesEntry = 0\n"));
|
||||
DEBUG ((DEBUG_INFO, "FPDT: Boot Performance - ExitBootServicesExit = 0\n"));
|
||||
} else if (Data != NULL && CompareGuid (&Data->Type, &gEdkiiFpdtExtendedFirmwarePerformanceGuid)) {
|
||||
//
|
||||
// Get the Boot performance table and then install it to ACPI table.
|
||||
@@ -615,10 +615,10 @@ FpdtExitBootServicesEventNotify (
|
||||
//
|
||||
// Dump FPDT Boot Performance record.
|
||||
//
|
||||
DEBUG ((EFI_D_INFO, "FPDT: Boot Performance - ResetEnd = %ld\n", mAcpiBootPerformanceTable->BasicBoot.ResetEnd));
|
||||
DEBUG ((EFI_D_INFO, "FPDT: Boot Performance - OsLoaderLoadImageStart = %ld\n", mAcpiBootPerformanceTable->BasicBoot.OsLoaderLoadImageStart));
|
||||
DEBUG ((EFI_D_INFO, "FPDT: Boot Performance - OsLoaderStartImageStart = %ld\n", mAcpiBootPerformanceTable->BasicBoot.OsLoaderStartImageStart));
|
||||
DEBUG ((EFI_D_INFO, "FPDT: Boot Performance - ExitBootServicesEntry = %ld\n", mAcpiBootPerformanceTable->BasicBoot.ExitBootServicesEntry));
|
||||
DEBUG ((DEBUG_INFO, "FPDT: Boot Performance - ResetEnd = %ld\n", mAcpiBootPerformanceTable->BasicBoot.ResetEnd));
|
||||
DEBUG ((DEBUG_INFO, "FPDT: Boot Performance - OsLoaderLoadImageStart = %ld\n", mAcpiBootPerformanceTable->BasicBoot.OsLoaderLoadImageStart));
|
||||
DEBUG ((DEBUG_INFO, "FPDT: Boot Performance - OsLoaderStartImageStart = %ld\n", mAcpiBootPerformanceTable->BasicBoot.OsLoaderStartImageStart));
|
||||
DEBUG ((DEBUG_INFO, "FPDT: Boot Performance - ExitBootServicesEntry = %ld\n", mAcpiBootPerformanceTable->BasicBoot.ExitBootServicesEntry));
|
||||
//
|
||||
// ExitBootServicesExit will be updated later, so don't dump it here.
|
||||
//
|
||||
|
@@ -100,7 +100,7 @@ FpdtStatusCodeListenerPei (
|
||||
AcpiS3PerformanceTable = (S3_PERFORMANCE_TABLE *) (UINTN) S3PerformanceTablePointer;
|
||||
ASSERT (AcpiS3PerformanceTable != NULL);
|
||||
if (AcpiS3PerformanceTable->Header.Signature != EFI_ACPI_5_0_FPDT_S3_PERFORMANCE_TABLE_SIGNATURE) {
|
||||
DEBUG ((EFI_D_ERROR, "FPDT S3 performance data in ACPI memory get corrupted\n"));
|
||||
DEBUG ((DEBUG_ERROR, "FPDT S3 performance data in ACPI memory get corrupted\n"));
|
||||
return EFI_ABORTED;
|
||||
}
|
||||
AcpiS3ResumeRecord = &AcpiS3PerformanceTable->S3Resume;
|
||||
@@ -112,9 +112,9 @@ FpdtStatusCodeListenerPei (
|
||||
AcpiS3ResumeRecord->ResumeCount++;
|
||||
AcpiS3ResumeRecord->AverageResume = DivU64x32 (S3ResumeTotal + AcpiS3ResumeRecord->FullResume, AcpiS3ResumeRecord->ResumeCount);
|
||||
|
||||
DEBUG ((EFI_D_INFO, "FPDT: S3 Resume Performance - ResumeCount = %d\n", AcpiS3ResumeRecord->ResumeCount));
|
||||
DEBUG ((EFI_D_INFO, "FPDT: S3 Resume Performance - FullResume = %ld\n", AcpiS3ResumeRecord->FullResume));
|
||||
DEBUG ((EFI_D_INFO, "FPDT: S3 Resume Performance - AverageResume = %ld\n", AcpiS3ResumeRecord->AverageResume));
|
||||
DEBUG ((DEBUG_INFO, "FPDT: S3 Resume Performance - ResumeCount = %d\n", AcpiS3ResumeRecord->ResumeCount));
|
||||
DEBUG ((DEBUG_INFO, "FPDT: S3 Resume Performance - FullResume = %ld\n", AcpiS3ResumeRecord->FullResume));
|
||||
DEBUG ((DEBUG_INFO, "FPDT: S3 Resume Performance - AverageResume = %ld\n", AcpiS3ResumeRecord->AverageResume));
|
||||
|
||||
//
|
||||
// Update S3 Suspend Performance Record.
|
||||
@@ -132,8 +132,8 @@ FpdtStatusCodeListenerPei (
|
||||
AcpiS3SuspendRecord->SuspendStart = S3SuspendRecord.SuspendStart;
|
||||
AcpiS3SuspendRecord->SuspendEnd = S3SuspendRecord.SuspendEnd;
|
||||
|
||||
DEBUG ((EFI_D_INFO, "FPDT: S3 Suspend Performance - SuspendStart = %ld\n", AcpiS3SuspendRecord->SuspendStart));
|
||||
DEBUG ((EFI_D_INFO, "FPDT: S3 Suspend Performance - SuspendEnd = %ld\n", AcpiS3SuspendRecord->SuspendEnd));
|
||||
DEBUG ((DEBUG_INFO, "FPDT: S3 Suspend Performance - SuspendStart = %ld\n", AcpiS3SuspendRecord->SuspendStart));
|
||||
DEBUG ((DEBUG_INFO, "FPDT: S3 Suspend Performance - SuspendEnd = %ld\n", AcpiS3SuspendRecord->SuspendEnd));
|
||||
|
||||
Status = PeiServicesLocatePpi (
|
||||
&gEfiPeiReadOnlyVariable2PpiGuid,
|
||||
|
@@ -236,11 +236,11 @@ AcpiS3ContextSaveOnEndOfDxe (
|
||||
EFI_ACPI_4_0_FIRMWARE_ACPI_CONTROL_STRUCTURE *Facs;
|
||||
VOID *Interface;
|
||||
|
||||
DEBUG ((EFI_D_INFO, "AcpiS3ContextSave!\n"));
|
||||
DEBUG ((DEBUG_INFO, "AcpiS3ContextSave!\n"));
|
||||
|
||||
Status = gBS->LocateProtocol (&gEfiLockBoxProtocolGuid, NULL, &Interface);
|
||||
if (EFI_ERROR (Status)) {
|
||||
DEBUG ((EFI_D_INFO | EFI_D_WARN, "ACPI S3 context can't be saved without LockBox!\n"));
|
||||
DEBUG ((DEBUG_INFO | DEBUG_WARN, "ACPI S3 context can't be saved without LockBox!\n"));
|
||||
goto Done;
|
||||
}
|
||||
|
||||
@@ -291,12 +291,12 @@ AcpiS3ContextSaveOnEndOfDxe (
|
||||
AcpiS3Context->S3DebugBufferAddress = (EFI_PHYSICAL_ADDRESS)(UINTN)AllocateMemoryBelow4G (EfiReservedMemoryType, EFI_PAGE_SIZE);
|
||||
SetMem ((VOID *)(UINTN)AcpiS3Context->S3DebugBufferAddress, EFI_PAGE_SIZE, 0xff);
|
||||
|
||||
DEBUG((EFI_D_INFO, "AcpiS3Context: AcpiFacsTable is 0x%8x\n", AcpiS3Context->AcpiFacsTable));
|
||||
DEBUG((EFI_D_INFO, "AcpiS3Context: IdtrProfile is 0x%8x\n", AcpiS3Context->IdtrProfile));
|
||||
DEBUG((EFI_D_INFO, "AcpiS3Context: S3NvsPageTableAddress is 0x%8x\n", AcpiS3Context->S3NvsPageTableAddress));
|
||||
DEBUG((EFI_D_INFO, "AcpiS3Context: S3DebugBufferAddress is 0x%8x\n", AcpiS3Context->S3DebugBufferAddress));
|
||||
DEBUG((EFI_D_INFO, "AcpiS3Context: BootScriptStackBase is 0x%8x\n", AcpiS3Context->BootScriptStackBase));
|
||||
DEBUG((EFI_D_INFO, "AcpiS3Context: BootScriptStackSize is 0x%8x\n", AcpiS3Context->BootScriptStackSize));
|
||||
DEBUG((DEBUG_INFO, "AcpiS3Context: AcpiFacsTable is 0x%8x\n", AcpiS3Context->AcpiFacsTable));
|
||||
DEBUG((DEBUG_INFO, "AcpiS3Context: IdtrProfile is 0x%8x\n", AcpiS3Context->IdtrProfile));
|
||||
DEBUG((DEBUG_INFO, "AcpiS3Context: S3NvsPageTableAddress is 0x%8x\n", AcpiS3Context->S3NvsPageTableAddress));
|
||||
DEBUG((DEBUG_INFO, "AcpiS3Context: S3DebugBufferAddress is 0x%8x\n", AcpiS3Context->S3DebugBufferAddress));
|
||||
DEBUG((DEBUG_INFO, "AcpiS3Context: BootScriptStackBase is 0x%8x\n", AcpiS3Context->BootScriptStackBase));
|
||||
DEBUG((DEBUG_INFO, "AcpiS3Context: BootScriptStackSize is 0x%8x\n", AcpiS3Context->BootScriptStackSize));
|
||||
|
||||
Status = SaveLockBox (
|
||||
&gEfiAcpiVariableGuid,
|
||||
@@ -322,4 +322,3 @@ Done:
|
||||
Status = gBS->CloseEvent (Event);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
}
|
||||
|
||||
|
@@ -78,7 +78,7 @@ BdsDxeOnConnectConInCallBack (
|
||||
// Should not enter this case, if enter, the keyboard will not work.
|
||||
// May need platfrom policy to connect keyboard.
|
||||
//
|
||||
DEBUG ((EFI_D_WARN, "[Bds] Connect ConIn failed - %r!!!\n", Status));
|
||||
DEBUG ((DEBUG_WARN, "[Bds] Connect ConIn failed - %r!!!\n", Status));
|
||||
}
|
||||
}
|
||||
/**
|
||||
@@ -315,11 +315,11 @@ BdsWait (
|
||||
EFI_STATUS Status;
|
||||
UINT16 TimeoutRemain;
|
||||
|
||||
DEBUG ((EFI_D_INFO, "[Bds]BdsWait ...Zzzzzzzzzzzz...\n"));
|
||||
DEBUG ((DEBUG_INFO, "[Bds]BdsWait ...Zzzzzzzzzzzz...\n"));
|
||||
|
||||
TimeoutRemain = PcdGet16 (PcdPlatformBootTimeOut);
|
||||
while (TimeoutRemain != 0) {
|
||||
DEBUG ((EFI_D_INFO, "[Bds]BdsWait(%d)..Zzzz...\n", (UINTN) TimeoutRemain));
|
||||
DEBUG ((DEBUG_INFO, "[Bds]BdsWait(%d)..Zzzz...\n", (UINTN) TimeoutRemain));
|
||||
PlatformBootManagerWaitCallback (TimeoutRemain);
|
||||
|
||||
BdsReadKeys (); // BUGBUG: Only reading can signal HotkeyTriggered
|
||||
@@ -353,7 +353,7 @@ BdsWait (
|
||||
if (PcdGet16 (PcdPlatformBootTimeOut) != 0 && TimeoutRemain == 0) {
|
||||
PlatformBootManagerWaitCallback (0);
|
||||
}
|
||||
DEBUG ((EFI_D_INFO, "[Bds]Exit the waiting!\n"));
|
||||
DEBUG ((DEBUG_INFO, "[Bds]Exit the waiting!\n"));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -610,7 +610,7 @@ BdsFormalizeOSIndicationVariable (
|
||||
(Attributes != (EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS | EFI_VARIABLE_NON_VOLATILE))
|
||||
){
|
||||
|
||||
DEBUG ((EFI_D_ERROR, "[Bds] Unformalized OsIndications variable exists. Delete it\n"));
|
||||
DEBUG ((DEBUG_ERROR, "[Bds] Unformalized OsIndications variable exists. Delete it\n"));
|
||||
Status = gRT->SetVariable (
|
||||
EFI_OS_INDICATIONS_VARIABLE_NAME,
|
||||
&gEfiGlobalVariableGuid,
|
||||
@@ -693,7 +693,7 @@ BdsEntry (
|
||||
//
|
||||
PERF_CROSSMODULE_END("DXE");
|
||||
PERF_CROSSMODULE_BEGIN("BDS");
|
||||
DEBUG ((EFI_D_INFO, "[Bds] Entry...\n"));
|
||||
DEBUG ((DEBUG_INFO, "[Bds] Entry...\n"));
|
||||
|
||||
//
|
||||
// Fill in FirmwareVendor and FirmwareRevision from PCDs
|
||||
@@ -943,17 +943,17 @@ BdsEntry (
|
||||
|
||||
DEBUG_CODE (
|
||||
EFI_BOOT_MANAGER_LOAD_OPTION_TYPE LoadOptionType;
|
||||
DEBUG ((EFI_D_INFO, "[Bds]OsIndication: %016x\n", OsIndication));
|
||||
DEBUG ((EFI_D_INFO, "[Bds]=============Begin Load Options Dumping ...=============\n"));
|
||||
DEBUG ((DEBUG_INFO, "[Bds]OsIndication: %016x\n", OsIndication));
|
||||
DEBUG ((DEBUG_INFO, "[Bds]=============Begin Load Options Dumping ...=============\n"));
|
||||
for (LoadOptionType = 0; LoadOptionType < LoadOptionTypeMax; LoadOptionType++) {
|
||||
DEBUG ((
|
||||
EFI_D_INFO, " %s Options:\n",
|
||||
DEBUG_INFO, " %s Options:\n",
|
||||
mBdsLoadOptionName[LoadOptionType]
|
||||
));
|
||||
LoadOptions = EfiBootManagerGetLoadOptions (&LoadOptionCount, LoadOptionType);
|
||||
for (Index = 0; Index < LoadOptionCount; Index++) {
|
||||
DEBUG ((
|
||||
EFI_D_INFO, " %s%04x: %s \t\t 0x%04x\n",
|
||||
DEBUG_INFO, " %s%04x: %s \t\t 0x%04x\n",
|
||||
mBdsLoadOptionName[LoadOptionType],
|
||||
LoadOptions[Index].OptionNumber,
|
||||
LoadOptions[Index].Description,
|
||||
@@ -962,7 +962,7 @@ BdsEntry (
|
||||
}
|
||||
EfiBootManagerFreeLoadOptions (LoadOptions, LoadOptionCount);
|
||||
}
|
||||
DEBUG ((EFI_D_INFO, "[Bds]=============End Load Options Dumping=============\n"));
|
||||
DEBUG ((DEBUG_INFO, "[Bds]=============End Load Options Dumping=============\n"));
|
||||
);
|
||||
|
||||
//
|
||||
@@ -1092,7 +1092,7 @@ BdsEntry (
|
||||
}
|
||||
EfiBootManagerFreeLoadOption (&PlatformDefaultBootOption);
|
||||
|
||||
DEBUG ((EFI_D_ERROR, "[Bds] Unable to boot!\n"));
|
||||
DEBUG ((DEBUG_ERROR, "[Bds] Unable to boot!\n"));
|
||||
PlatformBootManagerUnableToBoot ();
|
||||
CpuDeadLoop ();
|
||||
}
|
||||
|
@@ -168,7 +168,7 @@ PageFaultHandler (
|
||||
AddressEncMask = PageFaultContext->AddressEncMask;
|
||||
|
||||
PFAddress = AsmReadCr2 ();
|
||||
DEBUG ((EFI_D_ERROR, "CapsuleX64 - PageFaultHandler: Cr2 - %lx\n", PFAddress));
|
||||
DEBUG ((DEBUG_ERROR, "CapsuleX64 - PageFaultHandler: Cr2 - %lx\n", PFAddress));
|
||||
|
||||
if (PFAddress >= PhyMask + SIZE_4KB) {
|
||||
return PageFaultContext->OriginalHandler;
|
||||
|
@@ -186,7 +186,7 @@ PrepareContextForCapsulePei (
|
||||
&Registration
|
||||
);
|
||||
} else {
|
||||
DEBUG ((EFI_D_ERROR, "FATAL ERROR: CapsuleLongModeBuffer cannot be saved: %r. Capsule in PEI may fail!\n", Status));
|
||||
DEBUG ((DEBUG_ERROR, "FATAL ERROR: CapsuleLongModeBuffer cannot be saved: %r. Capsule in PEI may fail!\n", Status));
|
||||
gBS->FreePages (LongModeBuffer.StackBaseAddress, EFI_SIZE_TO_PAGES (LongModeBuffer.StackSize));
|
||||
}
|
||||
}
|
||||
|
@@ -330,7 +330,7 @@ ToggleStateSyncKeyNotify (
|
||||
);
|
||||
}
|
||||
mConIn.PhysicalKeyToggleState = KeyData->KeyState.KeyToggleState;
|
||||
DEBUG ((EFI_D_INFO, "Current toggle state is 0x%02x\n", mConIn.PhysicalKeyToggleState));
|
||||
DEBUG ((DEBUG_INFO, "Current toggle state is 0x%02x\n", mConIn.PhysicalKeyToggleState));
|
||||
}
|
||||
|
||||
return EFI_SUCCESS;
|
||||
@@ -3615,7 +3615,7 @@ ConSplitterTextInReadKeyStroke (
|
||||
// Signal ConnectConIn event on first call in Lazy ConIn mode
|
||||
//
|
||||
if (!mConInIsConnect && PcdGetBool (PcdConInConnectOnDemand)) {
|
||||
DEBUG ((EFI_D_INFO, "Connect ConIn in first ReadKeyStoke in Lazy ConIn mode.\n"));
|
||||
DEBUG ((DEBUG_INFO, "Connect ConIn in first ReadKeyStoke in Lazy ConIn mode.\n"));
|
||||
gBS->SignalEvent (Private->ConnectConInEvent);
|
||||
mConInIsConnect = TRUE;
|
||||
}
|
||||
@@ -3809,7 +3809,7 @@ ConSplitterTextInReadKeyStrokeEx (
|
||||
// Signal ConnectConIn event on first call in Lazy ConIn mode
|
||||
//
|
||||
if (!mConInIsConnect && PcdGetBool (PcdConInConnectOnDemand)) {
|
||||
DEBUG ((EFI_D_INFO, "Connect ConIn in first ReadKeyStoke in Lazy ConIn mode.\n"));
|
||||
DEBUG ((DEBUG_INFO, "Connect ConIn in first ReadKeyStoke in Lazy ConIn mode.\n"));
|
||||
gBS->SignalEvent (Private->ConnectConInEvent);
|
||||
mConInIsConnect = TRUE;
|
||||
}
|
||||
|
@@ -337,7 +337,7 @@ InitializeGraphicsConsoleTextMode (
|
||||
|
||||
DEBUG_CODE (
|
||||
for (Index = 0; Index < ValidCount; Index++) {
|
||||
DEBUG ((EFI_D_INFO, "Graphics - Mode %d, Column = %d, Row = %d\n",
|
||||
DEBUG ((DEBUG_INFO, "Graphics - Mode %d, Column = %d, Row = %d\n",
|
||||
Index, NewModeBuffer[Index].Columns, NewModeBuffer[Index].Rows));
|
||||
}
|
||||
);
|
||||
@@ -551,7 +551,7 @@ GraphicsConsoleControllerDriverStart (
|
||||
}
|
||||
}
|
||||
|
||||
DEBUG ((EFI_D_INFO, "GraphicsConsole video resolution %d x %d\n", HorizontalResolution, VerticalResolution));
|
||||
DEBUG ((DEBUG_INFO, "GraphicsConsole video resolution %d x %d\n", HorizontalResolution, VerticalResolution));
|
||||
|
||||
//
|
||||
// Initialize the mode which GraphicsConsole supports.
|
||||
@@ -2132,5 +2132,3 @@ InitializeGraphicsConsole (
|
||||
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
||||
|
@@ -323,10 +323,10 @@ GraphicsOutputDriverBindingStart (
|
||||
// Use default device infomation when the device info HOB doesn't exist
|
||||
//
|
||||
DeviceInfo = &mDefaultGraphicsDeviceInfo;
|
||||
DEBUG ((EFI_D_INFO, "[%a]: GraphicsDeviceInfo HOB doesn't exist!\n", gEfiCallerBaseName));
|
||||
DEBUG ((DEBUG_INFO, "[%a]: GraphicsDeviceInfo HOB doesn't exist!\n", gEfiCallerBaseName));
|
||||
} else {
|
||||
DeviceInfo = (EFI_PEI_GRAPHICS_DEVICE_INFO_HOB *) (GET_GUID_HOB_DATA (HobStart));
|
||||
DEBUG ((EFI_D_INFO, "[%a]: GraphicsDeviceInfo HOB:\n"
|
||||
DEBUG ((DEBUG_INFO, "[%a]: GraphicsDeviceInfo HOB:\n"
|
||||
" VendorId = %04x, DeviceId = %04x,\n"
|
||||
" RevisionId = %02x, BarIndex = %x,\n"
|
||||
" SubsystemVendorId = %04x, SubsystemId = %04x\n",
|
||||
@@ -395,7 +395,7 @@ GraphicsOutputDriverBindingStart (
|
||||
}
|
||||
Status = PciIo->GetBarAttributes (PciIo, Index, NULL, (VOID**) &Resources);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
DEBUG ((EFI_D_INFO, "[%a]: BAR[%d]: Base = %lx, Length = %lx\n",
|
||||
DEBUG ((DEBUG_INFO, "[%a]: BAR[%d]: Base = %lx, Length = %lx\n",
|
||||
gEfiCallerBaseName, Index, Resources->AddrRangeMin, Resources->AddrLen));
|
||||
if ((Resources->Desc == ACPI_ADDRESS_SPACE_DESCRIPTOR) &&
|
||||
(Resources->Len == (UINT16) (sizeof (EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR) - 3)) &&
|
||||
@@ -403,7 +403,7 @@ GraphicsOutputDriverBindingStart (
|
||||
(Resources->AddrLen >= GraphicsInfo->FrameBufferSize)
|
||||
) {
|
||||
FrameBufferBase = Resources->AddrRangeMin;
|
||||
DEBUG ((EFI_D_INFO, "[%a]: ... matched!\n", gEfiCallerBaseName));
|
||||
DEBUG ((DEBUG_INFO, "[%a]: ... matched!\n", gEfiCallerBaseName));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@@ -2025,7 +2025,7 @@ UnicodeToEfiKey (
|
||||
continue;
|
||||
}
|
||||
else {
|
||||
DEBUG ((EFI_D_ERROR, "Unexpected state in escape2\n"));
|
||||
DEBUG ((DEBUG_ERROR, "Unexpected state in escape2\n"));
|
||||
}
|
||||
}
|
||||
TerminalDevice->ResetState = RESET_STATE_DEFAULT;
|
||||
|
@@ -231,9 +231,9 @@ UpdateBlocksAndVolumes (
|
||||
) {
|
||||
continue;
|
||||
}
|
||||
DEBUG ((EFI_D_INFO, "PeiCdExpress InterfaceType is %d\n", Media2.InterfaceType));
|
||||
DEBUG ((EFI_D_INFO, "PeiCdExpress MediaPresent is %d\n", Media2.MediaPresent));
|
||||
DEBUG ((EFI_D_INFO, "PeiCdExpress BlockSize is 0x%x\n", Media2.BlockSize));
|
||||
DEBUG ((DEBUG_INFO, "PeiCdExpress InterfaceType is %d\n", Media2.InterfaceType));
|
||||
DEBUG ((DEBUG_INFO, "PeiCdExpress MediaPresent is %d\n", Media2.MediaPresent));
|
||||
DEBUG ((DEBUG_INFO, "PeiCdExpress BlockSize is 0x%x\n", Media2.BlockSize));
|
||||
} else {
|
||||
Status = BlockIoPpi->GetBlockDeviceMediaInfo (
|
||||
PeiServices,
|
||||
@@ -248,14 +248,14 @@ UpdateBlocksAndVolumes (
|
||||
) {
|
||||
continue;
|
||||
}
|
||||
DEBUG ((EFI_D_INFO, "PeiCdExpress DeviceType is %d\n", Media.DeviceType));
|
||||
DEBUG ((EFI_D_INFO, "PeiCdExpress MediaPresent is %d\n", Media.MediaPresent));
|
||||
DEBUG ((EFI_D_INFO, "PeiCdExpress BlockSize is 0x%x\n", Media.BlockSize));
|
||||
DEBUG ((DEBUG_INFO, "PeiCdExpress DeviceType is %d\n", Media.DeviceType));
|
||||
DEBUG ((DEBUG_INFO, "PeiCdExpress MediaPresent is %d\n", Media.MediaPresent));
|
||||
DEBUG ((DEBUG_INFO, "PeiCdExpress BlockSize is 0x%x\n", Media.BlockSize));
|
||||
}
|
||||
|
||||
DEBUG ((EFI_D_INFO, "PeiCdExpress Status is %d\n", Status));
|
||||
DEBUG ((DEBUG_INFO, "PeiCdExpress Status is %d\n", Status));
|
||||
|
||||
DEBUG ((EFI_D_INFO, "IndexBlockDevice is %d\n", IndexBlockDevice));
|
||||
DEBUG ((DEBUG_INFO, "IndexBlockDevice is %d\n", IndexBlockDevice));
|
||||
PrivateData->CapsuleData[PrivateData->CapsuleCount].IndexBlock = IndexBlockDevice;
|
||||
if (BlockIo2) {
|
||||
PrivateData->CapsuleData[PrivateData->CapsuleCount].BlockIo2 = BlockIo2Ppi;
|
||||
@@ -263,7 +263,7 @@ UpdateBlocksAndVolumes (
|
||||
PrivateData->CapsuleData[PrivateData->CapsuleCount].BlockIo = BlockIoPpi;
|
||||
}
|
||||
Status = FindRecoveryCapsules (PrivateData);
|
||||
DEBUG ((EFI_D_INFO, "Status is %d\n", Status));
|
||||
DEBUG ((DEBUG_INFO, "Status is %d\n", Status));
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
continue;
|
||||
|
@@ -492,7 +492,7 @@ DiskIoCreateSubtask (
|
||||
}
|
||||
}
|
||||
DEBUG ((
|
||||
EFI_D_BLKIO,
|
||||
DEBUG_BLKIO,
|
||||
" %c:Lba/Offset/Length/WorkingBuffer/Buffer = %016lx/%08x/%08x/%08x/%08x\n",
|
||||
Write ? 'W': 'R', Lba, Offset, Length, WorkingBuffer, Buffer
|
||||
));
|
||||
@@ -540,7 +540,7 @@ DiskIoCreateSubtaskList (
|
||||
VOID *WorkingBuffer;
|
||||
LIST_ENTRY *Link;
|
||||
|
||||
DEBUG ((EFI_D_BLKIO, "DiskIo: Create subtasks for task: Offset/BufferSize/Buffer = %016lx/%08x/%08x\n", Offset, BufferSize, Buffer));
|
||||
DEBUG ((DEBUG_BLKIO, "DiskIo: Create subtasks for task: Offset/BufferSize/Buffer = %016lx/%08x/%08x\n", Offset, BufferSize, Buffer));
|
||||
|
||||
BlockSize = Instance->BlockIo->Media->BlockSize;
|
||||
IoAlign = Instance->BlockIo->Media->IoAlign;
|
||||
@@ -668,7 +668,7 @@ DiskIoCreateSubtaskList (
|
||||
//
|
||||
// If there is not enough memory, downgrade to blocking access
|
||||
//
|
||||
DEBUG ((EFI_D_VERBOSE, "DiskIo: No enough memory so downgrade to blocking access\n"));
|
||||
DEBUG ((DEBUG_VERBOSE, "DiskIo: No enough memory so downgrade to blocking access\n"));
|
||||
if (!DiskIoCreateSubtaskList (Instance, Write, Offset, BufferSize, BufferPtr, TRUE, SharedWorkingBuffer, Subtasks)) {
|
||||
goto Done;
|
||||
}
|
||||
@@ -970,7 +970,7 @@ DiskIo2ReadWriteDisk (
|
||||
// Task->Token should be set to NULL by the DiskIo2OnReadWriteComplete
|
||||
// It it's not, that means the non-blocking request was downgraded to blocking request.
|
||||
//
|
||||
DEBUG ((EFI_D_VERBOSE, "DiskIo: Non-blocking request was downgraded to blocking request, signal event directly.\n"));
|
||||
DEBUG ((DEBUG_VERBOSE, "DiskIo: Non-blocking request was downgraded to blocking request, signal event directly.\n"));
|
||||
Task->Token->TransactionStatus = Status;
|
||||
gBS->SignalEvent (Task->Token->Event);
|
||||
}
|
||||
|
@@ -141,7 +141,7 @@ PartitionInstallElToritoChildHandles (
|
||||
Catalog
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
DEBUG ((EFI_D_ERROR, "EltCheckDevice: error reading catalog %r\n", Status));
|
||||
DEBUG ((DEBUG_ERROR, "EltCheckDevice: error reading catalog %r\n", Status));
|
||||
continue;
|
||||
}
|
||||
//
|
||||
@@ -149,7 +149,7 @@ PartitionInstallElToritoChildHandles (
|
||||
// to make sure it looks like a Catalog header
|
||||
//
|
||||
if (Catalog->Catalog.Indicator != ELTORITO_ID_CATALOG || Catalog->Catalog.Id55AA != 0xAA55) {
|
||||
DEBUG ((EFI_D_ERROR, "EltCheckBootCatalog: El Torito boot catalog header IDs not correct\n"));
|
||||
DEBUG ((DEBUG_ERROR, "EltCheckBootCatalog: El Torito boot catalog header IDs not correct\n"));
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -160,7 +160,7 @@ PartitionInstallElToritoChildHandles (
|
||||
}
|
||||
|
||||
if ((Check & 0xFFFF) != 0) {
|
||||
DEBUG ((EFI_D_ERROR, "EltCheckBootCatalog: El Torito boot catalog header checksum failed\n"));
|
||||
DEBUG ((DEBUG_ERROR, "EltCheckBootCatalog: El Torito boot catalog header checksum failed\n"));
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -203,7 +203,7 @@ PartitionInstallElToritoChildHandles (
|
||||
break;
|
||||
|
||||
default:
|
||||
DEBUG ((EFI_D_INIT, "EltCheckDevice: unsupported El Torito boot media type %x\n", Catalog->Boot.MediaType));
|
||||
DEBUG ((DEBUG_INIT, "EltCheckDevice: unsupported El Torito boot media type %x\n", Catalog->Boot.MediaType));
|
||||
SectorCount = 0;
|
||||
SubBlockSize = Media->BlockSize;
|
||||
break;
|
||||
|
@@ -225,8 +225,8 @@ PartitionInstallGptChildHandles (
|
||||
LastBlock = BlockIo->Media->LastBlock;
|
||||
MediaId = BlockIo->Media->MediaId;
|
||||
|
||||
DEBUG ((EFI_D_INFO, " BlockSize : %d \n", BlockSize));
|
||||
DEBUG ((EFI_D_INFO, " LastBlock : %lx \n", LastBlock));
|
||||
DEBUG ((DEBUG_INFO, " BlockSize : %d \n", BlockSize));
|
||||
DEBUG ((DEBUG_INFO, " LastBlock : %lx \n", LastBlock));
|
||||
|
||||
GptValidStatus = EFI_NOT_FOUND;
|
||||
|
||||
@@ -291,43 +291,43 @@ PartitionInstallGptChildHandles (
|
||||
// Check primary and backup partition tables
|
||||
//
|
||||
if (!PartitionValidGptTable (BlockIo, DiskIo, PRIMARY_PART_HEADER_LBA, PrimaryHeader)) {
|
||||
DEBUG ((EFI_D_INFO, " Not Valid primary partition table\n"));
|
||||
DEBUG ((DEBUG_INFO, " Not Valid primary partition table\n"));
|
||||
|
||||
if (!PartitionValidGptTable (BlockIo, DiskIo, LastBlock, BackupHeader)) {
|
||||
DEBUG ((EFI_D_INFO, " Not Valid backup partition table\n"));
|
||||
DEBUG ((DEBUG_INFO, " Not Valid backup partition table\n"));
|
||||
goto Done;
|
||||
} else {
|
||||
DEBUG ((EFI_D_INFO, " Valid backup partition table\n"));
|
||||
DEBUG ((EFI_D_INFO, " Restore primary partition table by the backup\n"));
|
||||
DEBUG ((DEBUG_INFO, " Valid backup partition table\n"));
|
||||
DEBUG ((DEBUG_INFO, " Restore primary partition table by the backup\n"));
|
||||
if (!PartitionRestoreGptTable (BlockIo, DiskIo, BackupHeader)) {
|
||||
DEBUG ((EFI_D_INFO, " Restore primary partition table error\n"));
|
||||
DEBUG ((DEBUG_INFO, " Restore primary partition table error\n"));
|
||||
}
|
||||
|
||||
if (PartitionValidGptTable (BlockIo, DiskIo, BackupHeader->AlternateLBA, PrimaryHeader)) {
|
||||
DEBUG ((EFI_D_INFO, " Restore backup partition table success\n"));
|
||||
DEBUG ((DEBUG_INFO, " Restore backup partition table success\n"));
|
||||
}
|
||||
}
|
||||
} else if (!PartitionValidGptTable (BlockIo, DiskIo, PrimaryHeader->AlternateLBA, BackupHeader)) {
|
||||
DEBUG ((EFI_D_INFO, " Valid primary and !Valid backup partition table\n"));
|
||||
DEBUG ((EFI_D_INFO, " Restore backup partition table by the primary\n"));
|
||||
DEBUG ((DEBUG_INFO, " Valid primary and !Valid backup partition table\n"));
|
||||
DEBUG ((DEBUG_INFO, " Restore backup partition table by the primary\n"));
|
||||
if (!PartitionRestoreGptTable (BlockIo, DiskIo, PrimaryHeader)) {
|
||||
DEBUG ((EFI_D_INFO, " Restore backup partition table error\n"));
|
||||
DEBUG ((DEBUG_INFO, " Restore backup partition table error\n"));
|
||||
}
|
||||
|
||||
if (PartitionValidGptTable (BlockIo, DiskIo, PrimaryHeader->AlternateLBA, BackupHeader)) {
|
||||
DEBUG ((EFI_D_INFO, " Restore backup partition table success\n"));
|
||||
DEBUG ((DEBUG_INFO, " Restore backup partition table success\n"));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
DEBUG ((EFI_D_INFO, " Valid primary and Valid backup partition table\n"));
|
||||
DEBUG ((DEBUG_INFO, " Valid primary and Valid backup partition table\n"));
|
||||
|
||||
//
|
||||
// Read the EFI Partition Entries
|
||||
//
|
||||
PartEntry = AllocatePool (PrimaryHeader->NumberOfPartitionEntries * PrimaryHeader->SizeOfPartitionEntry);
|
||||
if (PartEntry == NULL) {
|
||||
DEBUG ((EFI_D_ERROR, "Allocate pool error\n"));
|
||||
DEBUG ((DEBUG_ERROR, "Allocate pool error\n"));
|
||||
goto Done;
|
||||
}
|
||||
|
||||
@@ -340,17 +340,17 @@ PartitionInstallGptChildHandles (
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
GptValidStatus = Status;
|
||||
DEBUG ((EFI_D_ERROR, " Partition Entry ReadDisk error\n"));
|
||||
DEBUG ((DEBUG_ERROR, " Partition Entry ReadDisk error\n"));
|
||||
goto Done;
|
||||
}
|
||||
|
||||
DEBUG ((EFI_D_INFO, " Partition entries read block success\n"));
|
||||
DEBUG ((DEBUG_INFO, " Partition entries read block success\n"));
|
||||
|
||||
DEBUG ((EFI_D_INFO, " Number of partition entries: %d\n", PrimaryHeader->NumberOfPartitionEntries));
|
||||
DEBUG ((DEBUG_INFO, " Number of partition entries: %d\n", PrimaryHeader->NumberOfPartitionEntries));
|
||||
|
||||
PEntryStatus = AllocateZeroPool (PrimaryHeader->NumberOfPartitionEntries * sizeof (EFI_PARTITION_ENTRY_STATUS));
|
||||
if (PEntryStatus == NULL) {
|
||||
DEBUG ((EFI_D_ERROR, "Allocate pool error\n"));
|
||||
DEBUG ((DEBUG_ERROR, "Allocate pool error\n"));
|
||||
goto Done;
|
||||
}
|
||||
|
||||
@@ -401,12 +401,12 @@ PartitionInstallGptChildHandles (
|
||||
}
|
||||
CopyMem (&PartitionInfo.Info.Gpt, Entry, sizeof (EFI_PARTITION_ENTRY));
|
||||
|
||||
DEBUG ((EFI_D_INFO, " Index : %d\n", (UINT32) Index));
|
||||
DEBUG ((EFI_D_INFO, " Start LBA : %lx\n", (UINT64) HdDev.PartitionStart));
|
||||
DEBUG ((EFI_D_INFO, " End LBA : %lx\n", (UINT64) Entry->EndingLBA));
|
||||
DEBUG ((EFI_D_INFO, " Partition size: %lx\n", (UINT64) HdDev.PartitionSize));
|
||||
DEBUG ((EFI_D_INFO, " Start : %lx", MultU64x32 (Entry->StartingLBA, BlockSize)));
|
||||
DEBUG ((EFI_D_INFO, " End : %lx\n", MultU64x32 (Entry->EndingLBA, BlockSize)));
|
||||
DEBUG ((DEBUG_INFO, " Index : %d\n", (UINT32) Index));
|
||||
DEBUG ((DEBUG_INFO, " Start LBA : %lx\n", (UINT64) HdDev.PartitionStart));
|
||||
DEBUG ((DEBUG_INFO, " End LBA : %lx\n", (UINT64) Entry->EndingLBA));
|
||||
DEBUG ((DEBUG_INFO, " Partition size: %lx\n", (UINT64) HdDev.PartitionSize));
|
||||
DEBUG ((DEBUG_INFO, " Start : %lx", MultU64x32 (Entry->StartingLBA, BlockSize)));
|
||||
DEBUG ((DEBUG_INFO, " End : %lx\n", MultU64x32 (Entry->EndingLBA, BlockSize)));
|
||||
|
||||
Status = PartitionInstallChildHandle (
|
||||
This,
|
||||
@@ -425,7 +425,7 @@ PartitionInstallGptChildHandles (
|
||||
);
|
||||
}
|
||||
|
||||
DEBUG ((EFI_D_INFO, "Prepare to Free Pool\n"));
|
||||
DEBUG ((DEBUG_INFO, "Prepare to Free Pool\n"));
|
||||
|
||||
Done:
|
||||
if (ProtectiveMbr != NULL) {
|
||||
@@ -481,7 +481,7 @@ PartitionValidGptTable (
|
||||
PartHdr = AllocateZeroPool (BlockSize);
|
||||
|
||||
if (PartHdr == NULL) {
|
||||
DEBUG ((EFI_D_ERROR, "Allocate pool error\n"));
|
||||
DEBUG ((DEBUG_ERROR, "Allocate pool error\n"));
|
||||
return FALSE;
|
||||
}
|
||||
//
|
||||
@@ -504,7 +504,7 @@ PartitionValidGptTable (
|
||||
PartHdr->MyLBA != Lba ||
|
||||
(PartHdr->SizeOfPartitionEntry < sizeof (EFI_PARTITION_ENTRY))
|
||||
) {
|
||||
DEBUG ((EFI_D_INFO, "Invalid efi partition table header\n"));
|
||||
DEBUG ((DEBUG_INFO, "Invalid efi partition table header\n"));
|
||||
FreePool (PartHdr);
|
||||
return FALSE;
|
||||
}
|
||||
@@ -523,7 +523,7 @@ PartitionValidGptTable (
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
DEBUG ((EFI_D_INFO, " Valid efi partition table header\n"));
|
||||
DEBUG ((DEBUG_INFO, " Valid efi partition table header\n"));
|
||||
FreePool (PartHdr);
|
||||
return TRUE;
|
||||
}
|
||||
@@ -557,7 +557,7 @@ PartitionCheckGptEntryArrayCRC (
|
||||
//
|
||||
Ptr = AllocatePool (PartHeader->NumberOfPartitionEntries * PartHeader->SizeOfPartitionEntry);
|
||||
if (Ptr == NULL) {
|
||||
DEBUG ((EFI_D_ERROR, " Allocate pool error\n"));
|
||||
DEBUG ((DEBUG_ERROR, " Allocate pool error\n"));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -577,7 +577,7 @@ PartitionCheckGptEntryArrayCRC (
|
||||
|
||||
Status = gBS->CalculateCrc32 (Ptr, Size, &Crc);
|
||||
if (EFI_ERROR (Status)) {
|
||||
DEBUG ((EFI_D_ERROR, "CheckPEntryArrayCRC: Crc calculation failed\n"));
|
||||
DEBUG ((DEBUG_ERROR, "CheckPEntryArrayCRC: Crc calculation failed\n"));
|
||||
FreePool (Ptr);
|
||||
return FALSE;
|
||||
}
|
||||
@@ -623,7 +623,7 @@ PartitionRestoreGptTable (
|
||||
PartHdr = AllocateZeroPool (BlockSize);
|
||||
|
||||
if (PartHdr == NULL) {
|
||||
DEBUG ((EFI_D_ERROR, "Allocate pool error\n"));
|
||||
DEBUG ((DEBUG_ERROR, "Allocate pool error\n"));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -651,7 +651,7 @@ PartitionRestoreGptTable (
|
||||
|
||||
Ptr = AllocatePool (PartHeader->NumberOfPartitionEntries * PartHeader->SizeOfPartitionEntry);
|
||||
if (Ptr == NULL) {
|
||||
DEBUG ((EFI_D_ERROR, " Allocate pool error\n"));
|
||||
DEBUG ((DEBUG_ERROR, " Allocate pool error\n"));
|
||||
Status = EFI_OUT_OF_RESOURCES;
|
||||
goto Done;
|
||||
}
|
||||
@@ -715,7 +715,7 @@ PartitionCheckGptEntry (
|
||||
UINTN Index1;
|
||||
UINTN Index2;
|
||||
|
||||
DEBUG ((EFI_D_INFO, " start check partition entries\n"));
|
||||
DEBUG ((DEBUG_INFO, " start check partition entries\n"));
|
||||
for (Index1 = 0; Index1 < PartHeader->NumberOfPartitionEntries; Index1++) {
|
||||
Entry = (EFI_PARTITION_ENTRY *) ((UINT8 *) PartEntry + Index1 * PartHeader->SizeOfPartitionEntry);
|
||||
if (CompareGuid (&Entry->PartitionTypeGUID, &gEfiPartTypeUnusedGuid)) {
|
||||
@@ -758,7 +758,7 @@ PartitionCheckGptEntry (
|
||||
}
|
||||
}
|
||||
|
||||
DEBUG ((EFI_D_INFO, " End check partition entries\n"));
|
||||
DEBUG ((DEBUG_INFO, " End check partition entries\n"));
|
||||
}
|
||||
|
||||
|
||||
@@ -850,7 +850,7 @@ PartitionCheckCrcAltSize (
|
||||
}
|
||||
|
||||
if ((MaxSize != 0) && (Size > MaxSize)) {
|
||||
DEBUG ((EFI_D_ERROR, "CheckCrc32: Size > MaxSize\n"));
|
||||
DEBUG ((DEBUG_ERROR, "CheckCrc32: Size > MaxSize\n"));
|
||||
return FALSE;
|
||||
}
|
||||
//
|
||||
@@ -861,7 +861,7 @@ PartitionCheckCrcAltSize (
|
||||
|
||||
Status = gBS->CalculateCrc32 ((UINT8 *) Hdr, Size, &Crc);
|
||||
if (EFI_ERROR (Status)) {
|
||||
DEBUG ((EFI_D_ERROR, "CheckCrc32: Crc calculation failed\n"));
|
||||
DEBUG ((DEBUG_ERROR, "CheckCrc32: Crc calculation failed\n"));
|
||||
return FALSE;
|
||||
}
|
||||
//
|
||||
@@ -874,7 +874,7 @@ PartitionCheckCrcAltSize (
|
||||
//
|
||||
DEBUG_CODE_BEGIN ();
|
||||
if (OrgCrc != Crc) {
|
||||
DEBUG ((EFI_D_ERROR, "CheckCrc32: Crc check failed\n"));
|
||||
DEBUG ((DEBUG_ERROR, "CheckCrc32: Crc check failed\n"));
|
||||
}
|
||||
DEBUG_CODE_END ();
|
||||
|
||||
|
@@ -71,7 +71,7 @@ PartitionValidMbr (
|
||||
// with INT 13h
|
||||
//
|
||||
|
||||
DEBUG((EFI_D_INFO, "PartitionValidMbr: Bad MBR partition size EndingLBA(%1x) > LastLBA(%1x)\n", EndingLBA, LastLba));
|
||||
DEBUG((DEBUG_INFO, "PartitionValidMbr: Bad MBR partition size EndingLBA(%1x) > LastLBA(%1x)\n", EndingLBA, LastLba));
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
@@ -417,7 +417,7 @@ PartitionDriverBindingStop (
|
||||
// bus driver. Hence, additional check is needed here.
|
||||
//
|
||||
if (HasChildren (ControllerHandle)) {
|
||||
DEBUG((EFI_D_ERROR, "PartitionDriverBindingStop: Still has child.\n"));
|
||||
DEBUG((DEBUG_ERROR, "PartitionDriverBindingStop: Still has child.\n"));
|
||||
return EFI_DEVICE_ERROR;
|
||||
}
|
||||
|
||||
@@ -486,7 +486,7 @@ PartitionDriverBindingStop (
|
||||
|
||||
if (BlockIo2 != NULL) {
|
||||
Status = BlockIo2->FlushBlocksEx (BlockIo2, NULL);
|
||||
DEBUG((EFI_D_ERROR, "PartitionDriverBindingStop: FlushBlocksEx returned with %r\n", Status));
|
||||
DEBUG((DEBUG_ERROR, "PartitionDriverBindingStop: FlushBlocksEx returned with %r\n", Status));
|
||||
} else {
|
||||
Status = EFI_SUCCESS;
|
||||
}
|
||||
@@ -1372,4 +1372,3 @@ HasChildren (
|
||||
|
||||
return (BOOLEAN) (Index < EntryCount);
|
||||
}
|
||||
|
||||
|
@@ -68,7 +68,7 @@ RamDiskAcpiCheck (
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
DEBUG ((
|
||||
EFI_D_INFO,
|
||||
DEBUG_INFO,
|
||||
"RamDiskAcpiCheck: Cannot locate the EFI ACPI Table Protocol, "
|
||||
"unable to publish RAM disks to NFIT.\n"
|
||||
));
|
||||
@@ -85,7 +85,7 @@ RamDiskAcpiCheck (
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
DEBUG ((
|
||||
EFI_D_INFO,
|
||||
DEBUG_INFO,
|
||||
"RamDiskAcpiCheck: Cannot locate the EFI ACPI Sdt Protocol, "
|
||||
"unable to publish RAM disks to NFIT.\n"
|
||||
));
|
||||
@@ -134,7 +134,7 @@ RamDiskDxeEntryPoint (
|
||||
&DummyInterface
|
||||
);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
DEBUG ((EFI_D_INFO, "Driver already started!\n"));
|
||||
DEBUG ((DEBUG_INFO, "Driver already started!\n"));
|
||||
return EFI_ALREADY_STARTED;
|
||||
}
|
||||
|
||||
|
@@ -194,7 +194,7 @@ RamDiskPublishNfit (
|
||||
>= PrivateData->StartingAddr + PrivateData->Size)) {
|
||||
MemoryFound = TRUE;
|
||||
DEBUG ((
|
||||
EFI_D_INFO,
|
||||
DEBUG_INFO,
|
||||
"RamDiskPublishNfit: RAM disk with reserved memory type, will publish to NFIT.\n"
|
||||
));
|
||||
break;
|
||||
@@ -237,7 +237,7 @@ RamDiskPublishNfit (
|
||||
// A NFIT is already in the ACPI table.
|
||||
//
|
||||
DEBUG ((
|
||||
EFI_D_INFO,
|
||||
DEBUG_INFO,
|
||||
"RamDiskPublishNfit: A NFIT is already exist in the ACPI Table.\n"
|
||||
));
|
||||
|
||||
@@ -300,7 +300,7 @@ RamDiskPublishNfit (
|
||||
// No NFIT is in the ACPI table, we will create one here.
|
||||
//
|
||||
DEBUG ((
|
||||
EFI_D_INFO,
|
||||
DEBUG_INFO,
|
||||
"RamDiskPublishNfit: No NFIT is in the ACPI Table, will create one.\n"
|
||||
));
|
||||
|
||||
|
@@ -523,7 +523,7 @@ DriverHealthManagerRepairNotify (
|
||||
IN UINTN Limit
|
||||
)
|
||||
{
|
||||
DEBUG ((EFI_D_INFO, "[DriverHealthManagement]RepairNotify: %d/%d\n", Value, Limit));
|
||||
DEBUG ((DEBUG_INFO, "[DriverHealthManagement]RepairNotify: %d/%d\n", Value, Limit));
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
@@ -958,7 +958,7 @@ DriverHealthManagerCallback (
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
DEBUG ((EFI_D_ERROR, "QuestionId = %x\n", QuestionId));
|
||||
DEBUG ((DEBUG_ERROR, "QuestionId = %x\n", QuestionId));
|
||||
|
||||
//
|
||||
// We will have returned from processing a callback - user either hit ESC to exit, or selected
|
||||
@@ -983,5 +983,3 @@ DriverHealthManagerCallback (
|
||||
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
|
@@ -988,51 +988,51 @@ CommonEbcExceptionHandler (
|
||||
// We print debug information to let user know what happen.
|
||||
//
|
||||
DEBUG ((
|
||||
EFI_D_ERROR,
|
||||
DEBUG_ERROR,
|
||||
"EBC Interrupter Version - 0x%016lx\n",
|
||||
(UINT64) (((VM_MAJOR_VERSION & 0xFFFF) << 16) | ((VM_MINOR_VERSION & 0xFFFF)))
|
||||
));
|
||||
DEBUG ((
|
||||
EFI_D_ERROR,
|
||||
DEBUG_ERROR,
|
||||
"Exception Type - 0x%016lx\n",
|
||||
(UINT64)(UINTN)InterruptType
|
||||
));
|
||||
DEBUG ((
|
||||
EFI_D_ERROR,
|
||||
DEBUG_ERROR,
|
||||
" R0 - 0x%016lx, R1 - 0x%016lx\n",
|
||||
SystemContext.SystemContextEbc->R0,
|
||||
SystemContext.SystemContextEbc->R1
|
||||
));
|
||||
DEBUG ((
|
||||
EFI_D_ERROR,
|
||||
DEBUG_ERROR,
|
||||
" R2 - 0x%016lx, R3 - 0x%016lx\n",
|
||||
SystemContext.SystemContextEbc->R2,
|
||||
SystemContext.SystemContextEbc->R3
|
||||
));
|
||||
DEBUG ((
|
||||
EFI_D_ERROR,
|
||||
DEBUG_ERROR,
|
||||
" R4 - 0x%016lx, R5 - 0x%016lx\n",
|
||||
SystemContext.SystemContextEbc->R4,
|
||||
SystemContext.SystemContextEbc->R5
|
||||
));
|
||||
DEBUG ((
|
||||
EFI_D_ERROR,
|
||||
DEBUG_ERROR,
|
||||
" R6 - 0x%016lx, R7 - 0x%016lx\n",
|
||||
SystemContext.SystemContextEbc->R6,
|
||||
SystemContext.SystemContextEbc->R7
|
||||
));
|
||||
DEBUG ((
|
||||
EFI_D_ERROR,
|
||||
DEBUG_ERROR,
|
||||
" Flags - 0x%016lx\n",
|
||||
SystemContext.SystemContextEbc->Flags
|
||||
));
|
||||
DEBUG ((
|
||||
EFI_D_ERROR,
|
||||
DEBUG_ERROR,
|
||||
" ControlFlags - 0x%016lx\n",
|
||||
SystemContext.SystemContextEbc->ControlFlags
|
||||
));
|
||||
DEBUG ((
|
||||
EFI_D_ERROR,
|
||||
DEBUG_ERROR,
|
||||
" Ip - 0x%016lx\n\n",
|
||||
SystemContext.SystemContextEbc->Ip
|
||||
));
|
||||
|
@@ -485,10 +485,10 @@ EsrtDxeLockEsrtRepository(
|
||||
Status = gBS->LocateProtocol (&gEdkiiVariableLockProtocolGuid, NULL, (VOID **) &VariableLock);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
Status = VariableLock->RequestToLock (VariableLock, EFI_ESRT_FMP_VARIABLE_NAME, &gEfiCallerIdGuid);
|
||||
DEBUG((EFI_D_INFO, "EsrtDxe Lock EsrtFmp Variable Status 0x%x", Status));
|
||||
DEBUG((DEBUG_INFO, "EsrtDxe Lock EsrtFmp Variable Status 0x%x", Status));
|
||||
|
||||
Status = VariableLock->RequestToLock (VariableLock, EFI_ESRT_NONFMP_VARIABLE_NAME, &gEfiCallerIdGuid);
|
||||
DEBUG((EFI_D_INFO, "EsrtDxe Lock EsrtNonFmp Variable Status 0x%x", Status));
|
||||
DEBUG((DEBUG_INFO, "EsrtDxe Lock EsrtNonFmp Variable Status 0x%x", Status));
|
||||
}
|
||||
|
||||
return Status;
|
||||
@@ -539,7 +539,7 @@ EsrtReadyToBootEventNotify (
|
||||
}
|
||||
|
||||
if (NonFmpRepositorySize % sizeof(EFI_SYSTEM_RESOURCE_ENTRY) != 0) {
|
||||
DEBUG((EFI_D_ERROR, "NonFmp Repository Corrupt. Need to rebuild NonFmp Repository.\n"));
|
||||
DEBUG((DEBUG_ERROR, "NonFmp Repository Corrupt. Need to rebuild NonFmp Repository.\n"));
|
||||
NonFmpRepositorySize = 0;
|
||||
}
|
||||
|
||||
@@ -558,7 +558,7 @@ EsrtReadyToBootEventNotify (
|
||||
}
|
||||
|
||||
if (FmpRepositorySize % sizeof(EFI_SYSTEM_RESOURCE_ENTRY) != 0) {
|
||||
DEBUG((EFI_D_ERROR, "Fmp Repository Corrupt. Need to rebuild Fmp Repository.\n"));
|
||||
DEBUG((DEBUG_ERROR, "Fmp Repository Corrupt. Need to rebuild Fmp Repository.\n"));
|
||||
FmpRepositorySize = 0;
|
||||
}
|
||||
|
||||
@@ -573,7 +573,7 @@ EsrtReadyToBootEventNotify (
|
||||
|
||||
EsrtTable = AllocatePool(sizeof(EFI_SYSTEM_RESOURCE_TABLE) + NonFmpRepositorySize + FmpRepositorySize);
|
||||
if (EsrtTable == NULL) {
|
||||
DEBUG ((EFI_D_ERROR, "Esrt table memory allocation failure\n"));
|
||||
DEBUG ((DEBUG_ERROR, "Esrt table memory allocation failure\n"));
|
||||
goto EXIT;
|
||||
}
|
||||
|
||||
|
@@ -56,7 +56,7 @@ GetEsrtEntry (
|
||||
}
|
||||
|
||||
if (RepositorySize % sizeof(EFI_SYSTEM_RESOURCE_ENTRY) != 0) {
|
||||
DEBUG((EFI_D_ERROR, "Repository Corrupt. Need to rebuild Repository.\n"));
|
||||
DEBUG((DEBUG_ERROR, "Repository Corrupt. Need to rebuild Repository.\n"));
|
||||
Status = EFI_ABORTED;
|
||||
goto EXIT;
|
||||
}
|
||||
@@ -137,7 +137,7 @@ InsertEsrtEntry(
|
||||
// if exist, update Esrt cache repository
|
||||
//
|
||||
if (RepositorySize % sizeof(EFI_SYSTEM_RESOURCE_ENTRY) != 0) {
|
||||
DEBUG((EFI_D_ERROR, "Repository Corrupt. Need to rebuild Repository.\n"));
|
||||
DEBUG((DEBUG_ERROR, "Repository Corrupt. Need to rebuild Repository.\n"));
|
||||
//
|
||||
// Repository is corrupt. Clear Repository before insert new entry
|
||||
//
|
||||
@@ -245,7 +245,7 @@ DeleteEsrtEntry(
|
||||
}
|
||||
|
||||
if ((RepositorySize % sizeof(EFI_SYSTEM_RESOURCE_ENTRY)) != 0) {
|
||||
DEBUG((EFI_D_ERROR, "Repository Corrupt. Need to rebuild Repository.\n"));
|
||||
DEBUG((DEBUG_ERROR, "Repository Corrupt. Need to rebuild Repository.\n"));
|
||||
//
|
||||
// Repository is corrupt. Clear Repository before insert new entry
|
||||
//
|
||||
@@ -347,7 +347,7 @@ UpdateEsrtEntry(
|
||||
// if exist, update Esrt cache repository
|
||||
//
|
||||
if (RepositorySize % sizeof(EFI_SYSTEM_RESOURCE_ENTRY) != 0) {
|
||||
DEBUG((EFI_D_ERROR, "Repository Corrupt. Need to rebuild Repository.\n"));
|
||||
DEBUG((DEBUG_ERROR, "Repository Corrupt. Need to rebuild Repository.\n"));
|
||||
//
|
||||
// Repository is corrupt. Clear Repository before insert new entry
|
||||
//
|
||||
|
@@ -89,7 +89,7 @@ FtwAllocate (
|
||||
// Check if there is enough space for the coming allocation
|
||||
//
|
||||
if (FTW_WRITE_TOTAL_SIZE (NumberOfWrites, PrivateDataSize) > FtwDevice->FtwWorkSpaceHeader->WriteQueueSize) {
|
||||
DEBUG ((EFI_D_ERROR, "Ftw: Allocate() request exceed Workspace, Caller: %g\n", CallerId));
|
||||
DEBUG ((DEBUG_ERROR, "Ftw: Allocate() request exceed Workspace, Caller: %g\n", CallerId));
|
||||
return EFI_BUFFER_TOO_SMALL;
|
||||
}
|
||||
//
|
||||
@@ -153,7 +153,7 @@ FtwAllocate (
|
||||
}
|
||||
|
||||
DEBUG (
|
||||
(EFI_D_INFO,
|
||||
(DEBUG_INFO,
|
||||
"Ftw: Allocate() success, Caller:%g, # %d\n",
|
||||
CallerId,
|
||||
NumberOfWrites)
|
||||
@@ -358,8 +358,8 @@ FtwWrite (
|
||||
// Ftw Write Header is not allocated
|
||||
// Additional private data is not NULL, the private data size can't be determined.
|
||||
//
|
||||
DEBUG ((EFI_D_ERROR, "Ftw: no allocates space for write record!\n"));
|
||||
DEBUG ((EFI_D_ERROR, "Ftw: Allocate service should be called before Write service!\n"));
|
||||
DEBUG ((DEBUG_ERROR, "Ftw: no allocates space for write record!\n"));
|
||||
DEBUG ((DEBUG_ERROR, "Ftw: Allocate service should be called before Write service!\n"));
|
||||
return EFI_NOT_READY;
|
||||
}
|
||||
}
|
||||
@@ -396,7 +396,7 @@ FtwWrite (
|
||||
|
||||
Status = Fvb->GetPhysicalAddress (Fvb, &FvbPhysicalAddress);
|
||||
if (EFI_ERROR (Status)) {
|
||||
DEBUG ((EFI_D_ERROR, "Ftw: Write(), Get FVB physical address - %r\n", Status));
|
||||
DEBUG ((DEBUG_ERROR, "Ftw: Write(), Get FVB physical address - %r\n", Status));
|
||||
return EFI_ABORTED;
|
||||
}
|
||||
|
||||
@@ -405,12 +405,12 @@ FtwWrite (
|
||||
//
|
||||
Status = Fvb->GetBlockSize (Fvb, 0, &BlockSize, &NumberOfBlocks);
|
||||
if (EFI_ERROR (Status)) {
|
||||
DEBUG ((EFI_D_ERROR, "Ftw: Write(), Get block size - %r\n", Status));
|
||||
DEBUG ((DEBUG_ERROR, "Ftw: Write(), Get block size - %r\n", Status));
|
||||
return EFI_ABORTED;
|
||||
}
|
||||
|
||||
NumberOfWriteBlocks = FTW_BLOCKS (Offset + Length, BlockSize);
|
||||
DEBUG ((EFI_D_INFO, "Ftw: Write(), BlockSize - 0x%x, NumberOfWriteBlock - 0x%x\n", BlockSize, NumberOfWriteBlocks));
|
||||
DEBUG ((DEBUG_INFO, "Ftw: Write(), BlockSize - 0x%x, NumberOfWriteBlock - 0x%x\n", BlockSize, NumberOfWriteBlocks));
|
||||
WriteLength = NumberOfWriteBlocks * BlockSize;
|
||||
|
||||
//
|
||||
@@ -611,7 +611,7 @@ FtwWrite (
|
||||
FreePool (SpareBuffer);
|
||||
|
||||
DEBUG (
|
||||
(EFI_D_INFO,
|
||||
(DEBUG_INFO,
|
||||
"Ftw: Write() success, (Lba:Offset)=(%lx:0x%x), Length: 0x%x\n",
|
||||
Lba,
|
||||
Offset,
|
||||
@@ -674,7 +674,7 @@ FtwRestart (
|
||||
//
|
||||
Status = Fvb->GetBlockSize (Fvb, 0, &BlockSize, &NumberOfBlocks);
|
||||
if (EFI_ERROR (Status)) {
|
||||
DEBUG ((EFI_D_ERROR, "Ftw: Restart(), Get block size - %r\n", Status));
|
||||
DEBUG ((DEBUG_ERROR, "Ftw: Restart(), Get block size - %r\n", Status));
|
||||
return EFI_ABORTED;
|
||||
}
|
||||
|
||||
@@ -714,7 +714,7 @@ FtwRestart (
|
||||
return EFI_ABORTED;
|
||||
}
|
||||
|
||||
DEBUG ((EFI_D_INFO, "%a(): success\n", __FUNCTION__));
|
||||
DEBUG ((DEBUG_INFO, "%a(): success\n", __FUNCTION__));
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
@@ -769,7 +769,7 @@ FtwAbort (
|
||||
|
||||
FtwDevice->FtwLastWriteHeader->Complete = FTW_VALID_STATE;
|
||||
|
||||
DEBUG ((EFI_D_INFO, "%a(): success\n", __FUNCTION__));
|
||||
DEBUG ((DEBUG_INFO, "%a(): success\n", __FUNCTION__));
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
@@ -880,8 +880,7 @@ FtwGetLastWrite (
|
||||
Status = EFI_SUCCESS;
|
||||
}
|
||||
|
||||
DEBUG ((EFI_D_INFO, "%a(): success\n", __FUNCTION__));
|
||||
DEBUG ((DEBUG_INFO, "%a(): success\n", __FUNCTION__));
|
||||
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
@@ -324,13 +324,13 @@ SmmFaultTolerantWriteHandler (
|
||||
TempCommBufferSize = *CommBufferSize;
|
||||
|
||||
if (TempCommBufferSize < SMM_FTW_COMMUNICATE_HEADER_SIZE) {
|
||||
DEBUG ((EFI_D_ERROR, "SmmFtwHandler: SMM communication buffer size invalid!\n"));
|
||||
DEBUG ((DEBUG_ERROR, "SmmFtwHandler: SMM communication buffer size invalid!\n"));
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
CommBufferPayloadSize = TempCommBufferSize - SMM_FTW_COMMUNICATE_HEADER_SIZE;
|
||||
|
||||
if (!FtwSmmIsBufferOutsideSmmValid ((UINTN)CommBuffer, TempCommBufferSize)) {
|
||||
DEBUG ((EFI_D_ERROR, "SmmFtwHandler: SMM communication buffer in SMRAM or overflow!\n"));
|
||||
DEBUG ((DEBUG_ERROR, "SmmFtwHandler: SMM communication buffer in SMRAM or overflow!\n"));
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
@@ -340,7 +340,7 @@ SmmFaultTolerantWriteHandler (
|
||||
//
|
||||
// It will be not safe to expose the operations after End Of Dxe.
|
||||
//
|
||||
DEBUG ((EFI_D_ERROR, "SmmFtwHandler: Not safe to do the operation: %x after End Of Dxe, so access denied!\n", SmmFtwFunctionHeader->Function));
|
||||
DEBUG ((DEBUG_ERROR, "SmmFtwHandler: Not safe to do the operation: %x after End Of Dxe, so access denied!\n", SmmFtwFunctionHeader->Function));
|
||||
SmmFtwFunctionHeader->ReturnStatus = EFI_ACCESS_DENIED;
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
@@ -348,7 +348,7 @@ SmmFaultTolerantWriteHandler (
|
||||
switch (SmmFtwFunctionHeader->Function) {
|
||||
case FTW_FUNCTION_GET_MAX_BLOCK_SIZE:
|
||||
if (CommBufferPayloadSize < sizeof (SMM_FTW_GET_MAX_BLOCK_SIZE_HEADER)) {
|
||||
DEBUG ((EFI_D_ERROR, "GetMaxBlockSize: SMM communication buffer size invalid!\n"));
|
||||
DEBUG ((DEBUG_ERROR, "GetMaxBlockSize: SMM communication buffer size invalid!\n"));
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
SmmGetMaxBlockSizeHeader = (SMM_FTW_GET_MAX_BLOCK_SIZE_HEADER *) SmmFtwFunctionHeader->Data;
|
||||
@@ -361,7 +361,7 @@ SmmFaultTolerantWriteHandler (
|
||||
|
||||
case FTW_FUNCTION_ALLOCATE:
|
||||
if (CommBufferPayloadSize < sizeof (SMM_FTW_ALLOCATE_HEADER)) {
|
||||
DEBUG ((EFI_D_ERROR, "Allocate: SMM communication buffer size invalid!\n"));
|
||||
DEBUG ((DEBUG_ERROR, "Allocate: SMM communication buffer size invalid!\n"));
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
SmmFtwAllocateHeader = (SMM_FTW_ALLOCATE_HEADER *) SmmFtwFunctionHeader->Data;
|
||||
@@ -375,7 +375,7 @@ SmmFaultTolerantWriteHandler (
|
||||
|
||||
case FTW_FUNCTION_WRITE:
|
||||
if (CommBufferPayloadSize < OFFSET_OF (SMM_FTW_WRITE_HEADER, Data)) {
|
||||
DEBUG ((EFI_D_ERROR, "Write: SMM communication buffer size invalid!\n"));
|
||||
DEBUG ((DEBUG_ERROR, "Write: SMM communication buffer size invalid!\n"));
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
SmmFtwWriteHeader = (SMM_FTW_WRITE_HEADER *) SmmFtwFunctionHeader->Data;
|
||||
@@ -395,7 +395,7 @@ SmmFaultTolerantWriteHandler (
|
||||
// SMRAM range check already covered before
|
||||
//
|
||||
if (InfoSize > CommBufferPayloadSize) {
|
||||
DEBUG ((EFI_D_ERROR, "Write: Data size exceed communication buffer size limit!\n"));
|
||||
DEBUG ((DEBUG_ERROR, "Write: Data size exceed communication buffer size limit!\n"));
|
||||
Status = EFI_ACCESS_DENIED;
|
||||
break;
|
||||
}
|
||||
@@ -431,7 +431,7 @@ SmmFaultTolerantWriteHandler (
|
||||
|
||||
case FTW_FUNCTION_RESTART:
|
||||
if (CommBufferPayloadSize < sizeof (SMM_FTW_RESTART_HEADER)) {
|
||||
DEBUG ((EFI_D_ERROR, "Restart: SMM communication buffer size invalid!\n"));
|
||||
DEBUG ((DEBUG_ERROR, "Restart: SMM communication buffer size invalid!\n"));
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
SmmFtwRestartHeader = (SMM_FTW_RESTART_HEADER *) SmmFtwFunctionHeader->Data;
|
||||
@@ -451,7 +451,7 @@ SmmFaultTolerantWriteHandler (
|
||||
|
||||
case FTW_FUNCTION_GET_LAST_WRITE:
|
||||
if (CommBufferPayloadSize < OFFSET_OF (SMM_FTW_GET_LAST_WRITE_HEADER, Data)) {
|
||||
DEBUG ((EFI_D_ERROR, "GetLastWrite: SMM communication buffer size invalid!\n"));
|
||||
DEBUG ((DEBUG_ERROR, "GetLastWrite: SMM communication buffer size invalid!\n"));
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
SmmFtwGetLastWriteHeader = (SMM_FTW_GET_LAST_WRITE_HEADER *) SmmFtwFunctionHeader->Data;
|
||||
@@ -469,7 +469,7 @@ SmmFaultTolerantWriteHandler (
|
||||
// SMRAM range check already covered before
|
||||
//
|
||||
if (InfoSize > CommBufferPayloadSize) {
|
||||
DEBUG ((EFI_D_ERROR, "Data size exceed communication buffer size limit!\n"));
|
||||
DEBUG ((DEBUG_ERROR, "Data size exceed communication buffer size limit!\n"));
|
||||
Status = EFI_ACCESS_DENIED;
|
||||
break;
|
||||
}
|
||||
|
@@ -340,7 +340,7 @@ FlushSpareBlockToBootBlock (
|
||||
//
|
||||
Status = SarProtocol->GetSwapState (SarProtocol, &TopSwap);
|
||||
if (EFI_ERROR (Status)) {
|
||||
DEBUG ((EFI_D_ERROR, "Ftw: Get Top Swapped status - %r\n", Status));
|
||||
DEBUG ((DEBUG_ERROR, "Ftw: Get Top Swapped status - %r\n", Status));
|
||||
FreePool (Buffer);
|
||||
return EFI_ABORTED;
|
||||
}
|
||||
@@ -427,7 +427,7 @@ FlushSpareBlockToBootBlock (
|
||||
Ptr
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
DEBUG ((EFI_D_ERROR, "Ftw: FVB Write boot block - %r\n", Status));
|
||||
DEBUG ((DEBUG_ERROR, "Ftw: FVB Write boot block - %r\n", Status));
|
||||
FreePool (Buffer);
|
||||
return Status;
|
||||
}
|
||||
@@ -526,7 +526,7 @@ FlushSpareBlockToTargetBlock (
|
||||
Count = BlockSize;
|
||||
Status = FvBlock->Write (FvBlock, Lba + Index, 0, &Count, Ptr);
|
||||
if (EFI_ERROR (Status)) {
|
||||
DEBUG ((EFI_D_ERROR, "Ftw: FVB Write block - %r\n", Status));
|
||||
DEBUG ((DEBUG_ERROR, "Ftw: FVB Write block - %r\n", Status));
|
||||
FreePool (Buffer);
|
||||
return Status;
|
||||
}
|
||||
@@ -667,7 +667,7 @@ FlushSpareBlockToWorkingBlock (
|
||||
Ptr
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
DEBUG ((EFI_D_ERROR, "Ftw: FVB Write block - %r\n", Status));
|
||||
DEBUG ((DEBUG_ERROR, "Ftw: FVB Write block - %r\n", Status));
|
||||
FreePool (Buffer);
|
||||
return Status;
|
||||
}
|
||||
@@ -984,7 +984,7 @@ InitFtwDevice (
|
||||
FtwDevice->WorkSpaceLength = (UINTN) PcdGet32 (PcdFlashNvStorageFtwWorkingSize);
|
||||
FtwDevice->SpareAreaLength = (UINTN) PcdGet32 (PcdFlashNvStorageFtwSpareSize);
|
||||
if ((FtwDevice->WorkSpaceLength == 0) || (FtwDevice->SpareAreaLength == 0)) {
|
||||
DEBUG ((EFI_D_ERROR, "Ftw: Workspace or Spare block does not exist!\n"));
|
||||
DEBUG ((DEBUG_ERROR, "Ftw: Workspace or Spare block does not exist!\n"));
|
||||
FreePool (FtwDevice);
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
@@ -1103,13 +1103,13 @@ FindFvbForFtw (
|
||||
//
|
||||
if (((FtwDevice->WorkSpaceAddress & (FtwDevice->WorkBlockSize - 1)) != 0) ||
|
||||
((FtwDevice->WorkSpaceLength & (FtwDevice->WorkBlockSize - 1)) != 0)) {
|
||||
DEBUG ((EFI_D_ERROR, "Ftw: Work space address or length is not block size aligned when work space size is larger than one block size\n"));
|
||||
DEBUG ((DEBUG_ERROR, "Ftw: Work space address or length is not block size aligned when work space size is larger than one block size\n"));
|
||||
FreePool (HandleBuffer);
|
||||
ASSERT (FALSE);
|
||||
return EFI_ABORTED;
|
||||
}
|
||||
} else if ((FtwDevice->FtwWorkSpaceBase + FtwDevice->FtwWorkSpaceSize) > FtwDevice->WorkBlockSize) {
|
||||
DEBUG ((EFI_D_ERROR, "Ftw: The work space range should not span blocks when work space size is less than one block size\n"));
|
||||
DEBUG ((DEBUG_ERROR, "Ftw: The work space range should not span blocks when work space size is less than one block size\n"));
|
||||
FreePool (HandleBuffer);
|
||||
ASSERT (FALSE);
|
||||
return EFI_ABORTED;
|
||||
@@ -1138,7 +1138,7 @@ FindFvbForFtw (
|
||||
// Check the range of spare area to make sure that it's in FV range
|
||||
//
|
||||
if ((FtwDevice->FtwSpareLba + FtwDevice->NumberOfSpareBlock) > NumberOfBlocks) {
|
||||
DEBUG ((EFI_D_ERROR, "Ftw: Spare area is out of FV range\n"));
|
||||
DEBUG ((DEBUG_ERROR, "Ftw: Spare area is out of FV range\n"));
|
||||
FreePool (HandleBuffer);
|
||||
ASSERT (FALSE);
|
||||
return EFI_ABORTED;
|
||||
@@ -1148,7 +1148,7 @@ FindFvbForFtw (
|
||||
//
|
||||
if (((FtwDevice->SpareAreaAddress & (FtwDevice->SpareBlockSize - 1)) != 0) ||
|
||||
((FtwDevice->SpareAreaLength & (FtwDevice->SpareBlockSize - 1)) != 0)) {
|
||||
DEBUG ((EFI_D_ERROR, "Ftw: Spare area address or length is not block size aligned\n"));
|
||||
DEBUG ((DEBUG_ERROR, "Ftw: Spare area address or length is not block size aligned\n"));
|
||||
FreePool (HandleBuffer);
|
||||
//
|
||||
// Report Status Code EFI_SW_EC_ABORTED.
|
||||
@@ -1168,8 +1168,8 @@ FindFvbForFtw (
|
||||
(FtwDevice->FtwWorkSpaceLba == (EFI_LBA) (-1)) || (FtwDevice->FtwSpareLba == (EFI_LBA) (-1))) {
|
||||
return EFI_ABORTED;
|
||||
}
|
||||
DEBUG ((EFI_D_INFO, "Ftw: FtwWorkSpaceLba - 0x%lx, WorkBlockSize - 0x%x, FtwWorkSpaceBase - 0x%x\n", FtwDevice->FtwWorkSpaceLba, FtwDevice->WorkBlockSize, FtwDevice->FtwWorkSpaceBase));
|
||||
DEBUG ((EFI_D_INFO, "Ftw: FtwSpareLba - 0x%lx, SpareBlockSize - 0x%x\n", FtwDevice->FtwSpareLba, FtwDevice->SpareBlockSize));
|
||||
DEBUG ((DEBUG_INFO, "Ftw: FtwWorkSpaceLba - 0x%lx, WorkBlockSize - 0x%x, FtwWorkSpaceBase - 0x%x\n", FtwDevice->FtwWorkSpaceLba, FtwDevice->WorkBlockSize, FtwDevice->FtwWorkSpaceBase));
|
||||
DEBUG ((DEBUG_INFO, "Ftw: FtwSpareLba - 0x%lx, SpareBlockSize - 0x%x\n", FtwDevice->FtwSpareLba, FtwDevice->SpareBlockSize));
|
||||
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
@@ -1225,7 +1225,7 @@ InitFtwProtocol (
|
||||
}
|
||||
}
|
||||
FtwDevice->FtwWorkBlockLba = FtwDevice->FtwWorkSpaceLba + FtwDevice->NumberOfWorkSpaceBlock - FtwDevice->NumberOfWorkBlock;
|
||||
DEBUG ((EFI_D_INFO, "Ftw: NumberOfWorkBlock - 0x%x, FtwWorkBlockLba - 0x%lx\n", FtwDevice->NumberOfWorkBlock, FtwDevice->FtwWorkBlockLba));
|
||||
DEBUG ((DEBUG_INFO, "Ftw: NumberOfWorkBlock - 0x%x, FtwWorkBlockLba - 0x%lx\n", FtwDevice->NumberOfWorkBlock, FtwDevice->FtwWorkBlockLba));
|
||||
|
||||
//
|
||||
// Calcualte the LBA and base of work space in spare block.
|
||||
@@ -1234,7 +1234,7 @@ InitFtwProtocol (
|
||||
WorkSpaceLbaOffset = FtwDevice->FtwWorkSpaceLba - FtwDevice->FtwWorkBlockLba;
|
||||
FtwDevice->FtwWorkSpaceLbaInSpare = (EFI_LBA) (((UINTN) WorkSpaceLbaOffset * FtwDevice->WorkBlockSize + FtwDevice->FtwWorkSpaceBase) / FtwDevice->SpareBlockSize);
|
||||
FtwDevice->FtwWorkSpaceBaseInSpare = ((UINTN) WorkSpaceLbaOffset * FtwDevice->WorkBlockSize + FtwDevice->FtwWorkSpaceBase) % FtwDevice->SpareBlockSize;
|
||||
DEBUG ((EFI_D_INFO, "Ftw: WorkSpaceLbaInSpare - 0x%lx, WorkSpaceBaseInSpare - 0x%x\n", FtwDevice->FtwWorkSpaceLbaInSpare, FtwDevice->FtwWorkSpaceBaseInSpare));
|
||||
DEBUG ((DEBUG_INFO, "Ftw: WorkSpaceLbaInSpare - 0x%lx, WorkSpaceBaseInSpare - 0x%x\n", FtwDevice->FtwWorkSpaceLbaInSpare, FtwDevice->FtwWorkSpaceBaseInSpare));
|
||||
|
||||
//
|
||||
// Initialize other parameters, and set WorkSpace as FTW_ERASED_BYTE.
|
||||
@@ -1274,7 +1274,7 @@ InitFtwProtocol (
|
||||
//
|
||||
if (IsValidWorkSpace (FtwDevice->FtwWorkSpaceHeader)) {
|
||||
Status = FlushSpareBlockToWorkingBlock (FtwDevice);
|
||||
DEBUG ((EFI_D_INFO, "Ftw: Restart working block update in %a() - %r\n",
|
||||
DEBUG ((DEBUG_INFO, "Ftw: Restart working block update in %a() - %r\n",
|
||||
__FUNCTION__, Status));
|
||||
FtwAbort (&FtwDevice->FtwInstance);
|
||||
//
|
||||
@@ -1283,7 +1283,7 @@ InitFtwProtocol (
|
||||
Status = WorkSpaceRefresh (FtwDevice);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
} else {
|
||||
DEBUG ((EFI_D_INFO,
|
||||
DEBUG ((DEBUG_INFO,
|
||||
"Ftw: Both working and spare blocks are invalid, init workspace\n"));
|
||||
//
|
||||
// If both are invalid, then initialize work space.
|
||||
@@ -1309,7 +1309,7 @@ InitFtwProtocol (
|
||||
(FtwDevice->FtwLastWriteRecord->SpareComplete != FTW_VALID_STATE) &&
|
||||
IsFirstRecordOfWrites (FtwDevice->FtwLastWriteHeader, FtwDevice->FtwLastWriteRecord)
|
||||
) {
|
||||
DEBUG ((EFI_D_ERROR, "Ftw: Init.. find first record not SpareCompleted, abort()\n"));
|
||||
DEBUG ((DEBUG_ERROR, "Ftw: Init.. find first record not SpareCompleted, abort()\n"));
|
||||
FtwAbort (&FtwDevice->FtwInstance);
|
||||
}
|
||||
//
|
||||
@@ -1320,7 +1320,7 @@ InitFtwProtocol (
|
||||
(FtwDevice->FtwLastWriteRecord->DestinationComplete == FTW_VALID_STATE) &&
|
||||
IsLastRecordOfWrites (FtwDevice->FtwLastWriteHeader, FtwDevice->FtwLastWriteRecord)
|
||||
) {
|
||||
DEBUG ((EFI_D_ERROR, "Ftw: Init.. find last record completed but header not, abort()\n"));
|
||||
DEBUG ((DEBUG_ERROR, "Ftw: Init.. find last record completed but header not, abort()\n"));
|
||||
FtwAbort (&FtwDevice->FtwInstance);
|
||||
}
|
||||
//
|
||||
@@ -1346,7 +1346,7 @@ InitFtwProtocol (
|
||||
) {
|
||||
if (FtwDevice->FtwLastWriteRecord->BootBlockUpdate == FTW_VALID_STATE) {
|
||||
Status = FlushSpareBlockToBootBlock (FtwDevice);
|
||||
DEBUG ((EFI_D_ERROR, "Ftw: Restart boot block update - %r\n", Status));
|
||||
DEBUG ((DEBUG_ERROR, "Ftw: Restart boot block update - %r\n", Status));
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
FtwAbort (&FtwDevice->FtwInstance);
|
||||
} else {
|
||||
@@ -1357,7 +1357,7 @@ InitFtwProtocol (
|
||||
FvbHandle = GetFvbByAddress ((EFI_PHYSICAL_ADDRESS) (UINTN) ((INT64) FtwDevice->SpareAreaAddress + FtwDevice->FtwLastWriteRecord->RelativeOffset), &Fvb);
|
||||
if (FvbHandle != NULL) {
|
||||
Status = FtwRestart (&FtwDevice->FtwInstance, FvbHandle);
|
||||
DEBUG ((EFI_D_ERROR, "Ftw: Restart last write - %r\n", Status));
|
||||
DEBUG ((DEBUG_ERROR, "Ftw: Restart last write - %r\n", Status));
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
}
|
||||
FtwAbort (&FtwDevice->FtwInstance);
|
||||
@@ -1375,4 +1375,3 @@ InitFtwProtocol (
|
||||
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
|
@@ -86,7 +86,7 @@ IsValidWorkSpace (
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
DEBUG ((EFI_D_INFO, "Ftw: Work block header check mismatch\n"));
|
||||
DEBUG ((DEBUG_INFO, "Ftw: Work block header check mismatch\n"));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -287,7 +287,7 @@ WorkSpaceRefresh (
|
||||
&FtwDevice->FtwLastWriteHeader
|
||||
);
|
||||
RemainingSpaceSize = FtwDevice->FtwWorkSpaceSize - ((UINTN) FtwDevice->FtwLastWriteHeader - (UINTN) FtwDevice->FtwWorkSpace);
|
||||
DEBUG ((EFI_D_INFO, "Ftw: Remaining work space size - %x\n", RemainingSpaceSize));
|
||||
DEBUG ((DEBUG_INFO, "Ftw: Remaining work space size - %x\n", RemainingSpaceSize));
|
||||
//
|
||||
// If FtwGetLastWriteHeader() returns error, or the remaining space size is even not enough to contain
|
||||
// one EFI_FAULT_TOLERANT_WRITE_HEADER + one EFI_FAULT_TOLERANT_WRITE_RECORD(It will cause that the header
|
||||
@@ -300,7 +300,7 @@ WorkSpaceRefresh (
|
||||
//
|
||||
Status = FtwReclaimWorkSpace (FtwDevice, TRUE);
|
||||
if (EFI_ERROR (Status)) {
|
||||
DEBUG ((EFI_D_ERROR, "Ftw: Reclaim workspace - %r\n", Status));
|
||||
DEBUG ((DEBUG_ERROR, "Ftw: Reclaim workspace - %r\n", Status));
|
||||
return EFI_ABORTED;
|
||||
}
|
||||
//
|
||||
@@ -370,7 +370,7 @@ FtwReclaimWorkSpace (
|
||||
UINT8 *Ptr;
|
||||
EFI_LBA WorkSpaceLbaOffset;
|
||||
|
||||
DEBUG ((EFI_D_INFO, "Ftw: start to reclaim work space\n"));
|
||||
DEBUG ((DEBUG_INFO, "Ftw: start to reclaim work space\n"));
|
||||
|
||||
WorkSpaceLbaOffset = FtwDevice->FtwWorkSpaceLba - FtwDevice->FtwWorkBlockLba;
|
||||
|
||||
@@ -601,7 +601,7 @@ FtwReclaimWorkSpace (
|
||||
|
||||
FreePool (SpareBuffer);
|
||||
|
||||
DEBUG ((EFI_D_INFO, "Ftw: reclaim work space successfully\n"));
|
||||
DEBUG ((DEBUG_INFO, "Ftw: reclaim work space successfully\n"));
|
||||
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
@@ -152,12 +152,12 @@ IsValidWorkSpace (
|
||||
}
|
||||
|
||||
if ((WorkingHeader->WorkingBlockValid != FTW_VALID_STATE) || (WorkingHeader->WorkingBlockInvalid == FTW_VALID_STATE)) {
|
||||
DEBUG ((EFI_D_ERROR, "FtwPei: Work block header valid bit check error\n"));
|
||||
DEBUG ((DEBUG_ERROR, "FtwPei: Work block header valid bit check error\n"));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (WorkingHeader->WriteQueueSize != (WorkingLength - sizeof (EFI_FAULT_TOLERANT_WORKING_BLOCK_HEADER))) {
|
||||
DEBUG ((EFI_D_ERROR, "FtwPei: Work block header WriteQueueSize check error\n"));
|
||||
DEBUG ((DEBUG_ERROR, "FtwPei: Work block header WriteQueueSize check error\n"));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -165,7 +165,7 @@ IsValidWorkSpace (
|
||||
// Check signature with gEdkiiWorkingBlockSignatureGuid
|
||||
//
|
||||
if (!CompareGuid (&gEdkiiWorkingBlockSignatureGuid, &WorkingHeader->Signature)) {
|
||||
DEBUG ((EFI_D_ERROR, "FtwPei: Work block header signature check error, it should be gEdkiiWorkingBlockSignatureGuid\n"));
|
||||
DEBUG ((DEBUG_ERROR, "FtwPei: Work block header signature check error, it should be gEdkiiWorkingBlockSignatureGuid\n"));
|
||||
//
|
||||
// To be compatible with old signature gEfiSystemNvDataFvGuid.
|
||||
//
|
||||
@@ -174,7 +174,7 @@ IsValidWorkSpace (
|
||||
} else {
|
||||
Data = *(UINT8 *) (WorkingHeader + 1);
|
||||
if (Data != 0xff) {
|
||||
DEBUG ((EFI_D_ERROR, "FtwPei: Old format FTW structure can't be handled\n"));
|
||||
DEBUG ((DEBUG_ERROR, "FtwPei: Old format FTW structure can't be handled\n"));
|
||||
ASSERT (FALSE);
|
||||
return FALSE;
|
||||
}
|
||||
@@ -261,7 +261,7 @@ PeimFaultTolerantWriteInitialize (
|
||||
FtwLastWrite.SpareAddress = SpareAreaAddress;
|
||||
FtwLastWrite.Length = SpareAreaLength;
|
||||
DEBUG ((
|
||||
EFI_D_INFO,
|
||||
DEBUG_INFO,
|
||||
"FtwPei last write data: TargetAddress - 0x%x SpareAddress - 0x%x Length - 0x%x\n",
|
||||
(UINTN) FtwLastWrite.TargetAddress,
|
||||
(UINTN) FtwLastWrite.SpareAddress,
|
||||
@@ -280,7 +280,7 @@ PeimFaultTolerantWriteInitialize (
|
||||
//
|
||||
// Found the workspace.
|
||||
//
|
||||
DEBUG ((EFI_D_INFO, "FtwPei: workspace in spare block is at 0x%x.\n", (UINTN) WorkSpaceInSpareArea));
|
||||
DEBUG ((DEBUG_INFO, "FtwPei: workspace in spare block is at 0x%x.\n", (UINTN) WorkSpaceInSpareArea));
|
||||
FtwWorkingBlockHeader = (EFI_FAULT_TOLERANT_WORKING_BLOCK_HEADER *) (UINTN) WorkSpaceInSpareArea;
|
||||
break;
|
||||
}
|
||||
@@ -294,7 +294,7 @@ PeimFaultTolerantWriteInitialize (
|
||||
FtwLastWrite.SpareAddress = SpareAreaAddress;
|
||||
FtwLastWrite.Length = SpareAreaLength;
|
||||
DEBUG ((
|
||||
EFI_D_INFO,
|
||||
DEBUG_INFO,
|
||||
"FtwPei last write data: TargetAddress - 0x%x SpareAddress - 0x%x Length - 0x%x\n",
|
||||
(UINTN) FtwLastWrite.TargetAddress,
|
||||
(UINTN) FtwLastWrite.SpareAddress,
|
||||
@@ -304,7 +304,7 @@ PeimFaultTolerantWriteInitialize (
|
||||
//
|
||||
// Both are invalid.
|
||||
//
|
||||
DEBUG ((EFI_D_ERROR, "FtwPei: Both working and spare block are invalid.\n"));
|
||||
DEBUG ((DEBUG_ERROR, "FtwPei: Both working and spare block are invalid.\n"));
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -2046,7 +2046,7 @@ ExtractConfigRequest (
|
||||
// Header->VarStoreId == 0 means no storage for this question.
|
||||
//
|
||||
ASSERT (Header->VarStoreId != 0);
|
||||
DEBUG ((EFI_D_INFO, "Varstore Id: 0x%x\n", Header->VarStoreId));
|
||||
DEBUG ((DEBUG_INFO, "Varstore Id: 0x%x\n", Header->VarStoreId));
|
||||
|
||||
Storage = FindStorageFromVarId (FormPackage, Header->VarStoreId);
|
||||
ASSERT (Storage != NULL);
|
||||
@@ -2149,7 +2149,7 @@ ExtractConfigResp (
|
||||
// Header->VarStoreId == 0 means no storage for this question.
|
||||
//
|
||||
ASSERT (Header->VarStoreId != 0);
|
||||
DEBUG ((EFI_D_INFO, "Varstore Id: 0x%x\n", Header->VarStoreId));
|
||||
DEBUG ((DEBUG_INFO, "Varstore Id: 0x%x\n", Header->VarStoreId));
|
||||
|
||||
Storage = FindStorageFromVarId (FormPackage, Header->VarStoreId);
|
||||
ASSERT (Storage != NULL);
|
||||
|
@@ -54,7 +54,7 @@ SmmLockBoxSave (
|
||||
// Sanity check
|
||||
//
|
||||
if (mLocked) {
|
||||
DEBUG ((EFI_D_ERROR, "SmmLockBox Locked!\n"));
|
||||
DEBUG ((DEBUG_ERROR, "SmmLockBox Locked!\n"));
|
||||
LockBoxParameterSave->Header.ReturnStatus = (UINT64)EFI_ACCESS_DENIED;
|
||||
return ;
|
||||
}
|
||||
@@ -65,7 +65,7 @@ SmmLockBoxSave (
|
||||
// Sanity check
|
||||
//
|
||||
if (!SmmIsBufferOutsideSmmValid ((UINTN)TempLockBoxParameterSave.Buffer, (UINTN)TempLockBoxParameterSave.Length)) {
|
||||
DEBUG ((EFI_D_ERROR, "SmmLockBox Save address in SMRAM or buffer overflow!\n"));
|
||||
DEBUG ((DEBUG_ERROR, "SmmLockBox Save address in SMRAM or buffer overflow!\n"));
|
||||
LockBoxParameterSave->Header.ReturnStatus = (UINT64)EFI_ACCESS_DENIED;
|
||||
return ;
|
||||
}
|
||||
@@ -104,7 +104,7 @@ SmmLockBoxSetAttributes (
|
||||
// Sanity check
|
||||
//
|
||||
if (mLocked) {
|
||||
DEBUG ((EFI_D_ERROR, "SmmLockBox Locked!\n"));
|
||||
DEBUG ((DEBUG_ERROR, "SmmLockBox Locked!\n"));
|
||||
LockBoxParameterSetAttributes->Header.ReturnStatus = (UINT64)EFI_ACCESS_DENIED;
|
||||
return ;
|
||||
}
|
||||
@@ -143,7 +143,7 @@ SmmLockBoxUpdate (
|
||||
// Sanity check
|
||||
//
|
||||
if (mLocked) {
|
||||
DEBUG ((EFI_D_ERROR, "SmmLockBox Locked!\n"));
|
||||
DEBUG ((DEBUG_ERROR, "SmmLockBox Locked!\n"));
|
||||
LockBoxParameterUpdate->Header.ReturnStatus = (UINT64)EFI_ACCESS_DENIED;
|
||||
return ;
|
||||
}
|
||||
@@ -154,7 +154,7 @@ SmmLockBoxUpdate (
|
||||
// Sanity check
|
||||
//
|
||||
if (!SmmIsBufferOutsideSmmValid ((UINTN)TempLockBoxParameterUpdate.Buffer, (UINTN)TempLockBoxParameterUpdate.Length)) {
|
||||
DEBUG ((EFI_D_ERROR, "SmmLockBox Update address in SMRAM or buffer overflow!\n"));
|
||||
DEBUG ((DEBUG_ERROR, "SmmLockBox Update address in SMRAM or buffer overflow!\n"));
|
||||
LockBoxParameterUpdate->Header.ReturnStatus = (UINT64)EFI_ACCESS_DENIED;
|
||||
return ;
|
||||
}
|
||||
@@ -200,7 +200,7 @@ SmmLockBoxRestore (
|
||||
// Sanity check
|
||||
//
|
||||
if (!SmmIsBufferOutsideSmmValid ((UINTN)TempLockBoxParameterRestore.Buffer, (UINTN)TempLockBoxParameterRestore.Length)) {
|
||||
DEBUG ((EFI_D_ERROR, "SmmLockBox Restore address in SMRAM or buffer overflow!\n"));
|
||||
DEBUG ((DEBUG_ERROR, "SmmLockBox Restore address in SMRAM or buffer overflow!\n"));
|
||||
LockBoxParameterRestore->Header.ReturnStatus = (UINT64)EFI_ACCESS_DENIED;
|
||||
return ;
|
||||
}
|
||||
@@ -291,11 +291,11 @@ SmmLockBoxHandler (
|
||||
// Sanity check
|
||||
//
|
||||
if (TempCommBufferSize < sizeof(EFI_SMM_LOCK_BOX_PARAMETER_HEADER)) {
|
||||
DEBUG ((EFI_D_ERROR, "SmmLockBox Command Buffer Size invalid!\n"));
|
||||
DEBUG ((DEBUG_ERROR, "SmmLockBox Command Buffer Size invalid!\n"));
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
if (!SmmIsBufferOutsideSmmValid ((UINTN)CommBuffer, TempCommBufferSize)) {
|
||||
DEBUG ((EFI_D_ERROR, "SmmLockBox Command Buffer in SMRAM or overflow!\n"));
|
||||
DEBUG ((DEBUG_ERROR, "SmmLockBox Command Buffer in SMRAM or overflow!\n"));
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
@@ -310,41 +310,41 @@ SmmLockBoxHandler (
|
||||
switch (LockBoxParameterHeader->Command) {
|
||||
case EFI_SMM_LOCK_BOX_COMMAND_SAVE:
|
||||
if (TempCommBufferSize < sizeof(EFI_SMM_LOCK_BOX_PARAMETER_SAVE)) {
|
||||
DEBUG ((EFI_D_ERROR, "SmmLockBox Command Buffer Size for SAVE invalid!\n"));
|
||||
DEBUG ((DEBUG_ERROR, "SmmLockBox Command Buffer Size for SAVE invalid!\n"));
|
||||
break;
|
||||
}
|
||||
SmmLockBoxSave ((EFI_SMM_LOCK_BOX_PARAMETER_SAVE *)(UINTN)LockBoxParameterHeader);
|
||||
break;
|
||||
case EFI_SMM_LOCK_BOX_COMMAND_UPDATE:
|
||||
if (TempCommBufferSize < sizeof(EFI_SMM_LOCK_BOX_PARAMETER_UPDATE)) {
|
||||
DEBUG ((EFI_D_ERROR, "SmmLockBox Command Buffer Size for UPDATE invalid!\n"));
|
||||
DEBUG ((DEBUG_ERROR, "SmmLockBox Command Buffer Size for UPDATE invalid!\n"));
|
||||
break;
|
||||
}
|
||||
SmmLockBoxUpdate ((EFI_SMM_LOCK_BOX_PARAMETER_UPDATE *)(UINTN)LockBoxParameterHeader);
|
||||
break;
|
||||
case EFI_SMM_LOCK_BOX_COMMAND_RESTORE:
|
||||
if (TempCommBufferSize < sizeof(EFI_SMM_LOCK_BOX_PARAMETER_RESTORE)) {
|
||||
DEBUG ((EFI_D_ERROR, "SmmLockBox Command Buffer Size for RESTORE invalid!\n"));
|
||||
DEBUG ((DEBUG_ERROR, "SmmLockBox Command Buffer Size for RESTORE invalid!\n"));
|
||||
break;
|
||||
}
|
||||
SmmLockBoxRestore ((EFI_SMM_LOCK_BOX_PARAMETER_RESTORE *)(UINTN)LockBoxParameterHeader);
|
||||
break;
|
||||
case EFI_SMM_LOCK_BOX_COMMAND_SET_ATTRIBUTES:
|
||||
if (TempCommBufferSize < sizeof(EFI_SMM_LOCK_BOX_PARAMETER_SET_ATTRIBUTES)) {
|
||||
DEBUG ((EFI_D_ERROR, "SmmLockBox Command Buffer Size for SET_ATTRIBUTES invalid!\n"));
|
||||
DEBUG ((DEBUG_ERROR, "SmmLockBox Command Buffer Size for SET_ATTRIBUTES invalid!\n"));
|
||||
break;
|
||||
}
|
||||
SmmLockBoxSetAttributes ((EFI_SMM_LOCK_BOX_PARAMETER_SET_ATTRIBUTES *)(UINTN)LockBoxParameterHeader);
|
||||
break;
|
||||
case EFI_SMM_LOCK_BOX_COMMAND_RESTORE_ALL_IN_PLACE:
|
||||
if (TempCommBufferSize < sizeof(EFI_SMM_LOCK_BOX_PARAMETER_RESTORE_ALL_IN_PLACE)) {
|
||||
DEBUG ((EFI_D_ERROR, "SmmLockBox Command Buffer Size for RESTORE_ALL_IN_PLACE invalid!\n"));
|
||||
DEBUG ((DEBUG_ERROR, "SmmLockBox Command Buffer Size for RESTORE_ALL_IN_PLACE invalid!\n"));
|
||||
break;
|
||||
}
|
||||
SmmLockBoxRestoreAllInPlace ((EFI_SMM_LOCK_BOX_PARAMETER_RESTORE_ALL_IN_PLACE *)(UINTN)LockBoxParameterHeader);
|
||||
break;
|
||||
default:
|
||||
DEBUG ((EFI_D_ERROR, "SmmLockBox Command invalid!\n"));
|
||||
DEBUG ((DEBUG_ERROR, "SmmLockBox Command invalid!\n"));
|
||||
break;
|
||||
}
|
||||
|
||||
|
@@ -426,10 +426,10 @@ SmbiosAdd (
|
||||
//
|
||||
if ((EntryPointStructure != NULL) &&
|
||||
(EntryPointStructure->TableLength + StructureSize > SMBIOS_TABLE_MAX_LENGTH)) {
|
||||
DEBUG ((EFI_D_INFO, "SmbiosAdd: Total length exceeds max 32-bit table length with type = %d size = 0x%x\n", Record->Type, StructureSize));
|
||||
DEBUG ((DEBUG_INFO, "SmbiosAdd: Total length exceeds max 32-bit table length with type = %d size = 0x%x\n", Record->Type, StructureSize));
|
||||
} else {
|
||||
Smbios32BitTable = TRUE;
|
||||
DEBUG ((EFI_D_INFO, "SmbiosAdd: Smbios type %d with size 0x%x is added to 32-bit table\n", Record->Type, StructureSize));
|
||||
DEBUG ((DEBUG_INFO, "SmbiosAdd: Smbios type %d with size 0x%x is added to 32-bit table\n", Record->Type, StructureSize));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -443,9 +443,9 @@ SmbiosAdd (
|
||||
//
|
||||
if ((Smbios30EntryPointStructure != NULL) &&
|
||||
(Smbios30EntryPointStructure->TableMaximumSize + StructureSize > SMBIOS_3_0_TABLE_MAX_LENGTH)) {
|
||||
DEBUG ((EFI_D_INFO, "SmbiosAdd: Total length exceeds max 64-bit table length with type = %d size = 0x%x\n", Record->Type, StructureSize));
|
||||
DEBUG ((DEBUG_INFO, "SmbiosAdd: Total length exceeds max 64-bit table length with type = %d size = 0x%x\n", Record->Type, StructureSize));
|
||||
} else {
|
||||
DEBUG ((EFI_D_INFO, "SmbiosAdd: Smbios type %d with size 0x%x is added to 64-bit table\n", Record->Type, StructureSize));
|
||||
DEBUG ((DEBUG_INFO, "SmbiosAdd: Smbios type %d with size 0x%x is added to 64-bit table\n", Record->Type, StructureSize));
|
||||
Smbios64BitTable = TRUE;
|
||||
}
|
||||
}
|
||||
@@ -691,9 +691,9 @@ SmbiosUpdateString (
|
||||
// in the Structure Table Length field of the SMBIOS Structure Table Entry Point,
|
||||
// which is a WORD field limited to 65,535 bytes.
|
||||
//
|
||||
DEBUG ((EFI_D_INFO, "SmbiosUpdateString: Total length exceeds max 32-bit table length\n"));
|
||||
DEBUG ((DEBUG_INFO, "SmbiosUpdateString: Total length exceeds max 32-bit table length\n"));
|
||||
} else {
|
||||
DEBUG ((EFI_D_INFO, "SmbiosUpdateString: New smbios record add to 32-bit table\n"));
|
||||
DEBUG ((DEBUG_INFO, "SmbiosUpdateString: New smbios record add to 32-bit table\n"));
|
||||
SmbiosEntry->Smbios32BitTable = TRUE;
|
||||
}
|
||||
}
|
||||
@@ -704,9 +704,9 @@ SmbiosUpdateString (
|
||||
//
|
||||
if ((Smbios30EntryPointStructure != NULL) &&
|
||||
(Smbios30EntryPointStructure->TableMaximumSize + InputStrLen - TargetStrLen > SMBIOS_3_0_TABLE_MAX_LENGTH)) {
|
||||
DEBUG ((EFI_D_INFO, "SmbiosUpdateString: Total length exceeds max 64-bit table length\n"));
|
||||
DEBUG ((DEBUG_INFO, "SmbiosUpdateString: Total length exceeds max 64-bit table length\n"));
|
||||
} else {
|
||||
DEBUG ((EFI_D_INFO, "SmbiosUpdateString: New smbios record add to 64-bit table\n"));
|
||||
DEBUG ((DEBUG_INFO, "SmbiosUpdateString: New smbios record add to 64-bit table\n"));
|
||||
SmbiosEntry->Smbios64BitTable = TRUE;
|
||||
}
|
||||
}
|
||||
@@ -852,10 +852,10 @@ SmbiosRemove (
|
||||
// configuration table without depending on PI SMBIOS protocol.
|
||||
//
|
||||
if (SmbiosEntry->Smbios32BitTable) {
|
||||
DEBUG ((EFI_D_INFO, "SmbiosRemove: remove from 32-bit table\n"));
|
||||
DEBUG ((DEBUG_INFO, "SmbiosRemove: remove from 32-bit table\n"));
|
||||
}
|
||||
if (SmbiosEntry->Smbios64BitTable) {
|
||||
DEBUG ((EFI_D_INFO, "SmbiosRemove: remove from 64-bit table\n"));
|
||||
DEBUG ((DEBUG_INFO, "SmbiosRemove: remove from 64-bit table\n"));
|
||||
}
|
||||
//
|
||||
// Update the whole SMBIOS table again based on which table the removed SMBIOS record is in.
|
||||
@@ -1058,7 +1058,7 @@ SmbiosCreateTable (
|
||||
// It should be done only once.
|
||||
// Allocate memory (below 4GB).
|
||||
//
|
||||
DEBUG ((EFI_D_INFO, "SmbiosCreateTable: Initialize 32-bit entry point structure\n"));
|
||||
DEBUG ((DEBUG_INFO, "SmbiosCreateTable: Initialize 32-bit entry point structure\n"));
|
||||
EntryPointStructureData.MajorVersion = mPrivateData.Smbios.MajorVersion;
|
||||
EntryPointStructureData.MinorVersion = mPrivateData.Smbios.MinorVersion;
|
||||
EntryPointStructureData.SmbiosBcdRevision = (UINT8) ((PcdGet16 (PcdSmbiosVersion) >> 4) & 0xf0) | (UINT8) (PcdGet16 (PcdSmbiosVersion) & 0x0f);
|
||||
@@ -1070,7 +1070,7 @@ SmbiosCreateTable (
|
||||
&PhysicalAddress
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
DEBUG ((EFI_D_ERROR, "SmbiosCreateTable () could not allocate EntryPointStructure < 4GB\n"));
|
||||
DEBUG ((DEBUG_ERROR, "SmbiosCreateTable () could not allocate EntryPointStructure < 4GB\n"));
|
||||
Status = gBS->AllocatePages (
|
||||
AllocateAnyPages,
|
||||
EfiRuntimeServicesData,
|
||||
@@ -1143,7 +1143,7 @@ SmbiosCreateTable (
|
||||
// If new SMBIOS table size exceeds the previous allocated page,
|
||||
// it is time to re-allocate memory (below 4GB).
|
||||
//
|
||||
DEBUG ((EFI_D_INFO, "%a() re-allocate SMBIOS 32-bit table\n",
|
||||
DEBUG ((DEBUG_INFO, "%a() re-allocate SMBIOS 32-bit table\n",
|
||||
__FUNCTION__));
|
||||
if (EntryPointStructure->TableAddress != 0) {
|
||||
//
|
||||
@@ -1165,7 +1165,7 @@ SmbiosCreateTable (
|
||||
&PhysicalAddress
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
DEBUG ((EFI_D_ERROR, "SmbiosCreateTable() could not allocate SMBIOS table < 4GB\n"));
|
||||
DEBUG ((DEBUG_ERROR, "SmbiosCreateTable() could not allocate SMBIOS table < 4GB\n"));
|
||||
EntryPointStructure->TableAddress = 0;
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
} else {
|
||||
@@ -1250,7 +1250,7 @@ SmbiosCreate64BitTable (
|
||||
// It should be done only once.
|
||||
// Allocate memory at any address.
|
||||
//
|
||||
DEBUG ((EFI_D_INFO, "SmbiosCreateTable: Initialize 64-bit entry point structure\n"));
|
||||
DEBUG ((DEBUG_INFO, "SmbiosCreateTable: Initialize 64-bit entry point structure\n"));
|
||||
Smbios30EntryPointStructureData.MajorVersion = mPrivateData.Smbios.MajorVersion;
|
||||
Smbios30EntryPointStructureData.MinorVersion = mPrivateData.Smbios.MinorVersion;
|
||||
Smbios30EntryPointStructureData.DocRev = PcdGet8 (PcdSmbiosDocRev);
|
||||
@@ -1261,7 +1261,7 @@ SmbiosCreate64BitTable (
|
||||
&PhysicalAddress
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
DEBUG ((EFI_D_ERROR, "SmbiosCreate64BitTable() could not allocate Smbios30EntryPointStructure\n"));
|
||||
DEBUG ((DEBUG_ERROR, "SmbiosCreate64BitTable() could not allocate Smbios30EntryPointStructure\n"));
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
|
||||
@@ -1312,7 +1312,7 @@ SmbiosCreate64BitTable (
|
||||
// If new SMBIOS table size exceeds the previous allocated page,
|
||||
// it is time to re-allocate memory at anywhere.
|
||||
//
|
||||
DEBUG ((EFI_D_INFO, "%a() re-allocate SMBIOS 64-bit table\n",
|
||||
DEBUG ((DEBUG_INFO, "%a() re-allocate SMBIOS 64-bit table\n",
|
||||
__FUNCTION__));
|
||||
if (Smbios30EntryPointStructure->TableAddress != 0) {
|
||||
//
|
||||
@@ -1333,7 +1333,7 @@ SmbiosCreate64BitTable (
|
||||
&PhysicalAddress
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
DEBUG ((EFI_D_ERROR, "SmbiosCreateTable() could not allocate SMBIOS 64-bit table\n"));
|
||||
DEBUG ((DEBUG_ERROR, "SmbiosCreateTable() could not allocate SMBIOS 64-bit table\n"));
|
||||
Smbios30EntryPointStructure->TableAddress = 0;
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
} else {
|
||||
|
@@ -137,7 +137,7 @@ InternalDumpData (
|
||||
{
|
||||
UINTN Index;
|
||||
for (Index = 0; Index < Size; Index++) {
|
||||
DEBUG ((EFI_D_VERBOSE, "%02x", (UINTN)Data[Index]));
|
||||
DEBUG ((DEBUG_VERBOSE, "%02x", (UINTN)Data[Index]));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -164,15 +164,15 @@ InternalDumpHex (
|
||||
Count = Size / COLUME_SIZE;
|
||||
Left = Size % COLUME_SIZE;
|
||||
for (Index = 0; Index < Count; Index++) {
|
||||
DEBUG ((EFI_D_VERBOSE, "%04x: ", Index * COLUME_SIZE));
|
||||
DEBUG ((DEBUG_VERBOSE, "%04x: ", Index * COLUME_SIZE));
|
||||
InternalDumpData (Data + Index * COLUME_SIZE, COLUME_SIZE);
|
||||
DEBUG ((EFI_D_VERBOSE, "\n"));
|
||||
DEBUG ((DEBUG_VERBOSE, "\n"));
|
||||
}
|
||||
|
||||
if (Left != 0) {
|
||||
DEBUG ((EFI_D_VERBOSE, "%04x: ", Index * COLUME_SIZE));
|
||||
DEBUG ((DEBUG_VERBOSE, "%04x: ", Index * COLUME_SIZE));
|
||||
InternalDumpData (Data + Index * COLUME_SIZE, Left);
|
||||
DEBUG ((EFI_D_VERBOSE, "\n"));
|
||||
DEBUG ((DEBUG_VERBOSE, "\n"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -282,7 +282,7 @@ FilterSmbiosEntry (
|
||||
CHAR8 *String;
|
||||
UINTN StringLen;
|
||||
|
||||
DEBUG ((EFI_D_INFO, "Smbios Table (Type - %d):\n", ((SMBIOS_STRUCTURE *)TableEntry)->Type));
|
||||
DEBUG ((DEBUG_INFO, "Smbios Table (Type - %d):\n", ((SMBIOS_STRUCTURE *)TableEntry)->Type));
|
||||
DEBUG_CODE (InternalDumpHex (TableEntry, TableEntrySize););
|
||||
|
||||
//
|
||||
@@ -310,7 +310,7 @@ FilterSmbiosEntry (
|
||||
// set ' ' for string field
|
||||
String = GetSmbiosStringById (TableEntry, StringId, &StringLen);
|
||||
ASSERT (String != NULL);
|
||||
//DEBUG ((EFI_D_INFO,"StrId(0x%x)-%a(%d)\n", StringId, String, StringLen));
|
||||
//DEBUG ((DEBUG_INFO,"StrId(0x%x)-%a(%d)\n", StringId, String, StringLen));
|
||||
SetMem (String, StringLen, ' ');
|
||||
}
|
||||
}
|
||||
@@ -322,7 +322,7 @@ FilterSmbiosEntry (
|
||||
}
|
||||
}
|
||||
|
||||
DEBUG ((EFI_D_INFO, "Filter Smbios Table (Type - %d):\n", ((SMBIOS_STRUCTURE *)TableEntry)->Type));
|
||||
DEBUG ((DEBUG_INFO, "Filter Smbios Table (Type - %d):\n", ((SMBIOS_STRUCTURE *)TableEntry)->Type));
|
||||
DEBUG_CODE (InternalDumpHex (TableEntry, TableEntrySize););
|
||||
}
|
||||
|
||||
@@ -494,22 +494,22 @@ MeasureSmbiosTable (
|
||||
(VOID **) &Smbios3Table
|
||||
);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
DEBUG ((EFI_D_INFO, "Smbios3Table:\n"));
|
||||
DEBUG ((EFI_D_INFO, " AnchorString - '%c%c%c%c%c'\n",
|
||||
DEBUG ((DEBUG_INFO, "Smbios3Table:\n"));
|
||||
DEBUG ((DEBUG_INFO, " AnchorString - '%c%c%c%c%c'\n",
|
||||
Smbios3Table->AnchorString[0],
|
||||
Smbios3Table->AnchorString[1],
|
||||
Smbios3Table->AnchorString[2],
|
||||
Smbios3Table->AnchorString[3],
|
||||
Smbios3Table->AnchorString[4]
|
||||
));
|
||||
DEBUG ((EFI_D_INFO, " EntryPointStructureChecksum - 0x%02x\n", Smbios3Table->EntryPointStructureChecksum));
|
||||
DEBUG ((EFI_D_INFO, " EntryPointLength - 0x%02x\n", Smbios3Table->EntryPointLength));
|
||||
DEBUG ((EFI_D_INFO, " MajorVersion - 0x%02x\n", Smbios3Table->MajorVersion));
|
||||
DEBUG ((EFI_D_INFO, " MinorVersion - 0x%02x\n", Smbios3Table->MinorVersion));
|
||||
DEBUG ((EFI_D_INFO, " DocRev - 0x%02x\n", Smbios3Table->DocRev));
|
||||
DEBUG ((EFI_D_INFO, " EntryPointRevision - 0x%02x\n", Smbios3Table->EntryPointRevision));
|
||||
DEBUG ((EFI_D_INFO, " TableMaximumSize - 0x%08x\n", Smbios3Table->TableMaximumSize));
|
||||
DEBUG ((EFI_D_INFO, " TableAddress - 0x%016lx\n", Smbios3Table->TableAddress));
|
||||
DEBUG ((DEBUG_INFO, " EntryPointStructureChecksum - 0x%02x\n", Smbios3Table->EntryPointStructureChecksum));
|
||||
DEBUG ((DEBUG_INFO, " EntryPointLength - 0x%02x\n", Smbios3Table->EntryPointLength));
|
||||
DEBUG ((DEBUG_INFO, " MajorVersion - 0x%02x\n", Smbios3Table->MajorVersion));
|
||||
DEBUG ((DEBUG_INFO, " MinorVersion - 0x%02x\n", Smbios3Table->MinorVersion));
|
||||
DEBUG ((DEBUG_INFO, " DocRev - 0x%02x\n", Smbios3Table->DocRev));
|
||||
DEBUG ((DEBUG_INFO, " EntryPointRevision - 0x%02x\n", Smbios3Table->EntryPointRevision));
|
||||
DEBUG ((DEBUG_INFO, " TableMaximumSize - 0x%08x\n", Smbios3Table->TableMaximumSize));
|
||||
DEBUG ((DEBUG_INFO, " TableAddress - 0x%016lx\n", Smbios3Table->TableAddress));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -519,38 +519,38 @@ MeasureSmbiosTable (
|
||||
(VOID **) &SmbiosTable
|
||||
);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
DEBUG ((EFI_D_INFO, "SmbiosTable:\n"));
|
||||
DEBUG ((EFI_D_INFO, " AnchorString - '%c%c%c%c'\n",
|
||||
DEBUG ((DEBUG_INFO, "SmbiosTable:\n"));
|
||||
DEBUG ((DEBUG_INFO, " AnchorString - '%c%c%c%c'\n",
|
||||
SmbiosTable->AnchorString[0],
|
||||
SmbiosTable->AnchorString[1],
|
||||
SmbiosTable->AnchorString[2],
|
||||
SmbiosTable->AnchorString[3]
|
||||
));
|
||||
DEBUG ((EFI_D_INFO, " EntryPointStructureChecksum - 0x%02x\n", SmbiosTable->EntryPointStructureChecksum));
|
||||
DEBUG ((EFI_D_INFO, " EntryPointLength - 0x%02x\n", SmbiosTable->EntryPointLength));
|
||||
DEBUG ((EFI_D_INFO, " MajorVersion - 0x%02x\n", SmbiosTable->MajorVersion));
|
||||
DEBUG ((EFI_D_INFO, " MinorVersion - 0x%02x\n", SmbiosTable->MinorVersion));
|
||||
DEBUG ((EFI_D_INFO, " MaxStructureSize - 0x%08x\n", SmbiosTable->MaxStructureSize));
|
||||
DEBUG ((EFI_D_INFO, " EntryPointRevision - 0x%02x\n", SmbiosTable->EntryPointRevision));
|
||||
DEBUG ((EFI_D_INFO, " FormattedArea - '%c%c%c%c%c'\n",
|
||||
DEBUG ((DEBUG_INFO, " EntryPointStructureChecksum - 0x%02x\n", SmbiosTable->EntryPointStructureChecksum));
|
||||
DEBUG ((DEBUG_INFO, " EntryPointLength - 0x%02x\n", SmbiosTable->EntryPointLength));
|
||||
DEBUG ((DEBUG_INFO, " MajorVersion - 0x%02x\n", SmbiosTable->MajorVersion));
|
||||
DEBUG ((DEBUG_INFO, " MinorVersion - 0x%02x\n", SmbiosTable->MinorVersion));
|
||||
DEBUG ((DEBUG_INFO, " MaxStructureSize - 0x%08x\n", SmbiosTable->MaxStructureSize));
|
||||
DEBUG ((DEBUG_INFO, " EntryPointRevision - 0x%02x\n", SmbiosTable->EntryPointRevision));
|
||||
DEBUG ((DEBUG_INFO, " FormattedArea - '%c%c%c%c%c'\n",
|
||||
SmbiosTable->FormattedArea[0],
|
||||
SmbiosTable->FormattedArea[1],
|
||||
SmbiosTable->FormattedArea[2],
|
||||
SmbiosTable->FormattedArea[3],
|
||||
SmbiosTable->FormattedArea[4]
|
||||
));
|
||||
DEBUG ((EFI_D_INFO, " IntermediateAnchorString - '%c%c%c%c%c'\n",
|
||||
DEBUG ((DEBUG_INFO, " IntermediateAnchorString - '%c%c%c%c%c'\n",
|
||||
SmbiosTable->IntermediateAnchorString[0],
|
||||
SmbiosTable->IntermediateAnchorString[1],
|
||||
SmbiosTable->IntermediateAnchorString[2],
|
||||
SmbiosTable->IntermediateAnchorString[3],
|
||||
SmbiosTable->IntermediateAnchorString[4]
|
||||
));
|
||||
DEBUG ((EFI_D_INFO, " IntermediateChecksum - 0x%02x\n", SmbiosTable->IntermediateChecksum));
|
||||
DEBUG ((EFI_D_INFO, " TableLength - 0x%04x\n", SmbiosTable->TableLength));
|
||||
DEBUG ((EFI_D_INFO, " TableAddress - 0x%08x\n", SmbiosTable->TableAddress));
|
||||
DEBUG ((EFI_D_INFO, " NumberOfSmbiosStructures - 0x%04x\n", SmbiosTable->NumberOfSmbiosStructures));
|
||||
DEBUG ((EFI_D_INFO, " SmbiosBcdRevision - 0x%02x\n", SmbiosTable->SmbiosBcdRevision));
|
||||
DEBUG ((DEBUG_INFO, " IntermediateChecksum - 0x%02x\n", SmbiosTable->IntermediateChecksum));
|
||||
DEBUG ((DEBUG_INFO, " TableLength - 0x%04x\n", SmbiosTable->TableLength));
|
||||
DEBUG ((DEBUG_INFO, " TableAddress - 0x%08x\n", SmbiosTable->TableAddress));
|
||||
DEBUG ((DEBUG_INFO, " NumberOfSmbiosStructures - 0x%04x\n", SmbiosTable->NumberOfSmbiosStructures));
|
||||
DEBUG ((DEBUG_INFO, " SmbiosBcdRevision - 0x%02x\n", SmbiosTable->SmbiosBcdRevision));
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -71,16 +71,16 @@ SmmCommunicationBufferEntryPoint (
|
||||
Entry->NumberOfPages = DEFAULT_COMMON_PI_SMM_COMMUNIATION_REGION_PAGES;
|
||||
Entry->Attribute = 0;
|
||||
|
||||
DEBUG ((EFI_D_INFO, "PiSmmCommunicationRegionTable:(0x%x)\n", PiSmmCommunicationRegionTable));
|
||||
DEBUG ((EFI_D_INFO, " Version - 0x%x\n", PiSmmCommunicationRegionTable->Version));
|
||||
DEBUG ((EFI_D_INFO, " NumberOfEntries - 0x%x\n", PiSmmCommunicationRegionTable->NumberOfEntries));
|
||||
DEBUG ((EFI_D_INFO, " DescriptorSize - 0x%x\n", PiSmmCommunicationRegionTable->DescriptorSize));
|
||||
DEBUG ((EFI_D_INFO, "Entry:(0x%x)\n", Entry));
|
||||
DEBUG ((EFI_D_INFO, " Type - 0x%x\n", Entry->Type));
|
||||
DEBUG ((EFI_D_INFO, " PhysicalStart - 0x%lx\n", Entry->PhysicalStart));
|
||||
DEBUG ((EFI_D_INFO, " VirtualStart - 0x%lx\n", Entry->VirtualStart));
|
||||
DEBUG ((EFI_D_INFO, " NumberOfPages - 0x%lx\n", Entry->NumberOfPages));
|
||||
DEBUG ((EFI_D_INFO, " Attribute - 0x%lx\n", Entry->Attribute));
|
||||
DEBUG ((DEBUG_INFO, "PiSmmCommunicationRegionTable:(0x%x)\n", PiSmmCommunicationRegionTable));
|
||||
DEBUG ((DEBUG_INFO, " Version - 0x%x\n", PiSmmCommunicationRegionTable->Version));
|
||||
DEBUG ((DEBUG_INFO, " NumberOfEntries - 0x%x\n", PiSmmCommunicationRegionTable->NumberOfEntries));
|
||||
DEBUG ((DEBUG_INFO, " DescriptorSize - 0x%x\n", PiSmmCommunicationRegionTable->DescriptorSize));
|
||||
DEBUG ((DEBUG_INFO, "Entry:(0x%x)\n", Entry));
|
||||
DEBUG ((DEBUG_INFO, " Type - 0x%x\n", Entry->Type));
|
||||
DEBUG ((DEBUG_INFO, " PhysicalStart - 0x%lx\n", Entry->PhysicalStart));
|
||||
DEBUG ((DEBUG_INFO, " VirtualStart - 0x%lx\n", Entry->VirtualStart));
|
||||
DEBUG ((DEBUG_INFO, " NumberOfPages - 0x%lx\n", Entry->NumberOfPages));
|
||||
DEBUG ((DEBUG_INFO, " Attribute - 0x%lx\n", Entry->Attribute));
|
||||
|
||||
//
|
||||
// Publish this table, so that other driver can use the buffer.
|
||||
|
@@ -142,7 +142,7 @@ TimestampDriverInitialize (
|
||||
mTimestampProperties.EndValue = mTimerLibStartValue - mTimerLibEndValue;
|
||||
}
|
||||
|
||||
DEBUG ((EFI_D_INFO, "TimerFrequency:0x%lx, TimerLibStartTime:0x%lx, TimerLibEndtime:0x%lx\n", mTimestampProperties.Frequency, mTimerLibStartValue, mTimerLibEndValue));
|
||||
DEBUG ((DEBUG_INFO, "TimerFrequency:0x%lx, TimerLibStartTime:0x%lx, TimerLibEndtime:0x%lx\n", mTimestampProperties.Frequency, mTimerLibStartValue, mTimerLibEndValue));
|
||||
|
||||
//
|
||||
// Install the Timestamp Protocol onto a new handle
|
||||
|
@@ -608,14 +608,14 @@ GetVariableStore (
|
||||
// Let FvHeader point to spare block.
|
||||
//
|
||||
FvHeader = (EFI_FIRMWARE_VOLUME_HEADER *) (UINTN) FtwLastWriteData->SpareAddress;
|
||||
DEBUG ((EFI_D_INFO, "PeiVariable: NV storage is backed up in spare block: 0x%x\n", (UINTN) FtwLastWriteData->SpareAddress));
|
||||
DEBUG ((DEBUG_INFO, "PeiVariable: NV storage is backed up in spare block: 0x%x\n", (UINTN) FtwLastWriteData->SpareAddress));
|
||||
} else if ((FtwLastWriteData->TargetAddress > NvStorageBase) && (FtwLastWriteData->TargetAddress < (NvStorageBase + NvStorageSize))) {
|
||||
StoreInfo->FtwLastWriteData = FtwLastWriteData;
|
||||
//
|
||||
// Flash NV storage from the offset is backed up in spare block.
|
||||
//
|
||||
BackUpOffset = (UINT32) (FtwLastWriteData->TargetAddress - NvStorageBase);
|
||||
DEBUG ((EFI_D_INFO, "PeiVariable: High partial NV storage from offset: %x is backed up in spare block: 0x%x\n", BackUpOffset, (UINTN) FtwLastWriteData->SpareAddress));
|
||||
DEBUG ((DEBUG_INFO, "PeiVariable: High partial NV storage from offset: %x is backed up in spare block: 0x%x\n", BackUpOffset, (UINTN) FtwLastWriteData->SpareAddress));
|
||||
//
|
||||
// At least one block data in flash NV storage is still valid, so still leave FvHeader point to NV storage base.
|
||||
//
|
||||
@@ -626,7 +626,7 @@ GetVariableStore (
|
||||
// Check if the Firmware Volume is not corrupted
|
||||
//
|
||||
if ((FvHeader->Signature != EFI_FVH_SIGNATURE) || (!CompareGuid (&gEfiSystemNvDataFvGuid, &FvHeader->FileSystemGuid))) {
|
||||
DEBUG ((EFI_D_ERROR, "Firmware Volume for Variable Store is corrupted\n"));
|
||||
DEBUG ((DEBUG_ERROR, "Firmware Volume for Variable Store is corrupted\n"));
|
||||
break;
|
||||
}
|
||||
|
||||
|
@@ -121,8 +121,8 @@ MeasureVariable (
|
||||
);
|
||||
}
|
||||
|
||||
DEBUG ((EFI_D_INFO, "VariableDxe: MeasureVariable (Pcr - %x, EventType - %x, ", (UINTN)7, (UINTN)EV_EFI_VARIABLE_DRIVER_CONFIG));
|
||||
DEBUG ((EFI_D_INFO, "VariableName - %s, VendorGuid - %g)\n", VarName, VendorGuid));
|
||||
DEBUG ((DEBUG_INFO, "VariableDxe: MeasureVariable (Pcr - %x, EventType - %x, ", (UINTN)7, (UINTN)EV_EFI_VARIABLE_DRIVER_CONFIG));
|
||||
DEBUG ((DEBUG_INFO, "VariableName - %s, VendorGuid - %g)\n", VarName, VendorGuid));
|
||||
|
||||
Status = TpmMeasureAndLogData (
|
||||
7,
|
||||
@@ -257,7 +257,7 @@ SecureBootHook (
|
||||
VariableData,
|
||||
VariableDataSize
|
||||
);
|
||||
DEBUG ((EFI_D_INFO, "MeasureBootPolicyVariable - %r\n", Status));
|
||||
DEBUG ((DEBUG_INFO, "MeasureBootPolicyVariable - %r\n", Status));
|
||||
|
||||
if (VariableData != NULL) {
|
||||
FreePool (VariableData);
|
||||
|
@@ -281,15 +281,15 @@ RecordVarErrorFlag (
|
||||
VAR_ERROR_FLAG TempFlag;
|
||||
|
||||
DEBUG_CODE (
|
||||
DEBUG ((EFI_D_ERROR, "RecordVarErrorFlag (0x%02x) %s:%g - 0x%08x - 0x%x\n", Flag, VariableName, VendorGuid, Attributes, VariableSize));
|
||||
DEBUG ((DEBUG_ERROR, "RecordVarErrorFlag (0x%02x) %s:%g - 0x%08x - 0x%x\n", Flag, VariableName, VendorGuid, Attributes, VariableSize));
|
||||
if (Flag == VAR_ERROR_FLAG_SYSTEM_ERROR) {
|
||||
if (AtRuntime ()) {
|
||||
DEBUG ((EFI_D_ERROR, "CommonRuntimeVariableSpace = 0x%x - CommonVariableTotalSize = 0x%x\n", mVariableModuleGlobal->CommonRuntimeVariableSpace, mVariableModuleGlobal->CommonVariableTotalSize));
|
||||
DEBUG ((DEBUG_ERROR, "CommonRuntimeVariableSpace = 0x%x - CommonVariableTotalSize = 0x%x\n", mVariableModuleGlobal->CommonRuntimeVariableSpace, mVariableModuleGlobal->CommonVariableTotalSize));
|
||||
} else {
|
||||
DEBUG ((EFI_D_ERROR, "CommonVariableSpace = 0x%x - CommonVariableTotalSize = 0x%x\n", mVariableModuleGlobal->CommonVariableSpace, mVariableModuleGlobal->CommonVariableTotalSize));
|
||||
DEBUG ((DEBUG_ERROR, "CommonVariableSpace = 0x%x - CommonVariableTotalSize = 0x%x\n", mVariableModuleGlobal->CommonVariableSpace, mVariableModuleGlobal->CommonVariableTotalSize));
|
||||
}
|
||||
} else {
|
||||
DEBUG ((EFI_D_ERROR, "CommonMaxUserVariableSpace = 0x%x - CommonUserVariableTotalSize = 0x%x\n", mVariableModuleGlobal->CommonMaxUserVariableSpace, mVariableModuleGlobal->CommonUserVariableTotalSize));
|
||||
DEBUG ((DEBUG_ERROR, "CommonMaxUserVariableSpace = 0x%x - CommonUserVariableTotalSize = 0x%x\n", mVariableModuleGlobal->CommonMaxUserVariableSpace, mVariableModuleGlobal->CommonUserVariableTotalSize));
|
||||
}
|
||||
);
|
||||
|
||||
@@ -369,7 +369,7 @@ InitializeVarErrorFlag (
|
||||
}
|
||||
|
||||
Flag = mCurrentBootVarErrFlag;
|
||||
DEBUG ((EFI_D_INFO, "Initialize variable error flag (%02x)\n", Flag));
|
||||
DEBUG ((DEBUG_INFO, "Initialize variable error flag (%02x)\n", Flag));
|
||||
|
||||
Status = FindVariable (
|
||||
VAR_ERROR_FLAG_NAME,
|
||||
@@ -1532,7 +1532,7 @@ AutoUpdateLangVariable (
|
||||
ISO_639_2_ENTRY_SIZE + 1, Attributes, 0, 0, &Variable, NULL);
|
||||
}
|
||||
|
||||
DEBUG ((EFI_D_INFO, "Variable Driver Auto Update PlatformLang, PlatformLang:%a, Lang:%a Status: %r\n", BestPlatformLang, BestLang, Status));
|
||||
DEBUG ((DEBUG_INFO, "Variable Driver Auto Update PlatformLang, PlatformLang:%a, Lang:%a Status: %r\n", BestPlatformLang, BestLang, Status));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1581,7 +1581,7 @@ AutoUpdateLangVariable (
|
||||
AsciiStrSize (BestPlatformLang), Attributes, 0, 0, &Variable, NULL);
|
||||
}
|
||||
|
||||
DEBUG ((EFI_D_INFO, "Variable Driver Auto Update Lang, Lang:%a, PlatformLang:%a Status: %r\n", BestLang, BestPlatformLang, Status));
|
||||
DEBUG ((DEBUG_INFO, "Variable Driver Auto Update Lang, Lang:%a, PlatformLang:%a Status: %r\n", BestLang, BestPlatformLang, Status));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1659,14 +1659,14 @@ UpdateVariable (
|
||||
//
|
||||
// Trying to update NV variable prior to the installation of EFI_VARIABLE_WRITE_ARCH_PROTOCOL
|
||||
//
|
||||
DEBUG ((EFI_D_ERROR, "Update NV variable before EFI_VARIABLE_WRITE_ARCH_PROTOCOL ready - %r\n", EFI_NOT_AVAILABLE_YET));
|
||||
DEBUG ((DEBUG_ERROR, "Update NV variable before EFI_VARIABLE_WRITE_ARCH_PROTOCOL ready - %r\n", EFI_NOT_AVAILABLE_YET));
|
||||
return EFI_NOT_AVAILABLE_YET;
|
||||
} else if ((Attributes & VARIABLE_ATTRIBUTE_AT_AW) != 0) {
|
||||
//
|
||||
// Trying to update volatile authenticated variable prior to the installation of EFI_VARIABLE_WRITE_ARCH_PROTOCOL
|
||||
// The authenticated variable perhaps is not initialized, just return here.
|
||||
//
|
||||
DEBUG ((EFI_D_ERROR, "Update AUTH variable before EFI_VARIABLE_WRITE_ARCH_PROTOCOL ready - %r\n", EFI_NOT_AVAILABLE_YET));
|
||||
DEBUG ((DEBUG_ERROR, "Update AUTH variable before EFI_VARIABLE_WRITE_ARCH_PROTOCOL ready - %r\n", EFI_NOT_AVAILABLE_YET));
|
||||
return EFI_NOT_AVAILABLE_YET;
|
||||
}
|
||||
}
|
||||
@@ -2764,7 +2764,7 @@ VariableServiceSetVariable (
|
||||
// 2. The only attribute differing is EFI_VARIABLE_APPEND_WRITE
|
||||
//
|
||||
Status = EFI_INVALID_PARAMETER;
|
||||
DEBUG ((EFI_D_INFO, "[Variable]: Rewritten a preexisting variable(0x%08x) with different attributes(0x%08x) - %g:%s\n", Variable.CurrPtr->Attributes, Attributes, VendorGuid, VariableName));
|
||||
DEBUG ((DEBUG_INFO, "[Variable]: Rewritten a preexisting variable(0x%08x) with different attributes(0x%08x) - %g:%s\n", Variable.CurrPtr->Attributes, Attributes, VendorGuid, VariableName));
|
||||
goto Done;
|
||||
}
|
||||
}
|
||||
@@ -3264,7 +3264,7 @@ FlushHobVariableToFlash (
|
||||
//
|
||||
// All HOB variables have been flushed in flash.
|
||||
//
|
||||
DEBUG ((EFI_D_INFO, "Variable driver: all HOB variables have been flushed in flash.\n"));
|
||||
DEBUG ((DEBUG_INFO, "Variable driver: all HOB variables have been flushed in flash.\n"));
|
||||
if (mVariableModuleGlobal->VariableGlobal.VariableRuntimeCacheContext.HobFlushComplete != NULL) {
|
||||
*(mVariableModuleGlobal->VariableGlobal.VariableRuntimeCacheContext.HobFlushComplete) = TRUE;
|
||||
}
|
||||
@@ -3333,7 +3333,7 @@ VariableWriteServiceInitialize (
|
||||
GetVariableHeaderSize (mVariableModuleGlobal->VariableGlobal.AuthFormat);
|
||||
Status = AuthVariableLibInitialize (&mAuthContextIn, &mAuthContextOut);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
DEBUG ((EFI_D_INFO, "Variable driver will work with auth variable support!\n"));
|
||||
DEBUG ((DEBUG_INFO, "Variable driver will work with auth variable support!\n"));
|
||||
mVariableModuleGlobal->VariableGlobal.AuthSupport = TRUE;
|
||||
if (mAuthContextOut.AuthVarEntry != NULL) {
|
||||
for (Index = 0; Index < mAuthContextOut.AuthVarEntryCount; Index++) {
|
||||
@@ -3347,8 +3347,8 @@ VariableWriteServiceInitialize (
|
||||
}
|
||||
}
|
||||
} else if (Status == EFI_UNSUPPORTED) {
|
||||
DEBUG ((EFI_D_INFO, "NOTICE - AuthVariableLibInitialize() returns %r!\n", Status));
|
||||
DEBUG ((EFI_D_INFO, "Variable driver will continue to work without auth variable support!\n"));
|
||||
DEBUG ((DEBUG_INFO, "NOTICE - AuthVariableLibInitialize() returns %r!\n", Status));
|
||||
DEBUG ((DEBUG_INFO, "Variable driver will continue to work without auth variable support!\n"));
|
||||
mVariableModuleGlobal->VariableGlobal.AuthSupport = FALSE;
|
||||
Status = EFI_SUCCESS;
|
||||
}
|
||||
@@ -3550,7 +3550,7 @@ GetHobVariableStore (
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
} else {
|
||||
DEBUG ((EFI_D_ERROR, "HOB Variable Store header is corrupted!\n"));
|
||||
DEBUG ((DEBUG_ERROR, "HOB Variable Store header is corrupted!\n"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3598,14 +3598,14 @@ VariableCommonInitialize (
|
||||
// has been initialized in InitNonVolatileVariableStore().
|
||||
//
|
||||
if (mVariableModuleGlobal->VariableGlobal.AuthFormat) {
|
||||
DEBUG ((EFI_D_INFO, "Variable driver will work with auth variable format!\n"));
|
||||
DEBUG ((DEBUG_INFO, "Variable driver will work with auth variable format!\n"));
|
||||
//
|
||||
// Set AuthSupport to FALSE first, VariableWriteServiceInitialize() will initialize it.
|
||||
//
|
||||
mVariableModuleGlobal->VariableGlobal.AuthSupport = FALSE;
|
||||
VariableGuid = &gEfiAuthenticatedVariableGuid;
|
||||
} else {
|
||||
DEBUG ((EFI_D_INFO, "Variable driver will work without auth variable support!\n"));
|
||||
DEBUG ((DEBUG_INFO, "Variable driver will work without auth variable support!\n"));
|
||||
mVariableModuleGlobal->VariableGlobal.AuthSupport = FALSE;
|
||||
VariableGuid = &gEfiVariableGuid;
|
||||
}
|
||||
@@ -3750,4 +3750,3 @@ GetFvbInfoByAddress (
|
||||
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
@@ -345,7 +345,7 @@ OnEndOfDxe (
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
|
||||
DEBUG ((EFI_D_INFO, "[Variable]END_OF_DXE is signaled\n"));
|
||||
DEBUG ((DEBUG_INFO, "[Variable]END_OF_DXE is signaled\n"));
|
||||
MorLockInitAtEndOfDxe ();
|
||||
Status = LockVariablePolicy ();
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
@@ -638,4 +638,3 @@ VariableServiceInitialize (
|
||||
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
|
@@ -489,17 +489,17 @@ SmmVariableHandler (
|
||||
TempCommBufferSize = *CommBufferSize;
|
||||
|
||||
if (TempCommBufferSize < SMM_VARIABLE_COMMUNICATE_HEADER_SIZE) {
|
||||
DEBUG ((EFI_D_ERROR, "SmmVariableHandler: SMM communication buffer size invalid!\n"));
|
||||
DEBUG ((DEBUG_ERROR, "SmmVariableHandler: SMM communication buffer size invalid!\n"));
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
CommBufferPayloadSize = TempCommBufferSize - SMM_VARIABLE_COMMUNICATE_HEADER_SIZE;
|
||||
if (CommBufferPayloadSize > mVariableBufferPayloadSize) {
|
||||
DEBUG ((EFI_D_ERROR, "SmmVariableHandler: SMM communication buffer payload size invalid!\n"));
|
||||
DEBUG ((DEBUG_ERROR, "SmmVariableHandler: SMM communication buffer payload size invalid!\n"));
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
if (!VariableSmmIsBufferOutsideSmmValid ((UINTN)CommBuffer, TempCommBufferSize)) {
|
||||
DEBUG ((EFI_D_ERROR, "SmmVariableHandler: SMM communication buffer in SMRAM or overflow!\n"));
|
||||
DEBUG ((DEBUG_ERROR, "SmmVariableHandler: SMM communication buffer in SMRAM or overflow!\n"));
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
@@ -507,7 +507,7 @@ SmmVariableHandler (
|
||||
switch (SmmVariableFunctionHeader->Function) {
|
||||
case SMM_VARIABLE_FUNCTION_GET_VARIABLE:
|
||||
if (CommBufferPayloadSize < OFFSET_OF(SMM_VARIABLE_COMMUNICATE_ACCESS_VARIABLE, Name)) {
|
||||
DEBUG ((EFI_D_ERROR, "GetVariable: SMM communication buffer size invalid!\n"));
|
||||
DEBUG ((DEBUG_ERROR, "GetVariable: SMM communication buffer size invalid!\n"));
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
//
|
||||
@@ -530,7 +530,7 @@ SmmVariableHandler (
|
||||
// SMRAM range check already covered before
|
||||
//
|
||||
if (InfoSize > CommBufferPayloadSize) {
|
||||
DEBUG ((EFI_D_ERROR, "GetVariable: Data size exceed communication buffer size limit!\n"));
|
||||
DEBUG ((DEBUG_ERROR, "GetVariable: Data size exceed communication buffer size limit!\n"));
|
||||
Status = EFI_ACCESS_DENIED;
|
||||
goto EXIT;
|
||||
}
|
||||
@@ -561,7 +561,7 @@ SmmVariableHandler (
|
||||
|
||||
case SMM_VARIABLE_FUNCTION_GET_NEXT_VARIABLE_NAME:
|
||||
if (CommBufferPayloadSize < OFFSET_OF(SMM_VARIABLE_COMMUNICATE_GET_NEXT_VARIABLE_NAME, Name)) {
|
||||
DEBUG ((EFI_D_ERROR, "GetNextVariableName: SMM communication buffer size invalid!\n"));
|
||||
DEBUG ((DEBUG_ERROR, "GetNextVariableName: SMM communication buffer size invalid!\n"));
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
//
|
||||
@@ -582,7 +582,7 @@ SmmVariableHandler (
|
||||
// SMRAM range check already covered before
|
||||
//
|
||||
if (InfoSize > CommBufferPayloadSize) {
|
||||
DEBUG ((EFI_D_ERROR, "GetNextVariableName: Data size exceed communication buffer size limit!\n"));
|
||||
DEBUG ((DEBUG_ERROR, "GetNextVariableName: Data size exceed communication buffer size limit!\n"));
|
||||
Status = EFI_ACCESS_DENIED;
|
||||
goto EXIT;
|
||||
}
|
||||
@@ -606,7 +606,7 @@ SmmVariableHandler (
|
||||
|
||||
case SMM_VARIABLE_FUNCTION_SET_VARIABLE:
|
||||
if (CommBufferPayloadSize < OFFSET_OF(SMM_VARIABLE_COMMUNICATE_ACCESS_VARIABLE, Name)) {
|
||||
DEBUG ((EFI_D_ERROR, "SetVariable: SMM communication buffer size invalid!\n"));
|
||||
DEBUG ((DEBUG_ERROR, "SetVariable: SMM communication buffer size invalid!\n"));
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
//
|
||||
@@ -630,7 +630,7 @@ SmmVariableHandler (
|
||||
// Data buffer should not contain SMM range
|
||||
//
|
||||
if (InfoSize > CommBufferPayloadSize) {
|
||||
DEBUG ((EFI_D_ERROR, "SetVariable: Data size exceed communication buffer size limit!\n"));
|
||||
DEBUG ((DEBUG_ERROR, "SetVariable: Data size exceed communication buffer size limit!\n"));
|
||||
Status = EFI_ACCESS_DENIED;
|
||||
goto EXIT;
|
||||
}
|
||||
@@ -660,7 +660,7 @@ SmmVariableHandler (
|
||||
|
||||
case SMM_VARIABLE_FUNCTION_QUERY_VARIABLE_INFO:
|
||||
if (CommBufferPayloadSize < sizeof (SMM_VARIABLE_COMMUNICATE_QUERY_VARIABLE_INFO)) {
|
||||
DEBUG ((EFI_D_ERROR, "QueryVariableInfo: SMM communication buffer size invalid!\n"));
|
||||
DEBUG ((DEBUG_ERROR, "QueryVariableInfo: SMM communication buffer size invalid!\n"));
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
QueryVariableInfo = (SMM_VARIABLE_COMMUNICATE_QUERY_VARIABLE_INFO *) SmmVariableFunctionHeader->Data;
|
||||
@@ -675,7 +675,7 @@ SmmVariableHandler (
|
||||
|
||||
case SMM_VARIABLE_FUNCTION_GET_PAYLOAD_SIZE:
|
||||
if (CommBufferPayloadSize < sizeof (SMM_VARIABLE_COMMUNICATE_GET_PAYLOAD_SIZE)) {
|
||||
DEBUG ((EFI_D_ERROR, "GetPayloadSize: SMM communication buffer size invalid!\n"));
|
||||
DEBUG ((DEBUG_ERROR, "GetPayloadSize: SMM communication buffer size invalid!\n"));
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
GetPayloadSize = (SMM_VARIABLE_COMMUNICATE_GET_PAYLOAD_SIZE *) SmmVariableFunctionHeader->Data;
|
||||
@@ -752,7 +752,7 @@ SmmVariableHandler (
|
||||
break;
|
||||
case SMM_VARIABLE_FUNCTION_VAR_CHECK_VARIABLE_PROPERTY_GET:
|
||||
if (CommBufferPayloadSize < OFFSET_OF (SMM_VARIABLE_COMMUNICATE_VAR_CHECK_VARIABLE_PROPERTY, Name)) {
|
||||
DEBUG ((EFI_D_ERROR, "VarCheckVariablePropertyGet: SMM communication buffer size invalid!\n"));
|
||||
DEBUG ((DEBUG_ERROR, "VarCheckVariablePropertyGet: SMM communication buffer size invalid!\n"));
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
//
|
||||
@@ -773,7 +773,7 @@ SmmVariableHandler (
|
||||
// SMRAM range check already covered before
|
||||
//
|
||||
if (InfoSize > CommBufferPayloadSize) {
|
||||
DEBUG ((EFI_D_ERROR, "VarCheckVariablePropertyGet: Data size exceed communication buffer size limit!\n"));
|
||||
DEBUG ((DEBUG_ERROR, "VarCheckVariablePropertyGet: Data size exceed communication buffer size limit!\n"));
|
||||
Status = EFI_ACCESS_DENIED;
|
||||
goto EXIT;
|
||||
}
|
||||
@@ -979,7 +979,7 @@ SmmEndOfDxeCallback (
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
|
||||
DEBUG ((EFI_D_INFO, "[Variable]SMM_END_OF_DXE is signaled\n"));
|
||||
DEBUG ((DEBUG_INFO, "[Variable]SMM_END_OF_DXE is signaled\n"));
|
||||
MorLockInitAtEndOfDxe ();
|
||||
Status = LockVariablePolicy ();
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
@@ -1191,5 +1191,3 @@ MmVariableServiceInitialize (
|
||||
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
|
@@ -69,7 +69,7 @@ WatchdogTimerDriverExpires (
|
||||
mWatchdogTimerNotifyFunction (mWatchdogTimerPeriod);
|
||||
}
|
||||
|
||||
DEBUG ((EFI_D_ERROR, "Watchdog Timer resetting system\n"));
|
||||
DEBUG ((DEBUG_ERROR, "Watchdog Timer resetting system\n"));
|
||||
|
||||
//
|
||||
// Reset the platform
|
||||
|
Reference in New Issue
Block a user