]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdeModulePkg/CapsulePei: Update the debug code to print 64bit data
authorBret Barkelew <Bret.Barkelew@microsoft.com>
Thu, 11 Apr 2019 10:14:47 +0000 (18:14 +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

For some pointer and UINT64 data, the debug code print with '%x'.
Which would loss the upper 32bit data. So update '%x' to '%lx'
for these data. And change the pointer value from '%x' to '%p'.

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

index a88b2fff95782579e1b671b177cd2b283fa5e077..468eea5d3f308b91ef409721295746eb12ef8470 100644 (file)
@@ -327,9 +327,9 @@ ValidateCapsuleIntegrity (
     return NULL;\r
   }\r
 \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
+  DEBUG ((DEBUG_INFO, "Ptr - 0x%p\n", Ptr));\r
+  DEBUG ((DEBUG_INFO, "Ptr->Length - 0x%lx\n", Ptr->Length));\r
+  DEBUG ((DEBUG_INFO, "Ptr->Union - 0x%lx\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
@@ -348,9 +348,9 @@ ValidateCapsuleIntegrity (
       if (!ValidateCapsuleByMemoryResource (MemoryResource, (EFI_PHYSICAL_ADDRESS) (UINTN) Ptr, sizeof (EFI_CAPSULE_BLOCK_DESCRIPTOR))) {\r
         return NULL;\r
       }\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
+      DEBUG ((DEBUG_INFO, "Ptr(C) - 0x%p\n", Ptr));\r
+      DEBUG ((DEBUG_INFO, "Ptr->Length - 0x%lx\n", Ptr->Length));\r
+      DEBUG ((DEBUG_INFO, "Ptr->Union - 0x%lx\n", Ptr->Union.ContinuationPointer));\r
     } else {\r
       if (!ValidateCapsuleByMemoryResource (MemoryResource, Ptr->Union.DataBlock, Ptr->Length)) {\r
         return NULL;\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 ((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
+      DEBUG ((DEBUG_INFO, "Ptr(B) - 0x%p\n", Ptr));\r
+      DEBUG ((DEBUG_INFO, "Ptr->Length - 0x%lx\n", Ptr->Length));\r
+      DEBUG ((DEBUG_INFO, "Ptr->Union - 0x%lx\n", Ptr->Union.ContinuationPointer));\r
     }\r
   }\r
 \r