diff options
author | Bret Barkelew <Bret.Barkelew@microsoft.com> | 2019-04-11 18:14:47 +0800 |
---|---|---|
committer | Hao Wu <hao.a.wu@intel.com> | 2019-04-16 13:03:12 +0800 |
commit | 42d8be0eaac5e7e109f487d4e241847e815b077a (patch) | |
tree | e831520a0f19ea5611661a2a2aed28a02f895e59 /MdeModulePkg | |
parent | 85b01932765da8e913654c7fae826f51f41a6dd9 (diff) | |
download | edk2-42d8be0eaac5e7e109f487d4e241847e815b077a.tar.gz edk2-42d8be0eaac5e7e109f487d4e241847e815b077a.tar.bz2 edk2-42d8be0eaac5e7e109f487d4e241847e815b077a.zip |
MdeModulePkg/CapsulePei: Update the debug code to print 64bit data
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>
Diffstat (limited to 'MdeModulePkg')
-rw-r--r-- | MdeModulePkg/Universal/CapsulePei/Common/CapsuleCoalesce.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/MdeModulePkg/Universal/CapsulePei/Common/CapsuleCoalesce.c b/MdeModulePkg/Universal/CapsulePei/Common/CapsuleCoalesce.c index a88b2fff95..468eea5d3f 100644 --- a/MdeModulePkg/Universal/CapsulePei/Common/CapsuleCoalesce.c +++ b/MdeModulePkg/Universal/CapsulePei/Common/CapsuleCoalesce.c @@ -327,9 +327,9 @@ ValidateCapsuleIntegrity ( return NULL;
}
- DEBUG ((DEBUG_INFO, "Ptr - 0x%x\n", Ptr));
- DEBUG ((DEBUG_INFO, "Ptr->Length - 0x%x\n", Ptr->Length));
- DEBUG ((DEBUG_INFO, "Ptr->Union - 0x%x\n", Ptr->Union.ContinuationPointer));
+ DEBUG ((DEBUG_INFO, "Ptr - 0x%p\n", Ptr));
+ DEBUG ((DEBUG_INFO, "Ptr->Length - 0x%lx\n", Ptr->Length));
+ DEBUG ((DEBUG_INFO, "Ptr->Union - 0x%lx\n", Ptr->Union.ContinuationPointer));
while ((Ptr->Length != 0) || (Ptr->Union.ContinuationPointer != (EFI_PHYSICAL_ADDRESS) (UINTN) NULL)) {
//
// Make sure the descriptor is aligned at UINT64 in memory
@@ -348,9 +348,9 @@ ValidateCapsuleIntegrity ( if (!ValidateCapsuleByMemoryResource (MemoryResource, (EFI_PHYSICAL_ADDRESS) (UINTN) Ptr, sizeof (EFI_CAPSULE_BLOCK_DESCRIPTOR))) {
return NULL;
}
- DEBUG ((DEBUG_INFO, "Ptr(C) - 0x%x\n", Ptr));
- DEBUG ((DEBUG_INFO, "Ptr->Length - 0x%x\n", Ptr->Length));
- DEBUG ((DEBUG_INFO, "Ptr->Union - 0x%x\n", Ptr->Union.ContinuationPointer));
+ DEBUG ((DEBUG_INFO, "Ptr(C) - 0x%p\n", Ptr));
+ DEBUG ((DEBUG_INFO, "Ptr->Length - 0x%lx\n", Ptr->Length));
+ DEBUG ((DEBUG_INFO, "Ptr->Union - 0x%lx\n", Ptr->Union.ContinuationPointer));
} else {
if (!ValidateCapsuleByMemoryResource (MemoryResource, Ptr->Union.DataBlock, Ptr->Length)) {
return NULL;
@@ -403,9 +403,9 @@ ValidateCapsuleIntegrity ( if (!ValidateCapsuleByMemoryResource (MemoryResource, (EFI_PHYSICAL_ADDRESS) (UINTN) Ptr, sizeof (EFI_CAPSULE_BLOCK_DESCRIPTOR))) {
return NULL;
}
- DEBUG ((DEBUG_INFO, "Ptr(B) - 0x%x\n", Ptr));
- DEBUG ((DEBUG_INFO, "Ptr->Length - 0x%x\n", Ptr->Length));
- DEBUG ((DEBUG_INFO, "Ptr->Union - 0x%x\n", Ptr->Union.ContinuationPointer));
+ DEBUG ((DEBUG_INFO, "Ptr(B) - 0x%p\n", Ptr));
+ DEBUG ((DEBUG_INFO, "Ptr->Length - 0x%lx\n", Ptr->Length));
+ DEBUG ((DEBUG_INFO, "Ptr->Union - 0x%lx\n", Ptr->Union.ContinuationPointer));
}
}
|