]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdeModulePkg/CapsulePei: Change debug MACRO
authorZhichao Gao <zhichao.gao@intel.com>
Thu, 11 Apr 2019 08:20:36 +0000 (16:20 +0800)
committerHao Wu <hao.a.wu@intel.com>
Tue, 16 Apr 2019 05:03:12 +0000 (13:03 +0800)
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1677

Change debug printlevel from EFI_D_ to DEBUG_.
DEBUG_ version is recommanded to use.

Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Hao Wu <hao.a.wu@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Sean Brogan <sean.brogan@microsoft.com>
Cc: Michael Turner <Michael.Turner@microsoft.com>
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com>
Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>
Reviewed-by: Hao Wu <hao.a.wu@intel.com>
MdeModulePkg/Universal/CapsulePei/Common/CapsuleCoalesce.c
MdeModulePkg/Universal/CapsulePei/UefiCapsule.c

index 23e2637c31349cfcf107be37527790fb24ea0444..a88b2fff95782579e1b671b177cd2b283fa5e077 100644 (file)
@@ -252,7 +252,7 @@ ValidateCapsuleByMemoryResource (
   // 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
@@ -260,7 +260,7 @@ ValidateCapsuleByMemoryResource (
   // 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
@@ -274,14 +274,14 @@ ValidateCapsuleByMemoryResource (
   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
@@ -306,7 +306,7 @@ ValidateCapsuleIntegrity (
   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
@@ -327,15 +327,15 @@ ValidateCapsuleIntegrity (
     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
@@ -348,9 +348,9 @@ ValidateCapsuleIntegrity (
       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
@@ -369,14 +369,14 @@ ValidateCapsuleIntegrity (
         // 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
@@ -389,7 +389,7 @@ ValidateCapsuleIntegrity (
       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
@@ -403,9 +403,9 @@ ValidateCapsuleIntegrity (
       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
@@ -413,7 +413,7 @@ ValidateCapsuleIntegrity (
     //\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
@@ -421,7 +421,7 @@ ValidateCapsuleIntegrity (
     //\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
@@ -509,7 +509,7 @@ RelocateBlockDescriptors (
         }\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
@@ -546,7 +546,7 @@ RelocateBlockDescriptors (
         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
@@ -645,7 +645,7 @@ GetCapsuleInfo (
   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
@@ -667,7 +667,7 @@ GetCapsuleInfo (
       // 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
@@ -701,7 +701,7 @@ GetCapsuleInfo (
   // 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
@@ -781,7 +781,7 @@ CapsuleTestPatternPreCoalesce (
   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
@@ -797,7 +797,7 @@ CapsuleTestPatternPreCoalesce (
   // 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
@@ -817,13 +817,13 @@ CapsuleTestPatternPreCoalesce (
   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
@@ -867,7 +867,7 @@ BuildCapsuleDescriptors (
   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
@@ -898,7 +898,7 @@ BuildCapsuleDescriptors (
         }\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
@@ -1016,7 +1016,7 @@ CapsuleDataCoalesce (
   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
@@ -1049,15 +1049,15 @@ CapsuleDataCoalesce (
   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
@@ -1087,7 +1087,7 @@ CapsuleDataCoalesce (
   // 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
@@ -1099,7 +1099,7 @@ CapsuleDataCoalesce (
   // 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
@@ -1107,7 +1107,7 @@ CapsuleDataCoalesce (
   // 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
@@ -1115,10 +1115,10 @@ CapsuleDataCoalesce (
   // 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
@@ -1127,13 +1127,13 @@ CapsuleDataCoalesce (
   }\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
@@ -1199,7 +1199,7 @@ CapsuleDataCoalesce (
         }\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
@@ -1250,7 +1250,7 @@ CapsuleDataCoalesce (
       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
index 36b04e34064b1caec15d86b4fffb23e9bb6532af..e967599e96a9321b37403bb7db4fdfee8c6a6278 100644 (file)
@@ -420,7 +420,7 @@ ModeSwitch (
     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
@@ -518,7 +518,7 @@ FindCapsuleCoalesceImage (
                            &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
@@ -567,7 +567,7 @@ GetLongModeContext (
                                   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
@@ -727,7 +727,7 @@ BuildMemoryResourceDescriptor (
   }\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
@@ -739,7 +739,7 @@ BuildMemoryResourceDescriptor (
 \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
@@ -763,7 +763,7 @@ BuildMemoryResourceDescriptor (
   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
@@ -966,7 +966,7 @@ CapsuleCoalesce (
   //\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
@@ -1009,14 +1009,14 @@ CapsuleCoalesce (
       //\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
@@ -1027,7 +1027,7 @@ CapsuleCoalesce (
              );\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
@@ -1039,7 +1039,7 @@ CapsuleCoalesce (
   //\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
@@ -1057,14 +1057,14 @@ CapsuleCoalesce (
     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
@@ -1084,14 +1084,14 @@ CapsuleCoalesce (
   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
@@ -1156,7 +1156,7 @@ CapsuleTestPattern (
   //\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
@@ -1165,7 +1165,7 @@ CapsuleTestPattern (
     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
@@ -1174,7 +1174,7 @@ CapsuleTestPattern (
       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
@@ -1219,11 +1219,11 @@ CreateState (
     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
@@ -1241,13 +1241,13 @@ CreateState (
              );\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