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