public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH] UefiCpuPkg/SecCore: Use %x to print stack information
@ 2016-11-15  8:32 Jeff Fan
  2016-11-15  8:37 ` Tian, Feng
  2016-11-15 16:59 ` Laszlo Ersek
  0 siblings, 2 replies; 7+ messages in thread
From: Jeff Fan @ 2016-11-15  8:32 UTC (permalink / raw)
  To: edk2-devel; +Cc: Feng Tian, Michael D Kinney

SecCoreData->StackBase is VOID * type and SecCoreData->StackSize is UINTN type.
We should use %x to dump their value instead of %lx.

Cast pointer type to UINTN before print it.

Cc: Feng Tian <feng.tian@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jeff Fan <jeff.fan@intel.com>
---
 UefiCpuPkg/SecCore/SecMain.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/UefiCpuPkg/SecCore/SecMain.c b/UefiCpuPkg/SecCore/SecMain.c
index 2ebbc22..4d08f48 100644
--- a/UefiCpuPkg/SecCore/SecMain.c
+++ b/UefiCpuPkg/SecCore/SecMain.c
@@ -239,9 +239,9 @@ SecStartupPhase2(
 
   DEBUG ((
     DEBUG_INFO,
-    "%a() Stack Base: 0x%lx, Stack Size: 0x%lx\n",
+    "%a() Stack Base: 0x%x, Stack Size: 0x%x\n",
     __FUNCTION__,
-    SecCoreData->StackBase,
+    (UINTN) SecCoreData->StackBase,
     SecCoreData->StackSize
     ));
 
-- 
2.9.3.windows.2



^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-11-16  1:01 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-15  8:32 [PATCH] UefiCpuPkg/SecCore: Use %x to print stack information Jeff Fan
2016-11-15  8:37 ` Tian, Feng
2016-11-15 16:59 ` Laszlo Ersek
2016-11-15 17:47   ` Andrew Fish
2016-11-15 18:11     ` Laszlo Ersek
2016-11-15 18:33       ` Andrew Fish
2016-11-16  1:01     ` Fan, Jeff

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox