From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=fail (domain: intel.com, ip: , mailfrom: zhichao.gao@intel.com) Received: from mga03.intel.com (mga03.intel.com []) by groups.io with SMTP; Thu, 11 Apr 2019 17:13:58 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Apr 2019 17:13:58 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,339,1549958400"; d="scan'208";a="160467495" Received: from unknown (HELO gaozhic-MOBL.ccr.corp.intel.com) ([10.239.198.173]) by fmsmga002.fm.intel.com with ESMTP; 11 Apr 2019 17:13:55 -0700 From: "Gao, Zhichao" To: devel@edk2.groups.io Cc: Bret Barkelew , Jian J Wang , Hao Wu , Ray Ni , Star Zeng , Liming Gao , Sean Brogan , Michael Turner Subject: [PATCH V2 2/2] MdeModulePkg/CapsulePei: Update the debug code to print 64bit data Date: Fri, 12 Apr 2019 08:13:39 +0800 Message-Id: <20190412001339.13560-3-zhichao.gao@intel.com> X-Mailer: git-send-email 2.16.2.windows.1 In-Reply-To: <20190412001339.13560-1-zhichao.gao@intel.com> References: <20190412001339.13560-1-zhichao.gao@intel.com> From: Bret Barkelew 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 Cc: Hao Wu Cc: Ray Ni Cc: Star Zeng Cc: Liming Gao Cc: Sean Brogan Cc: Michael Turner Cc: Bret Barkelew Signed-off-by: Zhichao Gao --- .../CapsulePei/Common/CapsuleCoalesce.c | 18 +++++++++--------- 1 file 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)); } } -- 2.21.0.windows.1