// Sanity Check\r
//\r
if (Size > MAX_ADDRESS) {\r
- DEBUG ((EFI_D_ERROR, "ERROR: Size(0x%lx) > MAX_ADDRESS\n", Size));\r
+ DEBUG ((DEBUG_ERROR, "ERROR: Size(0x%lx) > MAX_ADDRESS\n", Size));\r
return FALSE;\r
}\r
\r
// Sanity Check\r
//\r
if (Address > (MAX_ADDRESS - Size)) {\r
- DEBUG ((EFI_D_ERROR, "ERROR: Address(0x%lx) > (MAX_ADDRESS - Size(0x%lx))\n", Address, Size));\r
+ DEBUG ((DEBUG_ERROR, "ERROR: Address(0x%lx) > (MAX_ADDRESS - Size(0x%lx))\n", Address, Size));\r
return FALSE;\r
}\r
\r
for (Index = 0; MemoryResource[Index].ResourceLength != 0; Index++) {\r
if ((Address >= MemoryResource[Index].PhysicalStart) &&\r
((Address + Size) <= (MemoryResource[Index].PhysicalStart + MemoryResource[Index].ResourceLength))) {\r
- DEBUG ((EFI_D_INFO, "Address(0x%lx) Size(0x%lx) in MemoryResource[0x%x] - Start(0x%lx) Length(0x%lx)\n",\r
+ DEBUG ((DEBUG_INFO, "Address(0x%lx) Size(0x%lx) in MemoryResource[0x%x] - Start(0x%lx) Length(0x%lx)\n",\r
Address, Size,\r
Index, MemoryResource[Index].PhysicalStart, MemoryResource[Index].ResourceLength));\r
return TRUE;\r
}\r
}\r
\r
- DEBUG ((EFI_D_ERROR, "ERROR: Address(0x%lx) Size(0x%lx) not in any MemoryResource\n", Address, Size));\r
+ DEBUG ((DEBUG_ERROR, "ERROR: Address(0x%lx) Size(0x%lx) not in any MemoryResource\n", Address, Size));\r
return FALSE;\r
}\r
\r
UINTN CapsuleCount;\r
EFI_CAPSULE_BLOCK_DESCRIPTOR *Ptr;\r
\r
- DEBUG ((EFI_D_INFO, "ValidateCapsuleIntegrity\n"));\r
+ DEBUG ((DEBUG_INFO, "ValidateCapsuleIntegrity\n"));\r
\r
//\r
// Go through the list to look for inconsistencies. Check for:\r
return NULL;\r
}\r
\r
- DEBUG ((EFI_D_INFO, "Ptr - 0x%x\n", Ptr));\r
- DEBUG ((EFI_D_INFO, "Ptr->Length - 0x%x\n", Ptr->Length));\r
- DEBUG ((EFI_D_INFO, "Ptr->Union - 0x%x\n", Ptr->Union.ContinuationPointer));\r
+ DEBUG ((DEBUG_INFO, "Ptr - 0x%x\n", Ptr));\r
+ DEBUG ((DEBUG_INFO, "Ptr->Length - 0x%x\n", Ptr->Length));\r
+ DEBUG ((DEBUG_INFO, "Ptr->Union - 0x%x\n", Ptr->Union.ContinuationPointer));\r
while ((Ptr->Length != 0) || (Ptr->Union.ContinuationPointer != (EFI_PHYSICAL_ADDRESS) (UINTN) NULL)) {\r
//\r
// Make sure the descriptor is aligned at UINT64 in memory\r
//\r
if ((UINTN) Ptr & (sizeof(UINT64) - 1)) {\r
- DEBUG ((EFI_D_ERROR, "ERROR: BlockList address failed alignment check\n"));\r
+ DEBUG ((DEBUG_ERROR, "ERROR: BlockList address failed alignment check\n"));\r
return NULL;\r
}\r
\r
if (!ValidateCapsuleByMemoryResource (MemoryResource, (EFI_PHYSICAL_ADDRESS) (UINTN) Ptr, sizeof (EFI_CAPSULE_BLOCK_DESCRIPTOR))) {\r
return NULL;\r
}\r
- DEBUG ((EFI_D_INFO, "Ptr(C) - 0x%x\n", Ptr));\r
- DEBUG ((EFI_D_INFO, "Ptr->Length - 0x%x\n", Ptr->Length));\r
- DEBUG ((EFI_D_INFO, "Ptr->Union - 0x%x\n", Ptr->Union.ContinuationPointer));\r
+ DEBUG ((DEBUG_INFO, "Ptr(C) - 0x%x\n", Ptr));\r
+ DEBUG ((DEBUG_INFO, "Ptr->Length - 0x%x\n", Ptr->Length));\r
+ DEBUG ((DEBUG_INFO, "Ptr->Union - 0x%x\n", Ptr->Union.ContinuationPointer));\r
} else {\r
if (!ValidateCapsuleByMemoryResource (MemoryResource, Ptr->Union.DataBlock, Ptr->Length)) {\r
return NULL;\r
// Sanity check\r
//\r
if (Ptr->Length < sizeof(EFI_CAPSULE_HEADER)) {\r
- DEBUG ((EFI_D_ERROR, "ERROR: Ptr->Length(0x%lx) < sizeof(EFI_CAPSULE_HEADER)\n", Ptr->Length));\r
+ DEBUG ((DEBUG_ERROR, "ERROR: Ptr->Length(0x%lx) < sizeof(EFI_CAPSULE_HEADER)\n", Ptr->Length));\r
return NULL;\r
}\r
//\r
// Make sure HeaderSize field is valid\r
//\r
if (CapsuleHeader->HeaderSize > CapsuleHeader->CapsuleImageSize) {\r
- DEBUG ((EFI_D_ERROR, "ERROR: CapsuleHeader->HeaderSize(0x%x) > CapsuleHeader->CapsuleImageSize(0x%x)\n", CapsuleHeader->HeaderSize, CapsuleHeader->CapsuleImageSize));\r
+ DEBUG ((DEBUG_ERROR, "ERROR: CapsuleHeader->HeaderSize(0x%x) > CapsuleHeader->CapsuleImageSize(0x%x)\n", CapsuleHeader->HeaderSize, CapsuleHeader->CapsuleImageSize));\r
return NULL;\r
}\r
if (IsCapsuleCorrupted (CapsuleHeader)) {\r
if (CapsuleSize >= Ptr->Length) {\r
CapsuleSize = CapsuleSize - Ptr->Length;\r
} else {\r
- DEBUG ((EFI_D_ERROR, "ERROR: CapsuleSize(0x%lx) < Ptr->Length(0x%lx)\n", CapsuleSize, Ptr->Length));\r
+ DEBUG ((DEBUG_ERROR, "ERROR: CapsuleSize(0x%lx) < Ptr->Length(0x%lx)\n", CapsuleSize, Ptr->Length));\r
//\r
// Sanity check\r
//\r
if (!ValidateCapsuleByMemoryResource (MemoryResource, (EFI_PHYSICAL_ADDRESS) (UINTN) Ptr, sizeof (EFI_CAPSULE_BLOCK_DESCRIPTOR))) {\r
return NULL;\r
}\r
- DEBUG ((EFI_D_INFO, "Ptr(B) - 0x%x\n", Ptr));\r
- DEBUG ((EFI_D_INFO, "Ptr->Length - 0x%x\n", Ptr->Length));\r
- DEBUG ((EFI_D_INFO, "Ptr->Union - 0x%x\n", Ptr->Union.ContinuationPointer));\r
+ DEBUG ((DEBUG_INFO, "Ptr(B) - 0x%x\n", Ptr));\r
+ DEBUG ((DEBUG_INFO, "Ptr->Length - 0x%x\n", Ptr->Length));\r
+ DEBUG ((DEBUG_INFO, "Ptr->Union - 0x%x\n", Ptr->Union.ContinuationPointer));\r
}\r
}\r
\r
//\r
// No any capsule is found in BlockList\r
//\r
- DEBUG ((EFI_D_ERROR, "ERROR: CapsuleCount(0x%x) == 0\n", CapsuleCount));\r
+ DEBUG ((DEBUG_ERROR, "ERROR: CapsuleCount(0x%x) == 0\n", CapsuleCount));\r
return NULL;\r
}\r
\r
//\r
// Capsule data is incomplete.\r
//\r
- DEBUG ((EFI_D_ERROR, "ERROR: CapsuleSize(0x%lx) != 0\n", CapsuleSize));\r
+ DEBUG ((DEBUG_ERROR, "ERROR: CapsuleSize(0x%lx) != 0\n", CapsuleSize));\r
return NULL;\r
}\r
\r
}\r
\r
CopyMem ((VOID *) RelocBuffer, (VOID *) (UINTN) TempBlockDesc->Union.DataBlock, (UINTN) TempBlockDesc->Length);\r
- DEBUG ((EFI_D_INFO, "Capsule relocate descriptors from/to/size 0x%lX 0x%lX 0x%lX\n", TempBlockDesc->Union.DataBlock, (UINT64)(UINTN)RelocBuffer, TempBlockDesc->Length));\r
+ DEBUG ((DEBUG_INFO, "Capsule relocate descriptors from/to/size 0x%lX 0x%lX 0x%lX\n", TempBlockDesc->Union.DataBlock, (UINT64)(UINTN)RelocBuffer, TempBlockDesc->Length));\r
TempBlockDesc->Union.DataBlock = (EFI_PHYSICAL_ADDRESS) (UINTN) RelocBuffer;\r
}\r
TempBlockDesc++;\r
return NULL;\r
}\r
CopyMem ((VOID *) RelocBuffer, (VOID *) CurrBlockDescHead, BlockListSize);\r
- DEBUG ((EFI_D_INFO, "Capsule reloc descriptor block #2\n"));\r
+ DEBUG ((DEBUG_INFO, "Capsule reloc descriptor block #2\n"));\r
//\r
// Point the previous block's next point to this copied version. If\r
// the tail pointer is null, then this is the first descriptor block.\r
UINTN ThisCapsuleImageSize;\r
EFI_CAPSULE_HEADER *CapsuleHeader;\r
\r
- DEBUG ((EFI_D_INFO, "GetCapsuleInfo enter\n"));\r
+ DEBUG ((DEBUG_INFO, "GetCapsuleInfo enter\n"));\r
\r
ASSERT (Desc != NULL);\r
\r
// While here we need check all capsules size.\r
//\r
if (Desc->Length >= (MAX_ADDRESS - Size)) {\r
- DEBUG ((EFI_D_ERROR, "ERROR: Desc->Length(0x%lx) >= (MAX_ADDRESS - Size(0x%x))\n", Desc->Length, Size));\r
+ DEBUG ((DEBUG_ERROR, "ERROR: Desc->Length(0x%lx) >= (MAX_ADDRESS - Size(0x%x))\n", Desc->Length, Size));\r
return EFI_OUT_OF_RESOURCES;\r
}\r
Size += (UINTN) Desc->Length;\r
// If no descriptors, then fail\r
//\r
if (Count == 0) {\r
- DEBUG ((EFI_D_ERROR, "ERROR: Count == 0\n"));\r
+ DEBUG ((DEBUG_ERROR, "ERROR: Count == 0\n"));\r
return EFI_NOT_FOUND;\r
}\r
\r
UINT32 TestCounter;\r
UINT32 TestSize;\r
\r
- DEBUG ((EFI_D_INFO, "CapsuleTestPatternPreCoalesce\n"));\r
+ DEBUG ((DEBUG_INFO, "CapsuleTestPatternPreCoalesce\n"));\r
\r
//\r
// Find first data descriptor\r
// First one better be long enough to at least hold the test signature\r
//\r
if (Desc->Length < sizeof (UINT32)) {\r
- DEBUG ((EFI_D_INFO, "Capsule test pattern pre-coalesce punted #1\n"));\r
+ DEBUG ((DEBUG_INFO, "Capsule test pattern pre-coalesce punted #1\n"));\r
return ;\r
}\r
\r
TestPtr += 2;\r
while (1) {\r
if ((TestSize & 0x03) != 0) {\r
- DEBUG ((EFI_D_INFO, "Capsule test pattern pre-coalesce punted #2\n"));\r
+ DEBUG ((DEBUG_INFO, "Capsule test pattern pre-coalesce punted #2\n"));\r
return ;\r
}\r
\r
while (TestSize > 0) {\r
if (*TestPtr != TestCounter) {\r
- DEBUG ((EFI_D_INFO, "Capsule test pattern pre-coalesce failed data corruption check\n"));\r
+ DEBUG ((DEBUG_INFO, "Capsule test pattern pre-coalesce failed data corruption check\n"));\r
return ;\r
}\r
\r
EFI_CAPSULE_BLOCK_DESCRIPTOR *TempBlock;\r
EFI_CAPSULE_BLOCK_DESCRIPTOR *HeadBlock;\r
\r
- DEBUG ((EFI_D_INFO, "BuildCapsuleDescriptors enter\n"));\r
+ DEBUG ((DEBUG_INFO, "BuildCapsuleDescriptors enter\n"));\r
\r
LastBlock = NULL;\r
HeadBlock = NULL;\r
}\r
}\r
} else {\r
- DEBUG ((EFI_D_ERROR, "ERROR: BlockListBuffer[Index](0x%lx) < MAX_ADDRESS\n", BlockListBuffer[Index]));\r
+ DEBUG ((DEBUG_ERROR, "ERROR: BlockListBuffer[Index](0x%lx) < MAX_ADDRESS\n", BlockListBuffer[Index]));\r
}\r
Index ++;\r
}\r
EFI_CAPSULE_BLOCK_DESCRIPTOR *TempBlockDesc;\r
EFI_CAPSULE_BLOCK_DESCRIPTOR PrivateDataDesc[2];\r
\r
- DEBUG ((EFI_D_INFO, "CapsuleDataCoalesce enter\n"));\r
+ DEBUG ((DEBUG_INFO, "CapsuleDataCoalesce enter\n"));\r
\r
CapsuleIndex = 0;\r
SizeLeft = 0;\r
if (EFI_ERROR (Status)) {\r
return Status;\r
}\r
- DEBUG ((EFI_D_INFO, "CapsuleSize - 0x%x\n", CapsuleSize));\r
- DEBUG ((EFI_D_INFO, "CapsuleNumber - 0x%x\n", CapsuleNumber));\r
- DEBUG ((EFI_D_INFO, "NumDescriptors - 0x%x\n", NumDescriptors));\r
+ DEBUG ((DEBUG_INFO, "CapsuleSize - 0x%x\n", CapsuleSize));\r
+ DEBUG ((DEBUG_INFO, "CapsuleNumber - 0x%x\n", CapsuleNumber));\r
+ DEBUG ((DEBUG_INFO, "NumDescriptors - 0x%x\n", NumDescriptors));\r
if ((CapsuleSize == 0) || (NumDescriptors == 0) || (CapsuleNumber == 0)) {\r
return EFI_NOT_FOUND;\r
}\r
\r
if (CapsuleNumber - 1 >= (MAX_ADDRESS - (sizeof (EFI_CAPSULE_PEIM_PRIVATE_DATA) + sizeof(UINT64))) / sizeof(UINT64)) {\r
- DEBUG ((EFI_D_ERROR, "ERROR: CapsuleNumber - 0x%x\n", CapsuleNumber));\r
+ DEBUG ((DEBUG_ERROR, "ERROR: CapsuleNumber - 0x%x\n", CapsuleNumber));\r
return EFI_BUFFER_TOO_SMALL;\r
}\r
\r
// Sanity check\r
//\r
if (CapsuleSize >= (MAX_ADDRESS - (sizeof (EFI_CAPSULE_PEIM_PRIVATE_DATA) + (CapsuleNumber - 1) * sizeof(UINT64) + sizeof(UINT64)))) {\r
- DEBUG ((EFI_D_ERROR, "ERROR: CapsuleSize - 0x%x\n", CapsuleSize));\r
+ DEBUG ((DEBUG_ERROR, "ERROR: CapsuleSize - 0x%x\n", CapsuleSize));\r
return EFI_BUFFER_TOO_SMALL;\r
}\r
//\r
// Sanity check\r
//\r
if (NumDescriptors >= (MAX_ADDRESS / sizeof(EFI_CAPSULE_BLOCK_DESCRIPTOR))) {\r
- DEBUG ((EFI_D_ERROR, "ERROR: NumDescriptors - 0x%x\n", NumDescriptors));\r
+ DEBUG ((DEBUG_ERROR, "ERROR: NumDescriptors - 0x%x\n", NumDescriptors));\r
return EFI_BUFFER_TOO_SMALL;\r
}\r
DescriptorsSize = NumDescriptors * sizeof (EFI_CAPSULE_BLOCK_DESCRIPTOR);\r
// Sanity check\r
//\r
if (DescriptorsSize >= (MAX_ADDRESS - CapsuleSize)) {\r
- DEBUG ((EFI_D_ERROR, "ERROR: DescriptorsSize - 0x%lx, CapsuleSize - 0x%lx\n", (UINT64)DescriptorsSize, (UINT64)CapsuleSize));\r
+ DEBUG ((DEBUG_ERROR, "ERROR: DescriptorsSize - 0x%lx, CapsuleSize - 0x%lx\n", (UINT64)DescriptorsSize, (UINT64)CapsuleSize));\r
return EFI_BUFFER_TOO_SMALL;\r
}\r
\r
// Don't go below some min address. If the base is below it,\r
// then move it up and adjust the size accordingly.\r
//\r
- DEBUG ((EFI_D_INFO, "Capsule Memory range from 0x%8X to 0x%8X\n", (UINTN) *MemoryBase, (UINTN)*MemoryBase + *MemorySize));\r
+ DEBUG ((DEBUG_INFO, "Capsule Memory range from 0x%8X to 0x%8X\n", (UINTN) *MemoryBase, (UINTN)*MemoryBase + *MemorySize));\r
if ((UINTN)*MemoryBase < (UINTN) MIN_COALESCE_ADDR) {\r
if (((UINTN)*MemoryBase + *MemorySize) < (UINTN) MIN_COALESCE_ADDR) {\r
- DEBUG ((EFI_D_ERROR, "ERROR: *MemoryBase + *MemorySize - 0x%x\n", (UINTN)*MemoryBase + *MemorySize));\r
+ DEBUG ((DEBUG_ERROR, "ERROR: *MemoryBase + *MemorySize - 0x%x\n", (UINTN)*MemoryBase + *MemorySize));\r
return EFI_BUFFER_TOO_SMALL;\r
} else {\r
*MemorySize = *MemorySize - ((UINTN) MIN_COALESCE_ADDR - (UINTN) *MemoryBase);\r
}\r
\r
if (*MemorySize <= (CapsuleSize + DescriptorsSize)) {\r
- DEBUG ((EFI_D_ERROR, "ERROR: CapsuleSize + DescriptorsSize - 0x%x\n", CapsuleSize + DescriptorsSize));\r
+ DEBUG ((DEBUG_ERROR, "ERROR: CapsuleSize + DescriptorsSize - 0x%x\n", CapsuleSize + DescriptorsSize));\r
return EFI_BUFFER_TOO_SMALL;\r
}\r
\r
FreeMemBase = *MemoryBase;\r
FreeMemSize = *MemorySize;\r
- DEBUG ((EFI_D_INFO, "Capsule Free Memory from 0x%8X to 0x%8X\n", (UINTN) FreeMemBase, (UINTN) FreeMemBase + FreeMemSize));\r
+ DEBUG ((DEBUG_INFO, "Capsule Free Memory from 0x%8X to 0x%8X\n", (UINTN) FreeMemBase, (UINTN) FreeMemBase + FreeMemSize));\r
\r
//\r
// Relocate all the block descriptors to low memory to make further\r
}\r
\r
CopyMem ((VOID *) RelocPtr, (VOID *) (UINTN) TempBlockDesc->Union.DataBlock, (UINTN) TempBlockDesc->Length);\r
- DEBUG ((EFI_D_INFO, "Capsule reloc data block from 0x%8X to 0x%8X with size 0x%8X\n",\r
+ DEBUG ((DEBUG_INFO, "Capsule reloc data block from 0x%8X to 0x%8X with size 0x%8X\n",\r
(UINTN) TempBlockDesc->Union.DataBlock, (UINTN) RelocPtr, (UINTN) TempBlockDesc->Length));\r
\r
TempBlockDesc->Union.DataBlock = (EFI_PHYSICAL_ADDRESS) (UINTN) RelocPtr;\r
ASSERT (CurrentBlockDesc->Length <= SizeLeft);\r
\r
CopyMem ((VOID *) DestPtr, (VOID *) (UINTN) (CurrentBlockDesc->Union.DataBlock), (UINTN)CurrentBlockDesc->Length);\r
- DEBUG ((EFI_D_INFO, "Capsule coalesce block no.0x%lX from 0x%lX to 0x%lX with size 0x%lX\n",(UINT64)CapsuleTimes,\r
+ DEBUG ((DEBUG_INFO, "Capsule coalesce block no.0x%lX from 0x%lX to 0x%lX with size 0x%lX\n",(UINT64)CapsuleTimes,\r
CurrentBlockDesc->Union.DataBlock, (UINT64)(UINTN)DestPtr, CurrentBlockDesc->Length));\r
DestPtr += CurrentBlockDesc->Length;\r
SizeLeft -= CurrentBlockDesc->Length;\r
if (ReservedRangeEnd < MemoryEnd64) {\r
MemoryBase64 = ReservedRangeEnd;\r
} else {\r
- DEBUG ((EFI_D_ERROR, "Memory is not enough to process capsule!\n"));\r
+ DEBUG ((DEBUG_ERROR, "Memory is not enough to process capsule!\n"));\r
return EFI_OUT_OF_RESOURCES;\r
}\r
} else if (ReservedRangeBase < MemoryEnd64) {\r
&AuthenticationState\r
);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((EFI_D_ERROR, "Unable to find PE32 section in CapsuleX64 image ffs %r!\n", Status));\r
+ DEBUG ((DEBUG_ERROR, "Unable to find PE32 section in CapsuleX64 image ffs %r!\n", Status));\r
return Status;\r
}\r
*CoalesceImageMachineType = PeCoffLoaderGetMachineType ((VOID *) (UINTN) CoalesceImageAddress);\r
LongModeBuffer\r
);\r
if (EFI_ERROR (Status)) {\r
- DEBUG (( EFI_D_ERROR, "Error Get LongModeBuffer variable %r!\n", Status));\r
+ DEBUG (( DEBUG_ERROR, "Error Get LongModeBuffer variable %r!\n", Status));\r
}\r
return Status;\r
}\r
}\r
\r
if (Index == 0) {\r
- DEBUG ((EFI_D_INFO | EFI_D_WARN, "No memory resource descriptor reported in HOB list before capsule Coalesce\n"));\r
+ DEBUG ((DEBUG_INFO | DEBUG_WARN, "No memory resource descriptor reported in HOB list before capsule Coalesce\n"));\r
#if defined (MDE_CPU_IA32) || defined (MDE_CPU_X64)\r
//\r
// Allocate memory to hold memory resource descriptor,\r
\r
MemoryResource[0].PhysicalStart = 0;\r
MemoryResource[0].ResourceLength = LShiftU64 (1, GetPhysicalAddressBits ());\r
- DEBUG ((EFI_D_INFO, "MemoryResource[0x0] - Start(0x%0lx) Length(0x%0lx)\n",\r
+ DEBUG ((DEBUG_INFO, "MemoryResource[0x0] - Start(0x%0lx) Length(0x%0lx)\n",\r
MemoryResource[0x0].PhysicalStart, MemoryResource[0x0].ResourceLength));\r
return MemoryResource;\r
#else\r
while (Hob.Raw != NULL) {\r
ResourceDescriptor = (EFI_HOB_RESOURCE_DESCRIPTOR *) Hob.Raw;\r
if (ResourceDescriptor->ResourceType == EFI_RESOURCE_SYSTEM_MEMORY) {\r
- DEBUG ((EFI_D_INFO, "MemoryResource[0x%x] - Start(0x%0lx) Length(0x%0lx)\n",\r
+ DEBUG ((DEBUG_INFO, "MemoryResource[0x%x] - Start(0x%0lx) Length(0x%0lx)\n",\r
Index, ResourceDescriptor->PhysicalStart, ResourceDescriptor->ResourceLength));\r
MemoryResource[Index].PhysicalStart = ResourceDescriptor->PhysicalStart;\r
MemoryResource[Index].ResourceLength = ResourceDescriptor->ResourceLength;\r
//\r
Status = PeiServicesGetBootMode (&BootMode);\r
if (EFI_ERROR (Status) || (BootMode != BOOT_ON_FLASH_UPDATE)) {\r
- DEBUG ((EFI_D_ERROR, "Boot mode is not correct for capsule update path.\n"));\r
+ DEBUG ((DEBUG_ERROR, "Boot mode is not correct for capsule update path.\n"));\r
Status = EFI_NOT_FOUND;\r
goto Done;\r
}\r
//\r
// There is no capsule variables, quit\r
//\r
- DEBUG ((EFI_D_INFO,"Capsule variable Index = %d\n", Index));\r
+ DEBUG ((DEBUG_INFO,"Capsule variable Index = %d\n", Index));\r
break;\r
}\r
VariableCount++;\r
Index++;\r
}\r
\r
- DEBUG ((EFI_D_INFO,"Capsule variable count = %d\n", VariableCount));\r
+ DEBUG ((DEBUG_INFO,"Capsule variable count = %d\n", VariableCount));\r
\r
//\r
// The last entry is the end flag.\r
);\r
\r
if (Status != EFI_SUCCESS) {\r
- DEBUG ((EFI_D_ERROR, "AllocatePages Failed!, Status = %x\n", Status));\r
+ DEBUG ((DEBUG_ERROR, "AllocatePages Failed!, Status = %x\n", Status));\r
goto Done;\r
}\r
\r
//\r
Status = GetCapsuleDescriptors (VariableArrayAddress);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((EFI_D_ERROR, "Fail to find capsule variables.\n"));\r
+ DEBUG ((DEBUG_ERROR, "Fail to find capsule variables.\n"));\r
goto Done;\r
}\r
\r
CoalesceImageEntryPoint = 0;\r
Status = GetLongModeContext (&LongModeBuffer);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((EFI_D_ERROR, "Fail to find the variable for long mode context!\n"));\r
+ DEBUG ((DEBUG_ERROR, "Fail to find the variable for long mode context!\n"));\r
Status = EFI_NOT_FOUND;\r
goto Done;\r
}\r
\r
Status = FindCapsuleCoalesceImage (&CoalesceImageEntryPoint, &CoalesceImageMachineType);\r
if ((EFI_ERROR (Status)) || (CoalesceImageMachineType != EFI_IMAGE_MACHINE_X64)) {\r
- DEBUG ((EFI_D_ERROR, "Fail to find CapsuleX64 module in FV!\n"));\r
+ DEBUG ((DEBUG_ERROR, "Fail to find CapsuleX64 module in FV!\n"));\r
Status = EFI_NOT_FOUND;\r
goto Done;\r
}\r
Status = CapsuleDataCoalesce (PeiServices, (EFI_PHYSICAL_ADDRESS *)(UINTN)VariableArrayAddress, MemoryResource, MemoryBase, MemorySize);\r
#endif\r
\r
- DEBUG ((EFI_D_INFO, "Capsule Coalesce Status = %r!\n", Status));\r
+ DEBUG ((DEBUG_INFO, "Capsule Coalesce Status = %r!\n", Status));\r
\r
if (Status == EFI_BUFFER_TOO_SMALL) {\r
- DEBUG ((EFI_D_ERROR, "There is not enough memory to process capsule!\n"));\r
+ DEBUG ((DEBUG_ERROR, "There is not enough memory to process capsule!\n"));\r
}\r
\r
if (Status == EFI_NOT_FOUND) {\r
- DEBUG ((EFI_D_ERROR, "Fail to parse capsule descriptor in memory!\n"));\r
+ DEBUG ((DEBUG_ERROR, "Fail to parse capsule descriptor in memory!\n"));\r
REPORT_STATUS_CODE (\r
EFI_ERROR_CODE | EFI_ERROR_MAJOR,\r
(EFI_SOFTWARE_PEI_MODULE | EFI_SW_PEI_EC_INVALID_CAPSULE_DESCRIPTOR)\r
//\r
if (*TestPtr == 0x54534554) {\r
RetValue = TRUE;\r
- DEBUG ((EFI_D_INFO, "Capsule test pattern mode activated...\n"));\r
+ DEBUG ((DEBUG_INFO, "Capsule test pattern mode activated...\n"));\r
TestSize = TestPtr[1] / sizeof (UINT32);\r
//\r
// Skip over the signature and the size fields in the pattern data header\r
TestCounter = 0;\r
while (TestSize > 0) {\r
if (*TestPtr != TestCounter) {\r
- DEBUG ((EFI_D_INFO, "Capsule test pattern mode FAILED: BaseAddr/FailAddr 0x%X 0x%X\n", (UINT32)(UINTN)(EFI_CAPSULE_PEIM_PRIVATE_DATA *)CapsuleBase, (UINT32)(UINTN)TestPtr));\r
+ DEBUG ((DEBUG_INFO, "Capsule test pattern mode FAILED: BaseAddr/FailAddr 0x%X 0x%X\n", (UINT32)(UINTN)(EFI_CAPSULE_PEIM_PRIVATE_DATA *)CapsuleBase, (UINT32)(UINTN)TestPtr));\r
return TRUE;\r
}\r
\r
TestSize--;\r
}\r
\r
- DEBUG ((EFI_D_INFO, "Capsule test pattern mode SUCCESS\n"));\r
+ DEBUG ((DEBUG_INFO, "Capsule test pattern mode SUCCESS\n"));\r
}\r
\r
return RetValue;\r
return EFI_VOLUME_CORRUPTED;\r
}\r
if (PrivateData->CapsuleAllImageSize >= MAX_ADDRESS) {\r
- DEBUG ((EFI_D_ERROR, "CapsuleAllImageSize too big - 0x%lx\n", PrivateData->CapsuleAllImageSize));\r
+ DEBUG ((DEBUG_ERROR, "CapsuleAllImageSize too big - 0x%lx\n", PrivateData->CapsuleAllImageSize));\r
return EFI_OUT_OF_RESOURCES;\r
}\r
if (PrivateData->CapsuleNumber >= MAX_ADDRESS) {\r
- DEBUG ((EFI_D_ERROR, "CapsuleNumber too big - 0x%lx\n", PrivateData->CapsuleNumber));\r
+ DEBUG ((DEBUG_ERROR, "CapsuleNumber too big - 0x%lx\n", PrivateData->CapsuleNumber));\r
return EFI_OUT_OF_RESOURCES;\r
}\r
//\r
);\r
\r
if (Status != EFI_SUCCESS) {\r
- DEBUG ((EFI_D_ERROR, "AllocatePages Failed!\n"));\r
+ DEBUG ((DEBUG_ERROR, "AllocatePages Failed!\n"));\r
return Status;\r
}\r
//\r
// Copy to our new buffer for DXE\r
//\r
- DEBUG ((EFI_D_INFO, "Capsule copy from 0x%8X to 0x%8X with size 0x%8X\n", (UINTN)((UINT8 *)PrivateData + sizeof(EFI_CAPSULE_PEIM_PRIVATE_DATA) + (CapsuleNumber - 1) * sizeof(UINT64)), (UINTN) NewBuffer, Size));\r
+ DEBUG ((DEBUG_INFO, "Capsule copy from 0x%8X to 0x%8X with size 0x%8X\n", (UINTN)((UINT8 *)PrivateData + sizeof(EFI_CAPSULE_PEIM_PRIVATE_DATA) + (CapsuleNumber - 1) * sizeof(UINT64)), (UINTN) NewBuffer, Size));\r
CopyMem ((VOID *) (UINTN) NewBuffer, (VOID *) (UINTN) ((UINT8 *)PrivateData + sizeof(EFI_CAPSULE_PEIM_PRIVATE_DATA) + (CapsuleNumber - 1) * sizeof(UINT64)), Size);\r
//\r
// Check for test data pattern. If it is the test pattern, then we'll\r